Author: shawkins
Date: 2011-02-27 23:10:39 -0500 (Sun, 27 Feb 2011)
New Revision: 2949
Modified:
trunk/documentation/reference/src/main/docbook/en-US/content/scalar_functions.xml
Log:
updating xpathValue doc based on forum posting
Modified:
trunk/documentation/reference/src/main/docbook/en-US/content/scalar_functions.xml
===================================================================
---
trunk/documentation/reference/src/main/docbook/en-US/content/scalar_functions.xml 2011-02-25
20:40:17 UTC (rev 2948)
+++
trunk/documentation/reference/src/main/docbook/en-US/content/scalar_functions.xml 2011-02-28
04:10:39 UTC (rev 2949)
@@ -2062,7 +2062,16 @@
string value for the first matching result.</para>
<para><synopsis>XPATHVALUE(doc, xpath)</synopsis></para>
<para>Doc and xpath in {string, clob, xml}. Return value is a
string.</para>
- <para>An attempt is made to provide a meaningful result for non-text
nodes.</para>
+ <para>Matching a non-text node will still produce a string result, which
includes all descendent text nodes.</para>
+ <example>
+ <title>Sample xpathValue Ignoring Namespaces</title>
+ <para>XML value:</para>
+ <programlisting language="XML"><![CDATA[<?xml
version="1.0" ?><ns1:return
xmlns:ns1="http://com.test.ws/exampleWebService">Hello<x>
World</x></return>]]></programlisting>
+ <para>Function:</para>
+ <programlisting language="SQL">xpathValue(value,
'/*[local-name()="return"])</programlisting>
+ <para>Results in 'Hello World'</para>
+ </example>
+ <para>See also <xref linkend="xmlquery"/></para>
</section>
</section>
<section>