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 "Michael Glavassevich (JIRA)" <xe...@xml.apache.org> on 2007/02/22 04:57:05 UTC

[jira] Updated: (XERCESJ-325) Regular Expression; Pattern "|" clause -- order dependent error

     [ https://issues.apache.org/jira/browse/XERCESJ-325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Glavassevich updated XERCESJ-325:
-----------------------------------------

    Component/s:     (was: XML Schema Structures)
                 XML Schema datatypes
       Assignee:     (was: Xerces-J Developers Mailing List)
       Priority: Blocker

> Regular Expression; Pattern "|" clause -- order dependent error
> ---------------------------------------------------------------
>
>                 Key: XERCESJ-325
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-325
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema datatypes
>    Affects Versions: 2.0.1
>         Environment: Operating System: All
> Platform: All
>            Reporter: Richard Topolewski
>            Priority: Blocker
>
> 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>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org