On Thu, 2003-02-27 at 15:07, Anli Shundi wrote: > See [1]: multiple patterns at the same type are interpreted as > multiple OR branches. Yes. So given: <xsd:pattern value = "[0-9][.][0-9]*"/> <xsd:pattern value = "[1-9][0-9]*[.][0-9]*"/> <xsd:pattern value = "[1-9][0-9]*"/> 0123 is not valid according to any of the above patterns. daniella d [mailto:daneladg@yahoo.co.uk] wrote: > Hi, > > What you have written is exactly what I expect it to do. It > does it all fine apart from the third pattern. It doesn't > produce an error when I enter "0123". It seems to be ignoring > it. I don't see how that is related to the 3rd pattern any more than the other 2. 0123 is not valid according to any of the 3 patterns. > I am using Xerces 2.3.0. I've tried writing them in different > ways but I can't get all three patterns to work together. I've tried the above using Xerces-J 1.4.4, Xerces-J 2 (version 2.0.1, I think) and Xerces-C. Works as expected on all of them. I attach my test example and schema. Paul -- Paul Warren, Client Services DecisionSoft Limited +44-1865-203192 http://www.decisionsoft.com <xsd:schema elementFormDefault='qualified' attributeFormDefault='unqualified' targetNamespace='http://test' xmlns='http://test' xmlns:xsd='http://www.w3.org/2001/XMLSchema'> <xsd:element name='foo'> <xsd:complexType> <xsd:sequence> <xsd:element name='bar' maxOccurs='unbounded'> <xsd:simpleType> <xsd:restriction base='xsd:decimal'> <xsd:totalDigits value='11' /> <xsd:fractionDigits value='3' /> <xsd:pattern value='[0-9][.][0-9]*' /> <xsd:pattern value='[1-9][0-9]*[.][0-9]*' /> <xsd:pattern value='[1-9][0-9]*' /> </xsd:restriction> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema>
This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 16 March 2009 11:13:26 GMT