This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
A.2.3 Comments (whole section) I think the content of this section should be moved/merged either to A.1.1 grammar-note: comments, or 2.6 Comments. It appears to be just talking about ramifications of the Comment and CommentContents productions. It isn't specifying the lexical structure of the language. "Comments are allowed to nest, though the content of a comment must have balanced comment delimiters without regard to structure." I'm not sure that "balanced delimiters without regard to structure" makes any sense. Doesn't "balanced" induce a structure? Would "balanced delimiters *with* regard to structure" or just "balanced delimiters" mean something different? And anyway, aren't balanced delimiters guaranteed by the fact that comments nest? In which case, "though" should be "so". "It is a limitation of nested comments that literal content can cause unbalanced nesting of comments." Comments don't have to nest to cause problems like this, they just have to have visible delimiters (as opposed to line-end comments): if you have a language with delimited comments, and you try to comment-out a chunk of text, there's the possibility that the text might already contain characters that are (or will become) a comment delimiter and screw things up. E.g., in C (where comments are delimited but do not nest), "this is just a string */" is a legal expression. But /* "this is just a string */" */ will cause a syntax error. Mind you, /* "this is just a string /*" */ isn't an error (unlike the corresponding construct in XQuery), though it'll probably get you a warning.
(In reply to comment #0) > A.2.3 Comments > > (whole section) > I think the content of this section should be moved/merged either to A.1.1 > grammar-note: comments, or 2.6 Comments. It appears to be just talking > about ramifications of the Comment and CommentContents productions. It > isn't specifying the lexical structure of the language. Would be OK with me, but it should be decided by Don at the upcoming F2F. > > "Comments are allowed to nest, though the content of a comment must have > balanced comment delimiters without regard to structure." > I'm not sure that "balanced delimiters without regard to structure" makes > any sense. Doesn't "balanced" induce a structure? Would "balanced delimiters > *with* regard to structure" or just "balanced delimiters" mean something > different? > > And anyway, aren't balanced delimiters guaranteed by the fact that comments > nest? In which case, "though" should be "so". <p>A comment can contain nested comments, as long as all "(:" and ":)" patterns are balanced, no matter where they occur within the outer comment.</p> > > "It is a limitation of nested comments that literal content can cause unbalanced > nesting of comments." > Comments don't have to nest to cause problems like this, they just have to > have visible delimiters (as opposed to line-end comments): if you have a > language with delimited comments, and you try to comment-out a chunk of > text, there's the possibility that the text might already contain characters > that are (or will become) a comment delimiter and screw things up. > > E.g., in C (where comments are delimited but do not nest), > "this is just a string */" > is a legal expression. But > /* "this is just a string */" */ > will cause a syntax error. Mind you, > /* "this is just a string /*" */ > isn't an error (unlike the corresponding construct in XQuery), though it'll > probably get you a warning. Sure, though I'll leave it as it stands.
A joint meeting of the Query and XSLT working groups considered this comment on July 20, 2005. The WG has agreed that the issue is resolved per my earlier reply to this issue, and by removing the A.2.3 Comments section and putting it's contents into grammar-note: comments. If you do not agree with this resolution, please add a comment explaining why. If you wish to appeal the WG's decision to the Director, then change the Status of the record to Reopened. If we do not hear from you in the next two weeks, we will assume you agree with the WG decision.
Closing bug because commenter has not objected to the resolution posted and more than two weeks have passed.