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 1387 - [XQuery] some editorial comments on A.2.3 Comments
Summary: [XQuery] some editorial comments on A.2.3 Comments
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 1.0 (show other bugs)
Version: Last Call drafts
Hardware: All All
: P2 minor
Target Milestone: ---
Assignee: Scott Boag
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard: grammar
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-11 07:40 UTC by Michael Dyck
Modified: 2007-02-25 23:54 UTC (History)
0 users

See Also:


Attachments

Description Michael Dyck 2005-05-11 07:40:54 UTC
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.
Comment 1 Scott Boag 2005-07-09 21:15:47 UTC
(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.
Comment 2 Scott Boag 2005-07-22 20:25:45 UTC
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.
Comment 3 Jim Melton 2007-02-25 23:54:07 UTC
Closing bug because commenter has not objected to the resolution posted and more than two weeks have passed.