<?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>29522</bug_id>
          
          <creation_ts>2016-03-09 18:09:14 +0000</creation_ts>
          <short_desc>fn:replace() with q flag</short_desc>
          <delta_ts>2016-03-21 23:01:25 +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 3.1</component>
          <version>Working drafts</version>
          <rep_platform>PC</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="Debbie Lockett">debbie</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          <cc>andrew_coleman</cc>
          
          <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>125416</commentid>
    <comment_count>0</comment_count>
    <who name="Debbie Lockett">debbie</who>
    <bug_when>2016-03-09 18:09:14 +0000</bug_when>
    <thetext>The error conditions under 5.6.3 fn:replace which raise err:FORX0004 should only be raised if the q flag has not been set, so it would be useful to add this condition to the descriptions. Currently these state:

A dynamic error is raised [err:FORX0004] if the value of $replacement contains a &quot;$&quot; character that is not immediately followed by a digit 0-9 and not immediately preceded by a &quot;\&quot;.

A dynamic error is raised [err:FORX0004] if the value of $replacement contains a &quot;\&quot; character that is not part of a &quot;\\&quot; pair, unless it is immediately followed by a &quot;$&quot; character.


See the example under the section about the q flag in 5.6.1.1 Flags (which expects some output not an error): 
fn:replace(&quot;a/b/c&quot;, &quot;/&quot;, &quot;$&quot;, &quot;q&quot;) returns &quot;a$b$c&quot;

[I will add this example (and others) as test cases to the QT3 fn-replace test set in anticipation of this clarification; see fn-replace-49 to 53.]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125565</commentid>
    <comment_count>1</comment_count>
    <who name="Andrew Coleman">andrew_coleman</who>
    <bug_when>2016-03-18 14:55:21 +0000</bug_when>
    <thetext>At the meeting on 2016-03-15, the WG agreed to resolve this by clarifying the error conditions do not apply when the ‘q’ flag is not present.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125576</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-03-21 18:07:18 +0000</bug_when>
    <thetext>The changes have been applied.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>