You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2002/05/20 19:16:14 UTC
DO NOT REPLY [Bug 9253] New: -
Regular Expression; Pattern "|" clause -- order dependent error
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9253>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9253
Regular Expression; Pattern "|" clause -- order dependent error
Summary: Regular Expression; Pattern "|" clause -- order
dependent error
Product: Xerces2-J
Version: 2.0.1
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: XML Schema Structures
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: RichardTopolewski@spherion.com
Get Error:
Value 'BBB - A' does not match regular expression facet 'AAA|BBB|BBB - A'..
If change orderof Regular Expression to:
<xs:pattern value='AAA|BBB - A|BBB' />
Then it works.
XML trying to Validate:
<test >BBB - A</test >
The following Schema throws an exception:
Schema:
<xs:simpleType name='TestRich' >
<xs:restriction base='xs:string'>
<xs:pattern value='AAA|BBB|BBB - A' />
</xs:restriction >
</xs:simpleType>
The following schema works:
Schema:
<xs:simpleType name='TestRich' >
<xs:restriction base='xs:string'>
<xs:pattern value='AAA|BBB - A|BBB' />
</xs:restriction >
</xs:simpleType>
--------------------------------------------------------------------
Complete Schema:
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name='xerces-pattern-bug' type='XercesPatternBug' />
<xs:complexType name='XercesPatternBug' >
<xs:sequence>
<xs:element name='test' type='TestRich' />
</xs:sequence>
</xs:complexType>
<xs:simpleType name='TestRich' >
<xs:restriction base='xs:string'>
<xs:pattern value='AAA|BBB|BBB - A' />
</xs:restriction >
</xs:simpleType>
</xs:schema>
Complete XML:
<?xml version="1.0" encoding="UTF-8" ?>
<xerces-pattern-bug xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:noNamespaceSchemaLocation='http://localhost:8080/gpsis/easymap/XercesPattern
Bug.xsd'>
<test >BBB - A</test >
</xerces-pattern-bug>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org