Regular expressions with OR not validated correctly
---------------------------------------------------
Key: XERCESC-1549
URL: http://issues.apache.org/jira/browse/XERCESC-1549
Project: Xerces-C++
Type: Bug
Components: Validating Parser (Schema) (Xerces 1.5 or up only)
Versions: 2.7.0
Environment: win32, AIX
Reporter: Michel van Uunen
Priority: Critical
Attachments: sample.xml, sample.xsd
Since Xerces version 2.7.0 '|' combined regular expressions in XSD schema
patterns are not handled correctly:
E.g.
Consider the following (simplified) schema pattern:
<xs:element name="Elem">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{2}|[A-Z]{3}"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<Elem>AA</Elem> --> valid
<Elem>AAA</Elem> --> Datatype error: Type:InvalidDatatypeValueException,
Message:Value 'AAA' does not match regular expression facet '[A-Z]{2}|[A-Z]{3}'.
Only the first pattern seems to be validated. In Xerces 2.6.0 both expressions
were handled correctly.
We are in the process of migrating to Xerces 2.7.0/Xalan 1.10.0, but this
regression problem seems to be blocking for migration.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]