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 29414 - [XP30][XP31] The judgement subtype-itemtype(Ai, Bi) is incorrect for function(*)
Summary: [XP30][XP31] The judgement subtype-itemtype(Ai, Bi) is incorrect for function(*)
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XPath 3.1 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Jonathan Robie
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-01 00:17 UTC by Abel Braaksma
Modified: 2016-02-17 19:01 UTC (History)
1 user (show)

See Also:


Attachments

Description Abel Braaksma 2016-02-01 00:17:39 UTC
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:

    "1 instance of function(*)"

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.
Comment 1 Michael Kay 2016-02-01 15:32:47 UTC
The text in question is in XP31 not FO31. But yes, it does look fairly obviously wrong.
Comment 2 Jonathan Robie 2016-02-02 17:55:13 UTC
The current text is clearly wrong.  I'm not yet certain that the proposed text is right ... I will look at this.
Comment 3 Jonathan Robie 2016-02-02 19:36:02 UTC
(In reply to Jonathan Robie from comment #2)
> The current text is clearly wrong.  I'm not yet certain that the proposed
> text is right ... I will look at this.

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

XQuery:

> Bi is [AnnotationsB] function(*) , Ai is a FunctionTest with annotations
> [AnnotationsA], and subtype-assertions(AnnotationsA, AnnotationsB), 
> where [AnnotationsB] and [AnnotationsA] are optional lists 
> 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.
Comment 4 Abel Braaksma 2016-02-04 14:58:19 UTC
> I suspect that nothing useful is left, and the entire item should simply 
> 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.
Comment 5 Jonathan Robie 2016-02-09 03:00:55 UTC
(In reply to Abel Braaksma from comment #4)
> > I suspect that nothing useful is left, and the entire item should simply 
> > 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.

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.
Comment 6 Abel Braaksma 2016-02-09 18:38:51 UTC
(In reply to Jonathan Robie from comment #5)
> 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.
The text now reads:

   "Bi is function(*), Ai is a FunctionTest."

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

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

<quote>
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). 
</quote>

there's a rogue ";" semi-colon. Briefly reopening the bug to get that under attention, for anything else, it is resolved, I think.
Comment 7 Josh Spiegel 2016-02-17 19:01:03 UTC
Fixed typo mentioned in comment 6.