This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
There appears to be nothing in the specification that prevents a comment from appearing in the middle of, or before, the XQuery version declaration. Since it is the version declaration that tells the parser what encoding is used, and since a comment may contain arbitrary characters, this makes life unnecessarily difficult for a "pre-parser" that is trying to detect the encoding. For example, one can envisage a multi-byte encoding in which the sequence x3A x29 [ASCII :)] is present but does not represent the end of a comment. I propose a rule that if a version declaration is present, then there must be no comments before or within the version declaration. Michael Kay
The XML Query WG would like this item discussed at a joint meeting since it refers to the rules for the valid usage of comments. /paulc
Mike, On Sept. 13, 2005, the XQuery group agreed to accept your suggestion. The next version of the XQuery specification will disallow comments before the end of the version declaration (if present). Since you are a member of the working group, I am marking this comment as fixed and closed. Regards, Don Chamberlin