XQuery whitespace

XQuery 1.0: An XML Query Language
W3C Working Draft 30 April 2002

Are these queries valid?
     10div 3
     10 div3
According to the current spec, I think they're all valid (and mean the same 
as '10 div 3').

Re the space between '10' and 'div':
I can't find anything that would require it.

Re the space between 'div' and '3':
I imagine you would claim that A.4's "longest match" rule implies that when 
the lexer sees 'div3', it should prefer the 4-character NCName over the 
3-character Div. But the rule says "the longest possible token ... that 
would be valid in the current syntactic context", and an NCName is not valid 
in the syntactic context established by the IntegerLiteral '10'. (Perhaps,
rather than "syntactic context", you mean "lexical state".)

-Michael Dyck

Received on Thursday, 11 July 2002 05:13:10 UTC