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 26844 - [XP31] Wrong error code
Summary: [XP31] Wrong error code
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XPath 3.1 (show other bugs)
Version: Working drafts
Hardware: SGI 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: https://www.w3.org/XML/Group/qtspecs/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-18 10:57 UTC by Tim Mills
Modified: 2015-07-07 22:55 UTC (History)
3 users (show)

See Also:


Attachments

Description Tim Mills 2014-09-18 10:57:33 UTC
Under atomization, XPath 3.1 says:

"If the item is a functionDM30 [err:FOTY0012] is raised."

but F&O says:

"A type error is raised [err:FOTY0013] if an item in the sequence $arg is a function item."
Comment 1 Tim Mills 2014-09-23 17:17:29 UTC
f the item is a functionDM31 or map a type error [err:FOTY0012] is raised.

If the item is an array $a, atomization is defined as $a?* ! fn:data(.), which is equivalent to atomizing the members of the array.
Comment 2 Jonathan Robie 2014-09-23 17:17:59 UTC
I will change the language spec to use the F&O error code.
Comment 3 Tim Mills 2014-09-23 17:18:21 UTC
I propose swapping the order to:

* If the item is an array $a, atomization is defined as $a?* ! fn:data(.), which is equivalent to atomizing the members of the array.

* f the item is a functionDM31 or map a type error [err:FOTY0012] is raised.
Comment 4 Jonathan Robie 2014-10-28 18:05:04 UTC
(In reply to Tim Mills from comment #3)
> I propose swapping the order to:
> 
> * If the item is an array $a, atomization is defined as $a?* ! fn:data(.),
> which is equivalent to atomizing the members of the array.
> 
> * If the item is a functionDM31 or map a type error [err:FOTY0012] is raised.

We assume the issue is that an array is a function.  But these bullet points do not imply sequence, so a better fix is:

* If the item is a functionDM31 (other than an array) or map a type error [err:FOTY0012] is raised.
Comment 5 Jonathan Robie 2014-10-28 18:06:55 UTC
The Working Group agreed to resolve this as proposed in comment #4.
Comment 6 Michael Kay 2015-07-06 08:34:07 UTC
The change has not been applied in the current draft of the spec. The text still reads:

[3] If the item is a function1 or map...
[4] If the item is an array...

where the conditional in bullet 4 overrides that in bullet 3.
Comment 7 Josh Spiegel 2015-07-07 22:55:19 UTC
Applied comment 4.