This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 1921 - [XQuery] Disallow comments before encoding declaration
Summary: [XQuery] Disallow comments before encoding declaration
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XPath 2.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Scott Boag
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-31 13:59 UTC by Michael Kay
Modified: 2005-09-27 16:11 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2005-08-31 13:59:27 UTC
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
Comment 1 Paul Cotton 2005-08-31 17:25:05 UTC
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
Comment 2 Don Chamberlin 2005-09-27 16:10:42 UTC
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