<?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>1382</bug_id>
          
          <creation_ts>2005-05-11 07:34:58 +0000</creation_ts>
          <short_desc>[XQuery] some editorial comments on A.1.1 grammar-note: occurrence-indicators</short_desc>
          <delta_ts>2007-02-25 23:52:53 +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>3408</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2005-05-11 07:34:58 +0000</bug_when>
    <thetext>A.1.1 grammar-note: occurrence-indicators

[See a later comment for suggested alternate wording.]

&quot;Any occurrence of &apos;+&apos; and &apos;*&apos;, as well as &apos;?&apos;, following a sequence type is
assumed to be an occurrence indicator.&quot;
    Even when the only possible derivation says it&apos;s not an occurrence
    indicator?  So in
        4 treat as item() + 5
    the &apos;+&apos; is assumed to be an occurrence indicator, which would then lead to a
    syntax error? Probably yes, but might be good to say so.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3150</commentid>
    <comment_count>1</comment_count>
    <who name="Scott Boag">scott_boag</who>
    <bug_when>2005-05-17 15:52:42 +0000</bug_when>
    <thetext>&gt; Even when the only possible derivation says it&apos;s not an occurrence
&gt; indicator?  So in
&gt;       4 treat as item() + 5
&gt; the &apos;+&apos; is assumed to be an occurrence indicator, which would then lead to a
&gt; syntax error? Probably yes, but might be good to say so.

Yes, and it does say so.  But it could be clarified, along with an example.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4430</commentid>
    <comment_count>2</comment_count>
    <who name="C. M. Sperberg-McQueen">cmsmcq</who>
    <bug_when>2005-07-07 03:22:24 +0000</bug_when>
    <thetext>Here is a proposed rewording to make clearer that the
priority rule applies in all cases, not just cases of
ambiguity.

       As written, the grammar in A.1 is ambiguous for some forms
       using the &apos;+&apos; and &apos;*&apos; Kleene operators.  The ambiguity is
       resolved as follows:  these operators are tightly bound
       to the SequenceType expression, and have higher precedence
       than other uses of these symbols. Any occurrence of &apos;+&apos;
       and &apos;*&apos;, as well as &apos;?&apos;, following a sequence type is
       assumed to be an occurrence indicator.  That is, a 
       &quot;+&quot;, &quot;*&quot;, or &quot;?&quot; immediately following an ItemType MUST
       be an OccurrenceIndicator.  Thus, &quot;4 treat as
       item() + - 5&quot; MUST be interpreted as (4 treat as item()+) - 5,
       taking the &apos;+&apos; as an OccurrenceIndicator and the
       &apos;-&apos; as a subtraction operator. To force the interpretation
       of &quot;+&quot; as an addition operator (and the corresponding
       interpretation of the &quot;-&quot; as a unary minus), parentheses
       may be used:  the form &quot;(4 treat as item()) + -5&quot; surrounds
       the SequenceType expression with parentheses and leads
       to the desired interpretation.

       This rule has as a consequence that certain forms which
       would otherwise be legal and unambiguous are not
       recognized:  in &quot;4 treat as item() + 5&quot;, the &quot;+&quot; is
       taken as an OccurrenceIndicator, and not as an operator,
       which means this is not a legal expression.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4460</commentid>
    <comment_count>3</comment_count>
    <who name="Scott Boag">scott_boag</who>
    <bug_when>2005-07-09 05:17:51 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; Here is a proposed rewording to make clearer that the
&gt; priority rule applies in all cases, not just cases of
&gt; ambiguity.

I&apos;ve adapted your rewording.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5170</commentid>
    <comment_count>4</comment_count>
    <who name="Scott Boag">scott_boag</who>
    <bug_when>2005-07-22 19:36:34 +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>14170</commentid>
    <comment_count>5</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2007-02-25 23:52:53 +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>