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 5597 - [FO] 7.4.2 string-join(): examples unclear with regard to whitespace
Summary: [FO] 7.4.2 string-join(): examples unclear with regard to whitespace
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Functions and Operators 1.0 (show other bugs)
Version: Recommendation
Hardware: Macintosh 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: 2008-04-01 15:37 UTC by Christian Roth
Modified: 2008-04-22 20:03 UTC (History)
0 users

See Also:


Attachments

Description Christian Roth 2008-04-01 15:37:21 UTC
http://www.w3.org/TR/xquery-operators/#func-string-join

The first two examples for string-join() are unclear with regard to whitespace. Currently, they read:

fn:string-join(('Now', 'is', 'the', 'time', '...'), ' ') returns " Now is the time ... ".

There is a space character before "Now" and one after "...". Does this mean that "as a separator" means the separator is put in front of, between and after the $arg1 sequence elements?

fn:string-join(('Blow, ', 'blow, ', 'thou ', 'winter ', 'wind!'), '') returns " Blow, blow, thou winter wind! ".

Again, there is whitespace before "Blow" and after "wind!" - but here, the separator is the empty string. Why is there a single whitespace generated before the first and after the last sequence element?

I suspect the single whitespace at the beginning and end of the samples is an error in both cases, and that the separator is only added between two items of the $arg1 sequence. In this case, the superfluous whitespace should be removed in the examples, since as it is now, it is not totally clear whether it's a bug or a trait of the function.
Comment 1 Michael Kay 2008-04-22 17:28:47 UTC
On 22 April 2008 the WG accepted this bug (the spaces should not appear). The editor was directed to prepare an erratum accordingly.

To the originator: please close the bug if you are content with this resolution.
Comment 2 Michael Kay 2008-04-22 17:46:34 UTC
This will be the subject of erratum E21