[ http://issues.apache.org/jira/browse/XERCESC-1588?page=all ]
     
Alberto Massari resolved XERCESC-1588:
--------------------------------------

    Resolution: Duplicate

Duplicate of XERCESC-1512

SVN changesets:
  http://svn.apache.org/viewcvs.cgi?rev=369417&view=rev
  http://svn.apache.org/viewcvs.cgi?rev=376310&view=rev

> pattern does not match valid instance
> -------------------------------------
>
>          Key: XERCESC-1588
>          URL: http://issues.apache.org/jira/browse/XERCESC-1588
>      Project: Xerces-C++
>         Type: Bug

>   Components: Validating Parser (Schema) (Xerces 1.5 or up only)
>     Versions: 2.7.0
>  Environment: all
>     Reporter: Boris Kolpackov

>
> $ cat >test.xsd
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";>
>   <xs:simpleType name="RFC_0882_Zone">
>     <xs:restriction base="xs:string">
>       <xs:pattern value="|GMT|[\-+]([0-1][0-9]|2[0-3])[0-5][0-9]"/>
>     </xs:restriction>
>   </xs:simpleType>
>   <xs:element name="test" type="RFC_0882_Zone" />
> </xs:schema>
> $ cat >test.xml
> <test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> xsi:noNamespaceSchemaLocation="test.xsd">GMT</test>
> $ dom_count -v=always -n -s -f test.xml 
> Error at file /tmp/test.xml, line 1, char 112
>   Message: Datatype error: Type:InvalidDatatypeValueException, Message:Value 
> 'GMT' does not match regular expression facet 
> '|GMT|[\-+]([0-1][0-9]|2[0-3])[0-5][0-9]'.
> If one changes the pattern to read 'GMT|[\-+]([0-1][0-9]|2[0-3])[0-5][0-9]|' 
> (i.e., moves empty option to the end), it works ok.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
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]

Reply via email to