<?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>8762</bug_id>
          
          <creation_ts>2010-01-15 09:10:45 +0000</creation_ts>
          <short_desc>[XPath 2.1] Ambiguity of occurrence indicators in FunctionTest</short_desc>
          <delta_ts>2010-02-17 22:39:28 +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>XPath 3.0</component>
          <version>Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</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>31068</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2010-01-15 09:10:45 +0000</bug_when>
    <thetext>Gunther Rademacher &lt;grd@gmx.net&gt; asked me to raise this: he reported difficulty registering for bugzilla.

&lt;quote&gt;
     The addition of FunctionTest to the sequence type syntax
     causes an ambiguity for occurrence indicators, because the
     grammar allows an optional occurrence indicator both
     at the end of a FunctionTest, and following a FunctionTest.

     Though the occurrence-indicators constraint assigns them
     precedence over other uses of the respective symbols, I
     can&apos;t see that it regulates the FunctionTest problem - both
     alternatives clearly would provide the SequenceType context
     (hope I didn&apos;t miss something...).
&lt;/quote&gt;

MHK observation: The spec says &quot;It is permitted to use parentheses to enclose item types, in order to resolve ambiguities that could arise from the OccurrenceIndicator of a SequenceType.&quot; - but it doesn&apos;t say what the interpretation is if you don&apos;t use parentheses. It should make it clear that

function () as xs:string *

means

function () as (xs:string *)

rather than

(function () as xs:string) *</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31073</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2010-01-15 09:42:56 +0000</bug_when>
    <thetext>Incidentally, I think it&apos;s generally a good idea to provide explicit syntax for a default, and we have no explicit syntax for an occurrence indicator of &quot;exactly one&quot;. I would propose using xB9, superscript one, for this purpose. Going to non-ASCII characters is a departure, I know, but it&apos;s 2010 and we&apos;re all grown up now.

(function($a as xs:string¹) as xs:integer¹)*

feels good to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32303</commentid>
    <comment_count>2</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2010-02-17 22:38:04 +0000</bug_when>
    <thetext>The Working Group has decided to solve this by adding an extra-gramatical
constraint, similar to Constraint: occurrence-indicators. I will illustrate it with an example from this bug report.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32305</commentid>
    <comment_count>3</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2010-02-17 22:39:28 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; The Working Group has decided to solve this by adding an extra-gramatical
&gt; constraint, similar to Constraint: occurrence-indicators. I will illustrate it
&gt; with an example from this bug report.

I neglected to mention that this decision was made in the following meeting:

 Teleconference #424, 2010-01-26
  http://lists.w3.org/Archives/Member/w3c-xsl-query/2010Jan/0142.html</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>