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 28678 - fn:nilled first signature needs to be able to return empty sequence
Summary: fn:nilled first signature needs to be able to return empty sequence
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Functions and Operators 3.1 (show other bugs)
Version: Working drafts
Hardware: PC Windows NT
: P2 minor
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
Depends on:
Reported: 2015-05-22 20:32 UTC by Priscilla Walmsley
Modified: 2016-12-16 19:55 UTC (History)
0 users

See Also:


Description Priscilla Walmsley 2015-05-22 20:32:30 UTC
The first signature of fn:nilled (with no parameters) doesn't allow it to return the empty sequence, but it seems it should allow it.  If $arg is omitted, and the context item is a node but not an element node, it should return the empty sequence according to the rules described.

e.g.  $mydoc/foo/@bar/nilled()
Comment 1 Michael Kay 2015-05-23 19:00:35 UTC
I agree.
Comment 2 Michael Kay 2015-05-29 09:10:38 UTC
Thanks, Priscilla.

I have fixed this, and I decided to deem it editorial, as the specification of the function makes it pretty clear that a return type of "xs:boolean?" is necessary.
Comment 3 Michael Kay 2015-05-29 09:12:06 UTC
By the way, I checked that there are test cases where nilled() with no arguments returns an empty sequence, and there are several.