[Bug 29119] [XP31] xs:error always raises a type error

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29119

--- Comment #4 from Jonathan Robie <jonathan.robie@gmail.com> ---
(In reply to Abel Braaksma from comment #3)
> > let $e as xs:error := xs:error()
> > return 12


This sentence is part of a paragraph that addresses more than just dynamic
values:

<quote>
xs:error is a subtype of all simple types, and a supertype only of itself.
xs:error? and xs:error* are identical to empty-sequence(). A variable binding
with a type declaration xs:error always raises a type error.
</quote>

The same text occurs in XQuery 3.0:

http://www.w3.org/TR/xquery-30/#id-xs-error

It's been in versions of the spec since June 2013. Changing this now would
affect implementations of XQuery 3.0, so I would oppose changing this in
XQuery.

> > which is XQuery, not XPath.
> 
> Indeed. Is the text from comment#0 agnostic? I.e. is it supposed to apply to
> XSLT or other host languages as well that support typed variable bindings?

XPath describes only the XPath syntax. I suspect this sentence should not
appear in the XPath specification.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Monday, 28 September 2015 20:21:33 UTC