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 "Dave Hoffer (JIRA)" <xe...@xml.apache.org> on 2007/11/22 14:14:43 UTC
[jira] Commented: (XERCESJ-955) InvalidRegex for correct regular
expression
[ https://issues.apache.org/jira/browse/XERCESJ-955?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12544797 ]
Dave Hoffer commented on XERCESJ-955:
-------------------------------------
Yes, I too have schemas defined with this problem. What is the fix/workaround? How can I change the schema to that xerces can handle the same functionality?
> InvalidRegex for correct regular expression
> -------------------------------------------
>
> Key: XERCESJ-955
> URL: https://issues.apache.org/jira/browse/XERCESJ-955
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema API
> Affects Versions: 2.5.0
> Environment: Windows 2000, java version "1.4.1_02"
> Reporter: Dietrich Vatter
> Priority: Minor
>
> running org.xml.sax.XMLReader with this java code
> reader = XMLReaderFactory.createXMLReader();
> reader.setFeature("http://apache.org/xml/features/validation/schema", true);
> reader.setFeature("http://xml.org/sax/features/validation", true);
> against this schema extract (original taken from www.bmecat.org)
> <xsd:simpleType name="dtTIMEZONETYPE">
> <xsd:restriction base="xsd:string">
> <xsd:pattern value="([+-]([0-1][0-9]|2[0-3])(:[0-5][0-9]))|Z"/>
> </xsd:restriction>
> </xsd:simpleType>
> in this error:
> [Error] bmecat_new_catalog_1_2.xsd:2952:38: InvalidRegex: Pattern value '([+-]([0-1][0-9]|2[0-3])(:[0-5][0-9]))|Z' is not a valid regular expression. The reported error was: ''-' is an invalid character range. Write '\-'.'.
> Looks like it assumes a range when hitting the '-', but it is actually just a character. Probably needs to check whether '-' is at beginning or and of brackets.
--
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