List:Commits« Previous MessageNext Message »
From:jon Date:January 14 2006 5:55am
Subject:svn commit - mysqldoc@docsrva: r824 - trunk/refman-5.1
View as plain text  
Author: jstephens
Date: 2006-01-14 06:55:06 +0100 (Sat, 14 Jan 2006)
New Revision: 824

Log:

Added a couple more short examples to the XPath funcitons.



Modified:
   trunk/refman-5.1/functions.xml

Modified: trunk/refman-5.1/functions.xml
===================================================================
--- trunk/refman-5.1/functions.xml	2006-01-14 04:26:26 UTC (rev 823)
+++ trunk/refman-5.1/functions.xml	2006-01-14 05:55:06 UTC (rev 824)
@@ -11426,8 +11426,20 @@
           For example, the expression <literal>//b[@id="idB"]</literal>
           matches the second <replaceable>b</replaceable> element in the
           fragment <literal>&lt;a&gt;&lt;b id="idA"/&gt;&lt;c/&gt;&lt;b
-          id="idB"/&gt;&lt;/a&gt;</literal>.
+            id="idB"/&gt;&lt;/a&gt;</literal>. To match against
+          <emphasis>any</emphasis> element having
+          <literal><replaceable>attribute</replaceable>="<replaceable>value</replaceable>"</literal>,
+          use the XPath expression
+          <literal>//*[<replaceable>attribute</replaceable>="<replaceable>value</replaceable>"]</literal>.
         </para>
+        
+        <para>
+          To filter multiple attribute values, simply use multiple
+          attribute-comparison clauses in succession. For example, the
+          expression <literal>//b[@c="x"][@d="y"]</literal> matches the
+          element <literal>&lt;b c="x" d="y"/&gt;</literal> occurring
+          anywhere in a given XML fragment.
+        </para>
       </listitem>
 
     </itemizedlist>

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