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 1412 - [XQuery] Grammar: Allowing comments between $ and QName
Summary: [XQuery] Grammar: Allowing comments between $ and QName
Status: CLOSED INVALID
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 1.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: grammar
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-13 20:21 UTC by Michael Rys
Modified: 2005-09-29 11:05 UTC (History)
0 users

See Also:


Attachments

Description Michael Rys 2005-05-13 20:21:04 UTC
The current grammar seems to allow whitespaces and especially comments between 
the $ and the QName. Can the grammar please locally be written such that the 
Variable name is clearly identified as $QName and comments are not allowed?
Comment 1 Michael Kay 2005-05-13 20:43:04 UTC
This comment has been made a number of times, and I've never understood the
rationale for it. We allow whitespace after the @ in @att, and before the "(" in
text(), in fact everywhere where names appear adjacent to punctuation symbols.
Why make an exception for this one?

XPath 1.0 had this restriction, as it happens, and I was very pleased to delete
the dozen lines of contorted code in my parser that enforced it.
Comment 2 C. M. Sperberg-McQueen 2005-07-20 17:07:15 UTC
The only plausible way to make this change would be to make
VariableReference a token type.  (The only alternative I can
think of is an ad hoc rule, which lacks motivation.)

That would involve changes to productions 5 and 6, which is
not too onerous.  But it would also mean having a token type
with significant internal structure, and the rules for 
QNames (both syntactic and semantic) would have to be
either repeated between the token grammar and the main grammar
or else those rules have to be shared between the grammars,
which seems like a violation of modularity.

I think the general principle that tokens should be treatable
as atoms suffices to lead us to reject this proposal.
Comment 3 Scott Boag 2005-07-22 20:34:06 UTC
A joint meeting of the Query and XSLT working groups considered this comment on 
July 20, 2005.  

The WG has concensus that we do not wish to make a change.

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.