<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>1378</bug_id>
          
          <creation_ts>2005-05-11 07:31:43 +0000</creation_ts>
          <short_desc>[XQuery] some editorial comments on A.1.1 grammar-note: leading-lone-slash</short_desc>
          <delta_ts>2007-02-25 23:51:59 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XQuery 1.0</component>
          <version>Last Call drafts</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>grammar</status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Dyck">jmdyck</reporter>
          <assigned_to name="Scott Boag">scott_boag</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>3403</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2005-05-11 07:31:43 +0000</bug_when>
    <thetext>A.1.1 grammar-note: leading-lone-slash

[See a later comment for suggested alternate wording.]

&quot;stand alone unit&quot;
    Change to &quot;complete path expression&quot;.

&apos;a leading prefix that expects a pattern to follow such as a QName or &quot;*&quot;.&apos;
    &quot;leading prefix&quot; is a bit vague.
    &quot;expects&quot; is suspect.
    change to &apos;the start of a path expression, followed by a terminal such as a
    QName or &quot;*&quot;&apos;

&quot;Both of these patterns also may occur as patterns which are recognized in
contexts where operators may occur.&quot;
    Not clear whether &quot;both of these patterns&quot; refers to &quot;stand alone unit&quot; and
    &quot;leading prefix&quot;, or QName and &quot;*&quot;. The latter, I think.

    But *QNames* don&apos;t &quot;occur as patterns which are recognized in contexts where
    operators may occur.&quot; Instead, keywords (that could be mistaken for QNames)
    do.

&apos;Thus, expressions such as &quot;/ * 5&quot; can easily be confused with the path
expression &quot;/*&quot;.&apos;
    By parsers.

&quot;Therefore, a stand-alone slash on the right hand side of an operator,&quot;
    &quot;right&quot;?? Surely &quot;left&quot;!

    It&apos;s not clear what you include in &quot;operator&quot;. Do you include things like
    &quot;+&quot; and &quot;-&quot;, where no confusion can arise? (e.g., &quot;/+...&quot; can&apos;t be the start
    of a path expression, so the slash must be a complete path expression.)

&quot;will need to be parenthesized in order to stand alone,&quot;
    It would be good to first say that it&apos;s illegal, and then get into how to
    achieve the intended effect legally.

    You don&apos;t *need* to parenthesize it -- that&apos;s just the easiest way to
    construct an equivalent legal query.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4427</commentid>
    <comment_count>1</comment_count>
    <who name="C. M. Sperberg-McQueen">cmsmcq</who>
    <bug_when>2005-07-07 01:31:52 +0000</bug_when>
    <thetext>For what it&apos;s worth, I agree that this note should probably be
reworded.  On the other hand, I have some isuses with the 
rewording proposed in Bug 1390.

Working partly from the current text, partly from this comment,
and partly from the proposal in bug 1390, I produce this sketch,
for what it&apos;s worth:

   A single slash may appear either as a complete path expression
   or as the first part of a path expression in which it is
   followed by a RelativePathExpression, which can take the form
   of a NameTest (&quot;*&quot; or a QName).  In contexts where operators
   like &quot;*&quot;, &quot;union&quot;, etc., can occur, parsers may have
   difficulty distinguishing operators from NameTests.  For
   example, without lookahead the first part of the expression &quot;/
   * 5&quot;, for example is easily taken to be a complete expression,
   &quot;/ *&quot;, which has a very different interpretation (the child
   nodes of &quot;/&quot;).

   [Optionally display the two parse trees from bug 1390 here.]

   To reduce the need for lookahead, therefore, if the token
   immediately following a slash is &quot;*&quot; or a keyword, then the
   slash must be the beginning, but not the entirety, of a
   PathExpression (and the following token must be a NameTest,
   not an operator).

   A single slash may be used as the left-hand argument of an
   operator by parenthesizing it: &quot;(/) * 5&quot;.  The expression &quot;5 *
   /&quot;, on the other hand, is legal without parentheses.

This is longer and clumsier than I&apos;d like, and could use a
cold-eyed revision by a merciless editor.  But I offer it
as a possible improvement.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4455</commentid>
    <comment_count>2</comment_count>
    <who name="Scott Boag">scott_boag</who>
    <bug_when>2005-07-09 03:53:20 +0000</bug_when>
    <thetext>(In reply to comment #1, but covers the original comment as well.)
&gt; Working partly from the current text, partly from this comment,
&gt; and partly from the proposal in bug 1390, I produce this sketch,
&gt; for what it&apos;s worth:

Text adapted.

&gt;    [Optionally display the two parse trees from bug 1390 here.]

I don&apos;t want to start displaying parse trees.  The issue is clear enough without
them.

&gt; This is longer and clumsier than I&apos;d like, and could use a
&gt; cold-eyed revision by a merciless editor.  But I offer it
&gt; as a possible improvement.

It&apos;s better.  I suggest we live with whatever shortcomings there may be.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5160</commentid>
    <comment_count>3</comment_count>
    <who name="Scott Boag">scott_boag</who>
    <bug_when>2005-07-22 19:29:36 +0000</bug_when>
    <thetext>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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14167</commentid>
    <comment_count>4</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2007-02-25 23:51:59 +0000</bug_when>
    <thetext>Closing bug because commenter has not objected to the resolution posted and more than two weeks have passed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>