List:Commits« Previous MessageNext Message »
From:jon Date:June 7 2006 2:43pm
Subject:svn commit - mysqldoc@docsrva: r2300 - trunk/refman-5.1
View as plain text  
Author: jstephens
Date: 2006-06-07 14:43:24 +0200 (Wed, 07 Jun 2006)
New Revision: 2300

Log:
UpdateXML() returns the original target in the event of multiple matches.

Fixes Docs Bug #18128. (Thanks, Bar!)

Modified:
   trunk/refman-5.1/functions.xml

Modified: trunk/refman-5.1/functions.xml
===================================================================
--- trunk/refman-5.1/functions.xml	2006-06-07 12:07:52 UTC (rev 2299)
+++ trunk/refman-5.1/functions.xml	2006-06-07 12:43:24 UTC (rev 2300)
@@ -11647,23 +11647,19 @@
         <remark role="help-description-begin"/>
 
         <para>
-          This function replaces a portion of a given fragment of XML
-          markup <replaceable>xml_target</replaceable> with a new XML
-          fragment <replaceable>new_xml</replaceable> and then returns
-          the changed XML. The portion of
-          <replaceable>xml_target</replaceable> that is replaced matches
+          This function replaces a single portion of a given fragment of
+          XML markup <replaceable>xml_target</replaceable> with a new
+          XML fragment <replaceable>new_xml</replaceable>, and then
+          returns the changed XML. The portion of
+          <replaceable>xml_target</replaceable> that is replaced matches 
           an XPath expression <replaceable>xpath_expr</replaceable>
           supplied by the user. If no expression matching
-          <replaceable>xpath_expr</replaceable> is found, the function
-          returns the original <replaceable>xml_target</replaceable> XML
-          fragment. All three arguments must be strings.
+          <replaceable>xpath_expr</replaceable> is found, or if multiple
+          matches are found, the function returns the original
+          <replaceable>xml_target</replaceable> XML fragment. All three
+          arguments must be strings.
         </para>
 
-        <remark role="todo">
-          [js] Determine the expected behaviour in the event of multiple
-          matches and document here.
-        </remark>
-
         <remark role="help-description-end"/>
 
         <remark role="help-example"/>
@@ -11673,7 +11669,8 @@
     -&gt; <userinput> 
UpdateXML('&lt;a&gt;&lt;b&gt;ccc&lt;/b&gt;&lt;d&gt;&lt;/d&gt;&lt;/a&gt;',
'/a', '&lt;e&gt;fff&lt;/e&gt;') AS val1,</userinput>
     -&gt; <userinput> 
UpdateXML('&lt;a&gt;&lt;b&gt;ccc&lt;/b&gt;&lt;d&gt;&lt;/d&gt;&lt;/a&gt;',
'/b', '&lt;e&gt;fff&lt;/e&gt;') AS val2,</userinput>
     -&gt; <userinput> 
UpdateXML('&lt;a&gt;&lt;b&gt;ccc&lt;/b&gt;&lt;d&gt;&lt;/d&gt;&lt;/a&gt;',
'//b', '&lt;e&gt;fff&lt;/e&gt;') AS val3,</userinput>
-    -&gt; <userinput> 
UpdateXML('&lt;a&gt;&lt;b&gt;ccc&lt;/b&gt;&lt;d&gt;&lt;/d&gt;&lt;/a&gt;',
'/a/d', '&lt;e&gt;fff&lt;/e&gt;') AS val4</userinput>
+    -&gt; <userinput> 
UpdateXML('&lt;a&gt;&lt;b&gt;ccc&lt;/b&gt;&lt;d&gt;&lt;/d&gt;&lt;/a&gt;',
'/a/d', '&lt;e&gt;fff&lt;/e&gt;') AS val4,</userinput>
+    -&gt; <userinput> 
UpdateXML('&lt;a&gt;&lt;d&gt;&lt;/d&gt;&lt;b&gt;ccc&lt;/b&gt;&lt;d&gt;&lt;/d&gt;&lt;/a&gt;',
'/a/d', '&lt;e&gt;fff&lt;/e&gt;') AS val5</userinput>
     -&gt; <userinput>\G</userinput>
 
 *************************** 1. row ***************************
@@ -11681,6 +11678,7 @@
 val2:
&lt;a&gt;&lt;b&gt;ccc&lt;/b&gt;&lt;d&gt;&lt;/d&gt;&lt;/a&gt;
 val3:
&lt;a&gt;&lt;e&gt;fff&lt;/e&gt;&lt;d&gt;&lt;/d&gt;&lt;/a&gt;
 val4:
&lt;a&gt;&lt;b&gt;ccc&lt;/b&gt;&lt;e&gt;fff&lt;/e&gt;&lt;/a&gt;
+val5:
&lt;a&gt;&lt;d&gt;&lt;/d&gt;&lt;b&gt;ccc&lt;/b&gt;&lt;d&gt;&lt;/d&gt;&lt;/a&gt;
 </programlisting>
       </listitem>
 

Thread
svn commit - mysqldoc@docsrva: r2300 - trunk/refman-5.1jon7 Jun