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 25443 - [F+O 3.1] string() applied to a sequence
Summary: [F+O 3.1] string() applied to a sequence
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Functions and Operators 3.1 (show other bugs)
Version: Last Call drafts
Hardware: PC All
: 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: 2014-04-24 14:18 UTC by Michael Kay
Modified: 2014-09-15 09:22 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2014-04-24 14:18:30 UTC
In the current 3.1 draft it is proposed that string() when applied to a sequence should do a string-join(). I don't recall the precise logic for this but it arose from some use case involving arrays.

Whatever the merits, we should note the incompatibility with XPath 1.0 which is still very widely used and will probably remain so: in XPath 1.0, string() applied to a sequence (set) of nodes outputs the string-value of the first node in the sequence.
Comment 1 Michael Kay 2014-05-06 17:02:09 UTC
The WG was persuaded that the incompatibility with XPath 1.0 was undesirable, and decided that string() should revert to its 3.0 specification, that is, it should not do an implicit string-join() over a sequence.
Comment 2 Michael Kay 2014-09-15 09:22:16 UTC
In reviewing whether to close this, I spotted that a couple of examples had not been changed as a result of this decision, and that the Note was now misleading. I have made the required changes.