<?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>29414</bug_id>
          
          <creation_ts>2016-02-01 00:17:39 +0000</creation_ts>
          <short_desc>[XP30][XP31] The judgement subtype-itemtype(Ai, Bi) is incorrect for function(*)</short_desc>
          <delta_ts>2016-02-17 19:01:03 +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.1</component>
          <version>Candidate 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="Abel Braaksma">abel.braaksma</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</assigned_to>
          <cc>josh.spiegel</cc>
          
          <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>124778</commentid>
    <comment_count>0</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-02-01 00:17:39 +0000</bug_when>
    <thetext>In FO31, section 2.5.6.2 The judgement subtype-itemtype(Ai, Bi), list item 25 reads:

25. Bi is function(*). 

It says nothing about Ai. Which creates the strange rule that the expression:

    &quot;1 instance of function(*)&quot;

would be true. This is clearly wrong. I suggest something along those lines:

25. Bi is function(*) and Ai is function(Aa_1, Aa_2, ... Aa_M) as Ar.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124789</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-02-01 15:32:47 +0000</bug_when>
    <thetext>The text in question is in XP31 not FO31. But yes, it does look fairly obviously wrong.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124814</commentid>
    <comment_count>2</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2016-02-02 17:55:13 +0000</bug_when>
    <thetext>The current text is clearly wrong.  I&apos;m not yet certain that the proposed text is right ... I will look at this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124815</commentid>
    <comment_count>3</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2016-02-02 19:36:02 +0000</bug_when>
    <thetext>(In reply to Jonathan Robie from comment #2)
&gt; The current text is clearly wrong.  I&apos;m not yet certain that the proposed
&gt; text is right ... I will look at this.

Here&apos;s what I found.  The corresponding text in XQuery refers mostly to annotations, which do not exist in XPath.

XQuery:

&gt; Bi is [AnnotationsB] function(*) , Ai is a FunctionTest with annotations
&gt; [AnnotationsA], and subtype-assertions(AnnotationsA, AnnotationsB), 
&gt; where [AnnotationsB] and [AnnotationsA] are optional lists 
&gt; of one or more annotations.

The XPath text you mentioned is basically the XQuery text with all mention of annotations removed automatically.  I suspect that nothing useful is left, and the entire item should simply be removed from XPath.

If you agree, I would treat this as editorial.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124837</commentid>
    <comment_count>4</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-02-04 14:58:19 +0000</bug_when>
    <thetext>&gt; I suspect that nothing useful is left, and the entire item should simply 
&gt; be removed from XPath.
I agree that nothing useful is left, but removing it entirely would remove the ability to have a subtype relationship for function(*) and the like. If you remove it, a new item should take its place that corrects this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124927</commentid>
    <comment_count>5</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2016-02-09 03:00:55 +0000</bug_when>
    <thetext>(In reply to Abel Braaksma from comment #4)
&gt; &gt; I suspect that nothing useful is left, and the entire item should simply 
&gt; &gt; be removed from XPath.
&gt; I agree that nothing useful is left, but removing it entirely would remove
&gt; the ability to have a subtype relationship for function(*) and the like. If
&gt; you remove it, a new item should take its place that corrects this.

DOH.

OK, I think I just messed up on the conditional markup the first time, I think I have it right now, just checked in the changes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124935</commentid>
    <comment_count>6</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-02-09 18:38:51 +0000</bug_when>
    <thetext>(In reply to Jonathan Robie from comment #5)
&gt; OK, I think I just messed up on the conditional markup the first time, I
&gt; think I have it right now, just checked in the changes.
The text now reads:

   &quot;Bi is function(*), Ai is a FunctionTest.&quot;

I think that is correct, this translates to &quot;any function is a subtype of function(*)&quot;.

Note that there is now a typo (not sure it was there earlier) in the next point, item 26:

&lt;quote&gt;
where ; N (arity of Bi) equals M (arity of Ai); subtype(Ar, Br); and for values of I between 1 and N, subtype(Ba_I, Aa_I). 
&lt;/quote&gt;

there&apos;s a rogue &quot;;&quot; semi-colon. Briefly reopening the bug to get that under attention, for anything else, it is resolved, I think.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125132</commentid>
    <comment_count>7</comment_count>
    <who name="Josh Spiegel">josh.spiegel</who>
    <bug_when>2016-02-17 19:01:03 +0000</bug_when>
    <thetext>Fixed typo mentioned in comment 6.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>