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 @@
-> <userinput>
UpdateXML('<a><b>ccc</b><d></d></a>',
'/a', '<e>fff</e>') AS val1,</userinput>
-> <userinput>
UpdateXML('<a><b>ccc</b><d></d></a>',
'/b', '<e>fff</e>') AS val2,</userinput>
-> <userinput>
UpdateXML('<a><b>ccc</b><d></d></a>',
'//b', '<e>fff</e>') AS val3,</userinput>
- -> <userinput>
UpdateXML('<a><b>ccc</b><d></d></a>',
'/a/d', '<e>fff</e>') AS val4</userinput>
+ -> <userinput>
UpdateXML('<a><b>ccc</b><d></d></a>',
'/a/d', '<e>fff</e>') AS val4,</userinput>
+ -> <userinput>
UpdateXML('<a><d></d><b>ccc</b><d></d></a>',
'/a/d', '<e>fff</e>') AS val5</userinput>
-> <userinput>\G</userinput>
*************************** 1. row ***************************
@@ -11681,6 +11678,7 @@
val2:
<a><b>ccc</b><d></d></a>
val3:
<a><e>fff</e><d></d></a>
val4:
<a><b>ccc</b><e>fff</e></a>
+val5:
<a><d></d><b>ccc</b><d></d></a>
</programlisting>
</listitem>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r2300 - trunk/refman-5.1 | jon | 7 Jun |