Hi David, Looks like the schema [1] in the XML Catalogs 1.1 spec has the correct escaping. I have no idea where the currently distributed catalog.xsd [2] came from but indeed it isn't valid.
Thanks. [1] http://www.oasis-open.org/committees/download.php/14809/xml-catalogs.html#a.w3cxmlschema [2] http://svn.apache.org/viewvc/xml/commons/trunk/java/etc/catalog.xsd?view=log Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] David M Williams <[EMAIL PROTECTED]> wrote on 12/21/2007 03:31:06 AM: > I've recently started using Xerces 2.9.0, which has xml-commons-resolver-1_2 > > 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 include > the whitespace characters because they're normalized by XML > parsing. --> > <xs:restriction base='xs:string'> > <xs:pattern value="[a-zA-Z0-9-'()+,./:=?;[EMAIL PROTECTED]"/> > </xs:restriction> > </xs:simpleType> > > > But the validator says the pattern value should be > > <xs:pattern value="[a-zA-Z0-9\-'()+,./:=?;[EMAIL PROTECTED]"/> > > 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\-'\(\)+,./:=?;[EMAIL PROTECTED]"/> > > > 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.
