we
just found that Xerces 1.4.4 support XML schema 1.0, which does not support
{n,m} pattern. and "^\d{1,9}\.\d{2}$"
does
not work either. have to change it to "\d\d*.\d{2}" plus a maxLength
restriction.
but
thanks any way, Chris.
James
-----Original Message-----
From: Christopher Ebert [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 21, 2002 1:05 PM
To: [EMAIL PROTECTED]
Subject: RE: pattern in schemaHi James,Just from experience with regexes, it might need to be "^\d{1,9}\.\d{2}$", specifying the start and end of the string. Otherwise, if it finds the pattern at all, it will match (e.g. 1234567890.12 = 1(234567890.12), which is a match but not what you expected).Chris-----Original Message-----
From: James Liu [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 21, 2002 8:16 AM
To: '[EMAIL PROTECTED]'
Subject: pattern in schemaHi,
I have the following definition in schema:
<xsd:simpleType name = "amount">
<xsd:restriction base = "xsd:string">
<xsd:pattern value = "\d{1,9}\.\d{2}"/>
</xsd:restriction>
</xsd:simpleType>
shouldn't 1234567890.12 be invalid value for this type? but Xerces 1.4.4 does not catch it. Anyone knows why?
thanks in advance,
James
