Guofeng Zhang wrote:
> I have limited the range of the value of an attribute in my schema as
> following:
>
> <xs:complexType name="pageSplitType" >
>
> <xs:attribute name="size-per-page" >
>
> <xs:simpleType>
>
> <xs:restriction base="xs:positiveInteger">
>
> <xs:pattern value="\d{1,2}"/>
>
> </xs:restriction>
>
> </xs:simpleType>
>
> </xs:attribute>
>
> </xs:complexType>
>
>
>
> I hope that the type of the generated attribute should be int, but it
> is BigInteger. The following is the signature of the generated getter:
>
> /**
>
> * Gets the "size-per-page" attribute
>
> */
>
> java.math.BigInteger getSizePerPage();
>
>
>
> How to define the schema so that the type of the attribute is int?
>
>
>
> Thanks for your help very much.
>
>
>
> The version is XmlBean 2.0.0.beta1
>
*Read* the xsd recommendation ...
and use the min/maxeclusive facet
from http://www.w3.org/TR/xmlschema-0/
<xsd:element name="productName" type="xsd:string"/>
<xsd:element name="quantity">
<xsd:simpleType>
<xsd:restriction base="xsd:positiveInteger">
<xsd:maxExclusive value="100"/>
</xsd:restriction>
</xsd:simpleType>
--
Jean-Christophe Pazzaglia, PhD <[EMAIL PROTECTED]>
Corporate communications
Tel: (+33) 4-93-00-26-78
PGP Key available : http://www.eurecom.fr/~pazzagli/publickey.pgp
--
Institut Eur�com - Office 029
http://www.eurecom.fr/
2229 Route des Cr�tes
BP 193
06904 Sophia Antipolis, France
Fax: (+33) 4-93-00-26-27
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]