List:Commits« Previous MessageNext Message »
From:jon Date:January 14 2006 7:49am
Subject:svn commit - mysqldoc@docsrva: r825 - trunk/refman-5.1
View as plain text  
Author: jstephens
Date: 2006-01-14 08:49:26 +0100 (Sat, 14 Jan 2006)
New Revision: 825

Log:

ExtractValue() - multiple matches.



Modified:
   trunk/refman-5.1/functions.xml

Modified: trunk/refman-5.1/functions.xml
===================================================================
--- trunk/refman-5.1/functions.xml	2006-01-14 05:55:06 UTC (rev 824)
+++ trunk/refman-5.1/functions.xml	2006-01-14 07:49:26 UTC (rev 825)
@@ -11225,10 +11225,24 @@
           matching <replaceable>xpath_expr</replaceable>, and does not
           return any tags that might be contained within the matching
           tag, nor any of their content (see the result returned as
-          <literal>val1</literal> below for an example). If no match for
-          <replaceable>xpath_expr</replaceable> is found, this function
-          returns an empty string.
+          <literal>val1</literal> below for an example).
         </para>
+        
+        <para>
+          If no match for <replaceable>xpath_expr</replaceable> is
+          found, this function returns an empty string.
+          <remark role="todo">
+            [js] Verify what the expected behaviour is before
+            uncommenting:
+          </remark>
+          <!-- An empty string
+          is also returned if <replaceable>xml_frag</replaceable> is not
+          valid XML. If <replaceable>xpath_expr</replaceable> is not a
+          valid XPath expression, then MySQL returns an error. --> If
+          multiple matches are found, then the contents of all matching
+          elements are returned (in the order matched) as a single,
+          space-delimited string.
+        </para>
 
         <remark role="help-description-end"/>
 
@@ -11240,12 +11254,13 @@
     -&gt;    <userinput>ExtractValue('&lt;a&gt;ccc&lt;b&gt;ddd&lt;/b&gt;&lt;/a&gt;', '/a/b') AS val2,</userinput>
     -&gt;    <userinput>ExtractValue('&lt;a&gt;ccc&lt;b&gt;ddd&lt;/b&gt;&lt;/a&gt;', '//b') AS val3,</userinput>
     -&gt;    <userinput>ExtractValue('&lt;a&gt;ccc&lt;b&gt;ddd&lt;/b&gt;&lt;/a&gt;', '/b') AS val4;</userinput>
+    -&gt;    <userinput>ExtractValue('&lt;a&gt;ccc&lt;b&gt;ddd&lt;/b&gt;b&gt;eee&lt;/b&gt;&lt;/a&gt;', '/b') AS val5;</userinput>
 
-+------+------+------+------+
-| val1 | val2 | val3 | val4 |
-+------+------+------+------+
-| ccc  | ddd  | ddd  |      |
-+------+------+------+------+
++------+------+------+------+---------+
+| val1 | val2 | val3 | val4 | val5    |
++------+------+------+------+---------+
+| ccc  | ddd  | ddd  |      | ddd eee |
++------+------+------+------+---------+
 </programlisting>
       </listitem>
 
@@ -11281,6 +11296,11 @@
           <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"/>
 

Thread
svn commit - mysqldoc@docsrva: r825 - trunk/refman-5.1jon14 Jan