xml-commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David M Williams <david_willi...@us.ibm.com>
Subject Question on catalog.xsd in xml-resolver 1.2
Date Fri, 21 Dec 2007 08:31:06 GMT
I've recently started using Xerces 2.9.0, which has 

It has a catalog.xsd file, in org.apache.xml.resolver.etc

This schema doesn't validate, even by Xerces 2.9 itself!!?? 

The schema has 

  <xs:simpleType name='pubIdChars'>
    <!-- A string of the characters defined as pubIdChar in production 13
         of the Second Edition of the XML 1.0 Recommendation. Does not 
         the whitespace characters because they're normalized by XML 
parsing. -->
    <xs:restriction base='xs:string'>
      <xs:pattern value="[a-zA-Z0-9-'()+,./:=?;!*#@$_%]*"/>

But the validator says the pattern value should be 

    <xs:pattern value="[a-zA-Z0-9\-'()+,./:=?;!*#@$_%]*"/>

That is, have an escaped '-' character where it's used literally. 
Some googling around implied the parentheses '(' and ')' should also be 
escaped, giving 

      <xs:pattern value="[a-zA-Z0-9\-'\(\)+,./:=?;!*#@$_%]*"/>

So ... I'm curious, is this a simple bug and the file that's being 
distributed should be fixed? 
Or, is there some complex special case here where is doesn't matter? Or 
that is should be escaped for 
one type of context or processing but not escaped for another? 

I don't know of any cases of the resolving functionality actually failing 
because of this ... but, 
seems it should shipped in a valid form? 

Thanks for any education/insight you can give me. 

View raw message