List:Commits« Previous MessageNext Message »
From:jon Date:January 17 2006 1:58pm
Subject:svn commit - mysqldoc@docsrva: r866 - trunk/refman-5.1
View as plain text  
Author: jstephens
Date: 2006-01-17 14:58:23 +0100 (Tue, 17 Jan 2006)
New Revision: 866

Log:

xml-functions:

- Added a couple more limitations.
- Added some more general info about XPath expressions.



Modified:
   trunk/refman-5.1/functions.xml

Modified: trunk/refman-5.1/functions.xml
===================================================================
--- trunk/refman-5.1/functions.xml	2006-01-17 13:44:45 UTC (rev 865)
+++ trunk/refman-5.1/functions.xml	2006-01-17 13:58:23 UTC (rev 866)
@@ -11226,9 +11226,10 @@
         <para>
           This function takes two string arguments, a fragment of XML
           markup <replaceable>xml_frag</replaceable> and an XPath
-          expression <replaceable>xpath_expr</replaceable>, and returns
-          the value matched by <replaceable>xpath_expr</replaceable>.
-          Note that <literal>ExtractValue()</literal> returns only the
+          expression <replaceable>xpath_expr</replaceable> (also known
+          as a <firstterm>locator</firstterm>), and returns the value
+          matched by <replaceable>xpath_expr</replaceable>. Note that
+          <literal>ExtractValue()</literal> returns only the
           <literal>CDATA</literal> that is contained directly by the tag
           matching <replaceable>xpath_expr</replaceable>, and does not
           return any tags that might be contained within the matching
@@ -11448,6 +11449,16 @@
           root element.
         </para>
       </listitem>
+      
+      <listitem>
+        <para>
+          Multiple locators may be matched using the
+          <literal>|</literal> (logical <literal>OR</literal>) operator.
+          For example, the expression <literal>//b|//c</literal> matches
+          all <replaceable>b</replaceable> and
+          <replaceable>c</replaceable> elements in the XML target.
+        </para>
+      </listitem>
 
       <listitem>
         <para>
@@ -11471,6 +11482,16 @@
           element <literal>&lt;b c="x" d="y"/&gt;</literal> occurring
           anywhere in a given XML fragment.
         </para>
+        
+        <para>
+          To find elements for which the same attribute matches one of
+          several values, you must use multiple locators joined by the
+          <literal>|</literal> operator. For example, to match all
+          <replaceable>b</replaceable> elements whose
+          <replaceable>c</replaceable> attributes have either of the
+          values 23 or 17, use the expression
+          <literal>//b[@c="23"]|b[@c="17"]</literal>.          
+        </para>
       </listitem>
 
     </itemizedlist>
@@ -11480,8 +11501,9 @@
       scope of this Manual. Please see the
       <ulink url="http://www.w3.org/TR/xpath">XML Path Language (XPath)
       1.0 standard</ulink> for definitive information. A useful resource
-      for those new to XPath or wishing a refresher in the basics is the
-      <ulink url="http://www.zvon.org/xxl/XPathTutorial/">Zvon.org XPath
+      for those new to XPath or who are wishing a refresher in the
+      basics is the 
+      <ulink url="http://www.zvon.org/xxl/XPathTutorial/">Zvon.org XPath 
       Tutorial</ulink>, which is available in several languages.
     </para>
 
@@ -11499,9 +11521,25 @@
           comparisons of the form
           <literal>[@<replaceable>attribute</replaceable>="<replaceable>const</replaceable>"]</literal>,
           where <replaceable>const</replaceable> is a constant value,
-          are currently possible.
+          are currently possible. Note that equality and inequality
+          (<literal>=</literal> and (<literal>!=</literal>)) are the
+          only supported comparison operators. 
         </para>
       </listitem>
+      
+      <listitem>
+        <para>
+          Relative locator expressions are not supported. XPath
+          expressions must begin with <literal>/</literal> or
+          <literal>//</literal>.
+        </para>
+      </listitem>
+      
+      <listitem>
+        <para>
+          The <literal>::</literal> operator is not supported.
+        </para>
+      </listitem>
 
       <listitem>
         <para>

Thread
svn commit - mysqldoc@docsrva: r866 - trunk/refman-5.1jon17 Jan