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 29570 - [FO31] 19.3.6 Casting to list types
Summary: [FO31] 19.3.6 Casting to list types
Status: CLOSED DUPLICATE of bug 27777
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Functions and Operators 3.1 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-11 16:00 UTC by Tim Mills
Modified: 2016-07-21 15:21 UTC (History)
1 user (show)

See Also:


Attachments

Description Tim Mills 2016-04-11 16:00:28 UTC
In FO31 19.3.6 Casting to list type,s, it is written:

"For example, given a user-defined type my:coordinates defined as a list of xs:integer with the facet <xs:length value="3"/>, the expression my:coordinates("2 -1") will return a sequence of two xs:integer values (2, -1), while the expression my:coordinates("1 2 3") will result in a dynamic error because the length of the list does not conform to the length facet. The expression my:coordinates("1.0 3.0") will also fail because the strings 1.0 and 3.0 are not in the lexical space of xs:integer."

With <xs:length value="3"/>, shouldn't my:coordinates("2 -1") fail and my:coordinates("1 2 3") succeed?  Note this also appears in F&O3.0.

It might be worth noting that in the minLength is 0, then my:list("") will return the empty sequence (or am I mistaken?)
Comment 1 Andrew Coleman 2016-04-22 08:22:13 UTC
At the meeting on 2016-04-19, the WG decided this was an editorial error.  Action A-640-01 was raised to track the fix.
Comment 2 Michael Kay 2016-04-26 13:48:04 UTC
I'm a bit confused by the sequence of events here, but this is fixed in the editor's draft of 22 March 2016. Perhaps I spotted the problem independently.
Comment 3 Michael Kay 2016-04-26 13:57:10 UTC

*** This bug has been marked as a duplicate of bug 27777 ***