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 1379 - [XQuery] some editorial comments on A.1.1 grammar-note: comments
Summary: [XQuery] some editorial comments on A.1.1 grammar-note: 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:32 UTC by Michael Dyck
Modified: 2007-02-25 23:52 UTC (History)
0 users

See Also:


Attachments

Description Michael Dyck 2005-05-11 07:32:28 UTC
A.1.1 grammar-note: comments

"Expression comments"
    Change to "Comments".

"are allowed inside expressions"
    And elsewhere.

"Note that expression comments"
    Change "expression comments" to "comments".

"are not allowed in constructor content"
    Insert "direct" before "constructor" ?

    Actually, they *are* allowed in constructor content, given a suitable
    definition of "in":
        <a> { "foo" (:comment:) } </a>

"Comments can nest within each other,"
    "within each other" suggests 'A within B, and B within A.' Change to just
    "Comments can nest" or "A comment can contain nested comments".

"as long as all "(:" and ":)" patterns are balanced, no matter where they occur
within the outer comment."
    Well, that's basically what it means for comments to nest.

    Change sentence to:
        A comment can contain nested comments. This means that occurrences of
        "(:" and ":)" in the body of the comment must be balanced.

"will parse correctly"
    Leave the parser out of it.  Change to "is syntactically legal".

"ignoring the comment"
    A dangling participle, I think.

"<eg (: an example:)> $i//title </eg>"
    Maybe you intended to put $i//title within braces.

"but characters inside the element is element content"
    Change "is" to "are".

    Maybe change phrase to "but the characters that look like a comment are in
    fact literal element content".

"and not an expression comment"
    Change "expression comment" to "comment".

"See Comments, Pragmas and Extensions for further information and examples."
    The name of that section is now just "Comments".

    It's silly to split information and examples between here and A.2.3. Please
    merge them.
Comment 1 C. M. Sperberg-McQueen 2005-07-07 01:42:02 UTC
On the whole, I'm inclined to think we should accept all
or almost all of these editorial suggestions, including moving
the two examples in A.2.3 into the list of examples
in this note.  I'm not sure how to phrase the bit about
comments in constructors.  If it is only a warning that
some of the constructor production have the ws:explicit
constraint, it should say that.

On a related note, at least one reader finds it confusing
that "(:", ":)", CommentContents, and Comment are all
listed as terminal symbols in A.2.1.  I think the production
for Comment should be moved out of the main grammar in
A.1 into a separate section in A.2 in which the rules for 
terminal symbols are defined.  (Some other production
rules should go along with it:  the numeric literals and
the terminal symbol types taken over from XML and 
Namespaces, for example.)
Comment 2 Scott Boag 2005-07-09 04:48:12 UTC
(In reply to comment #0)
> A.1.1 grammar-note: comments
> 
> "Expression comments"
>     Change to "Comments".

Done.  (note the original wording was there to distinguish from XML comments,
but I'm OK with loosing it.)

> 
> "are allowed inside expressions"
>     And elsewhere.

Just lost "inside expression, so... "Comments are allowed everywhere that
<termref def="IgnorableWhitespace">ignorable whitespace</termref> is allowed.".  

> 
> "Note that expression comments"
>     Change "expression comments" to "comments".

Done.

> 
> "are not allowed in constructor content"
>     Insert "direct" before "constructor" ?

Done.

> 
>     Actually, they *are* allowed in constructor content, given a suitable
>     definition of "in":
>         <a> { "foo" (:comment:) } </a>

Modified to "Note that  comments are not allowed in direct constructor content,
though they are allowed in  nested 	<nt def="EnclosedExpr">EnclosedExprs</nt>."
 Still clunky, but good enough, i think.

> 
> "Comments can nest within each other,"
>     "within each other" suggests 'A within B, and B within A.' Change to just
>     "Comments can nest" or "A comment can contain nested comments".

Done.

> 
> "as long as all "(:" and ":)" patterns are balanced, no matter where they occur
> within the outer comment."
>     Well, that's basically what it means for comments to nest.

Yes, but I'm trying to emphasize that commenting out the string "(:", for
instance, (: "(:" :), results in a syntax error.

> 
>     Change sentence to:
>         A comment can contain nested comments. This means that occurrences of
>         "(:" and ":)" in the body of the comment must be balanced.

I slightly prefer my wording.

> 
> "will parse correctly"
>     Leave the parser out of it.  Change to "is syntactically legal".

Done.

> 
> "ignoring the comment"
>     A dangling participle, I think.

Dangling participle removed.

> 
> "<eg (: an example:)> $i//title </eg>"
>     Maybe you intended to put $i//title within braces.

Uh, yes.

> 
> "but characters inside the element is element content"
>     Change "is" to "are".
> 
>     Maybe change phrase to "but the characters that look like a comment are in
>     fact literal element content".

Done.

> 
> "and not an expression comment"
>     Change "expression comment" to "comment".

Superseded by previous.

> 
> "See Comments, Pragmas and Extensions for further information and examples."
>     The name of that section is now just "Comments".

Changed to <specref ref="CommentsPragmasExtensions"/>

> 
>     It's silly to split information and examples between here and A.2.3. Please
>     merge them.

Grammar note changed to:

<gitem id="parse-note-comments"><label>comments</label><def><p>Comments are
allowed everywhere that <termref def="IgnorableWhitespace">ignorable
whitespace</termref> is allowed, and so does not explicity appear on the
right-hand side of the grammar (except in it's own production).</p><p>Comments
are allowed everywhere that <termref def="IgnorableWhitespace">ignorable
whitespace</termref> is allowed.  <phrase role="xquery">Note that  comments are
not allowed in direct constructor content, though they are allowed in  nested 
<nt def="EnclosedExpr">EnclosedExprs</nt>.</phrase>  </p><p>See <specref
ref="CommentsPragmasExtensions"/> for further information and
examples.</p></def></gitem>

The rest has been merged to the comments section.
Comment 3 Michael Dyck 2005-07-09 05:02:53 UTC
"Comments are allowed ..., and so does not ..."
    This switches from plural to singular. Perhaps:
    "and so the 'Comment' symbol does not ..."

"(except in it's own production)"
    Delete the apostrophe.

"Comments are allowed everywhere that <termref 
def="IgnorableWhitespace">ignorable whitespace</termref> is allowed."
   This repeats the first sentence.
Comment 4 Scott Boag 2005-07-09 17:15:05 UTC
(In reply to comment #3)
Thanks, fixed.
Comment 5 Scott Boag 2005-07-22 19:35:21 UTC
A joint meeting of the Query and XSLT working groups considered this comment on 
July 20, 2005.  

The WGs agreed to resolve these editorial issues as listed in my previous comment.

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 6 Jim Melton 2007-02-25 23:52:17 UTC
Closing bug because commenter has not objected to the resolution posted and more than two weeks have passed.