<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>5597</bug_id>
          
          <creation_ts>2008-04-01 15:37:21 +0000</creation_ts>
          <short_desc>[FO] 7.4.2 string-join(): examples unclear with regard to whitespace</short_desc>
          <delta_ts>2008-04-22 20:03:46 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>Functions and Operators 1.0</component>
          <version>Recommendation</version>
          <rep_platform>Macintosh</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Christian Roth">roth</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>19677</commentid>
    <comment_count>0</comment_count>
    <who name="Christian Roth">roth</who>
    <bug_when>2008-04-01 15:37:21 +0000</bug_when>
    <thetext>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((&apos;Now&apos;, &apos;is&apos;, &apos;the&apos;, &apos;time&apos;, &apos;...&apos;), &apos; &apos;) returns &quot; Now is the time ... &quot;.

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

fn:string-join((&apos;Blow, &apos;, &apos;blow, &apos;, &apos;thou &apos;, &apos;winter &apos;, &apos;wind!&apos;), &apos;&apos;) returns &quot; Blow, blow, thou winter wind! &quot;.

Again, there is whitespace before &quot;Blow&quot; and after &quot;wind!&quot; - 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&apos;s a bug or a trait of the function.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19910</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2008-04-22 17:28:47 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19912</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2008-04-22 17:46:34 +0000</bug_when>
    <thetext>This will be the subject of erratum E21</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>