xerces-j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From George Cristian Bina <geo...@sync.ro>
Subject Re: xs:language validation support
Date Wed, 22 Sep 2004 13:09:05 GMT
Hi Shawn,

See http://www.w3.org/2001/05/xmlschema-errata#E2-25

Best Regards,
George
-----------------------------------------------
George Cristian Bina
<oXygen/> XML Editor & XSLT Editor/Debugger
http://www.oxygenxml.com


Thropp, Shawn wrote:
> I am trying to figure out a message received from Xerces-J version 2.6.2 
> when the parser encountered a language code that was not valid according 
> to the xs:language data type.  The error that I received was:
>  
> Error] ext_example1.xml:27:71: cvc-pattern-valid: Value 
> 'eeeeeeeeeeeeeeeeeeeee' is not facet-valid with respect to pattern 
> '([a-zA-Z]{1,8})(-[a-zA-Z0-9]{1,8})*' for type 'language'.
>  
> However when I look at
> XML Schema Part 2: Datatypes, A Schema for Datatype Definitions (normative):
>  
> I see the following regular expression defined (normative):
> ([a-zA-Z]{2}|[iI]-[a-zA-Z]+|[xX]-[a-zA-Z]{1,8})(-[a-zA-Z]{1,8})*
>  
> <xs:simpleType name="language" id="language">
>     <xs:annotation>
>       <xs:documentation
>         source="http://www.w3.org/TR/xmlschema-2/#language"/>
>     </xs:annotation>
>     <xs:restriction base="xs:token">
>       <xs:pattern
>         
> value="([a-zA-Z]{2}|[iI]-[a-zA-Z]+|[xX]-[a-zA-Z]{1,8})(-[a-zA-Z]{1,8})*"
>                 id="language.pattern">
>         <xs:annotation>
>           <xs:documentation
>                 source="http://www.w3.org/TR/REC-xml#NT-LanguageID">
>             pattern specifies the content of section 2.12 of XML 1.0e2
>             and RFC 1766
>           </xs:documentation>
>         </xs:annotation>
>       </xs:pattern>
>     </xs:restriction>
>   </xs:simpleType>
>  
> Obviously the two regular expression used are different.  It seems as 
> though, by the error poduced by Xerces-J, that Xerces-J parser code is 
> overriding the normative data type (regular expression) with its own?  
> Why are the two different?  Or do I not understand what is going on?
>  
> Thanks for the help
> Schawn

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


Mime
View raw message