<?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>30385</bug_id>
          
          <creation_ts>2018-12-25 14:59:46 +0000</creation_ts>
          <short_desc>[XP31] StringConcatExpr doesn&apos;t clearly define error conditions or its mapping to fn:concat</short_desc>
          <delta_ts>2018-12-25 14:59: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>XPath 3.1</component>
          <version>Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></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="Abel Braaksma">abel.online</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</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>129465</commentid>
    <comment_count>0</comment_count>
    <who name="Abel Braaksma">abel.online</who>
    <bug_when>2018-12-25 14:59:46 +0000</bug_when>
    <thetext>The text under &quot;3.6 String Concatenation Expressions&quot; states:

&quot;String concatenation expressions allow the string representations of values to be concatenated. In XPath 3.1, $a || $b is equivalent to fn:concat($a, $b).&quot;

In similar cases where we refer to a certain function in F&amp;O from XPath we usually do two things:

* Link to that function, to ensure it is clear the F&amp;O 3.1 version is meant
* Add a sentence something like &quot;the same error conditions as for fn:concat&quot; apply to this expression

Also, we don&apos;t explain in depth how a StringConcatExpr is translated to an fn:concat function, but I guess this leads little wiggle room in interpretation anyway.

I noticed that &quot;||&quot; is left-associative, and that &quot;,&quot; (for function arguments) is marked as &quot;neither associative&quot;. This may lead to evaluation-order differences in rare cases, if &quot;||&quot; gets directly translated to fn:concat (though I don&apos;t have an example of this, I just noticed the difference).

In the section &quot;A.4 Precedence Order (Non-Normative)&quot;, it says that for &quot;neither&quot; the associativity is inconsequential, but for &quot;||&quot; is is.

Perhaps the proper way of interpreting this text is to see chained &quot;||&quot; as nested fn:concat#2 calls to ensure its left-associativity.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>