[
https://issues.apache.org/jira/browse/XERCESJ-639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13051996#comment-13051996
]
Mukul Gandhi commented on XERCESJ-639:
--------------------------------------
a pattern like <xs:pattern value="abc)"/> is reported,
InvalidRegex: Pattern value 'abc)' is not a valid regular expression. The
reported error was: 'Wrong character.'.
This looks correct, since ) is a meta-character defined in XML Schema spec.
If we change the pattern to,
<xs:pattern value="abc\)"/>
(i.e escape the meta-character ) , then this pattern correctly validates the
string,
abc) (and only this one).
All this looks correct to me. Is there something wrong somewhere?
> Regex of ")" not rejected
> -------------------------
>
> Key: XERCESJ-639
> URL: https://issues.apache.org/jira/browse/XERCESJ-639
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.0 Datatypes
> Affects Versions: 2.3.0
> Environment: Operating System: Other
> Platform: Other
> Reporter: James Clark
>
> Xerces fails to reject the following schema:
> <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>
> <xs:element name="test">
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:pattern value=")"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:element>
> </xs:schema>
> (It treats it as equivalent to value="".)
--
This message is automatically generated by JIRA.
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]