RE: XQuery: when are comments allowed?

> -----Original Message-----
> From: Per Bothner [mailto:per@bothner.com] 
> Sent: 22 October 2002 20:58
> To: public-qt-comments@w3.org
> Subject: XQuery: when are comments allowed?
> 
> The XQuery specifiction section 3.1.5 Comments says:
>    "Comments may be used before and after major tokens within
>    expressions and within element content."
> 
> What is a "major token"?  Is it defined anywhere?  Section 
> A.1 lexical structure doesn't seem to clarify this.
> 
> Specifically, is a comment between the lexemes of "define 
> function" or in the middle of "parent::" ?
> 
> Of course as a matter of style, no-one should put a comment 
> there, but it might be easier to explain the rules if one 
> could just say that comments are allowed whereever whitespace 
> is allowed.
> 
> Also, the phrase "within element content" is unclear at best 
> ... Is this related to the "open issue" mentioned in the Ed. Note?
> -- 

We did some work on this at the meetings last week, and I hope it will be
clearer in the next version. The decision in principle (if my notes are
correct) was to allow comments anywhere that separator whitespace is
allowed, except in the constructs that mimic XML, e.g. between the
attributes or around the "=" signs in an element constructor. The detailed
implementation of this decision is yet to be done.

Michael Kay

Received on Friday, 25 October 2002 12:59:14 UTC