XML Schema XPath subset: NCName:*

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 UTC