I believe you need to include the following inside the restriction:

<xsd:minLength value="1"/>
<xsd:maxLength value="10"/>

-----Original Message-----
From: Benson Cheng [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 16, 2001 1:32 PM
To: [EMAIL PROTECTED]
Subject: Schema - regular expression question


Hi All,

I have a regular expression qeustion in Xerces 1.4.3, in the following piece
of the schema I want define the "Quantity" element as a double but only
allow 1 to 10 digits.  But for some reason the parser does not throw an
error for the value of "100000000000000", does anyone know how should I
define this kind of the schema.

<xsd:element    name="Quantity">
        <xsd:simpleType>
                <xsd:restriction base="xsd:double">
                        <xsd:pattern value="\d{1,10}"/>
                </xsd:restriction>
        </xsd:simpleType>
</xsd:element>

Thanks,
Benson.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to