[Bug 5597] 7.4.2 string-join(): examples unclear with regard to whitespace

           Summary: 7.4.2 string-join(): examples unclear with regard to
                    whitespace
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: Macintosh
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Functions and Operators
        AssignedTo: mike@saxonica.com
        ReportedBy: roth@visualclick.de
         QAContact: public-qt-comments@w3.org


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.

Received on Friday, 4 April 2008 09:59:07 UTC