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: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
