[XQuery] 3.1.6 XQuery Comments: placement

XQuery 1.0: An XML Query Language
W3C Working Draft 12 November 2003

3.1.6 XQuery Comments

"Comments may be used anywhere ignorable whitespace is allowed. See
A.2 Lexical structure for the exact lexical states where comments are
recognized."

In the following queries, a comment is placed where ignorable
whitespace would appear to be allowed, but where the A.2.2 machine
has no transition on "(:".  So which is correct? Does the comment
cause a syntax error or not?

    node( (:test:) )

    processing-instruction( xml-stylesheet (:test:) )

    element( person (:test:) )

    element( hospital / (:test:) staff / person )

    <shoe (:test:) size="7"/>

    <fact>I saw 8 cats.</fact (:test:) >

    9 cast (:test:) as hatsize

-Michael Dyck

Received on Monday, 16 February 2004 03:59:48 UTC