W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2004

XML Schema XPath subset: NCName:*

From: Michael Kay <mhk@mhk.me.uk>
Date: Tue, 10 Feb 2004 21:17:05 -0000
To: <www-xml-schema-comments@w3.org>
Message-ID: <001101c3f01b$3fbb0430$6401a8c0@pcukmka>

In section 3.11.6 of XML Schema Part 1, the production rule is given:

[4]  NameTest ::= QName | '*' | NCName ':' '*'	

This creates the impression that spaces are allowed either side of the
":" in NCName:*, and some schema processors (e.g. Xerces) appear to
allow such spaces.

However, in XPath 1.0 and XPath 2.0 such whitespace is not permitted.

(In XPath 1.0, section 3.7 states that whitespace is permitted before or
after any ExprToken, and therefore by implication not within an
ExprToken; a NameTest is an ExprToken under production 37).

So if the schema subset of XPath is to be a true subset, some
clarification is needed.

Michael Kay
Received on Tuesday, 10 February 2004 16:20:12 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 23 October 2007 06:13:33 GMT