This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Tokne has whiteSpace "collapse", which means if an XPath has a string literal that contains consecutive whitespaces or new line/tab characters, they will be normalized, which may not be what's intended by the schema author. Suggest to change the type to xs:string or a type derived from xs:string.
(In reply to comment #0) > Suggest to change the type to xs:string or a type derived from xs:string. > > Tokne has whiteSpace "collapse", which means if an XPath has a string literal >that contains consecutive whitespaces or new line/tab characters, they will be >normalized, which may not be what's intended by the schema author. As I read the XPath spec, when they say "token" they don't necessarily mean a character string in the Schema token datatype's value space. I can't find any place where XPATH itself requires that a character string be Schema-tokenized or even whiteSpace-collapsed. Help me out here.
The reference is not to any use of the term 'token' in XPath documentation; the reference is to the schema for schemas, which currently says in part <xs:attribute name="test"> <xs:simpleType> <xs:annotation> <xs:documentation>A subset of XPath expressions for use in assertion tests</xs:documentation> </xs:annotation> <xs:restriction base="xs:token"> </xs:restriction> </xs:simpleType> </xs:attribute> The point is well taken; this should be fixed. There is no need for tokenization by the schema processor in any case, since it will be performed by the XPath processor. The XPath processor's tokenization will be more reliable, since it will be informed by the XPath grammar in ways that XSD whitespace processing is not.
Fixed: see minutes http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2007Mar/0010.html