Author: jstephens
Date: 2008-03-02 11:11:26 +0100 (Sun, 02 Mar 2008)
New Revision: 10096
Log:
Cleaned up inexact usage of "valid XML"/"well-formed XML"
(Thanks, Paul!)
Modified:
trunk/refman-5.1/functions-core.xml
trunk/refman-6.0/functions-core.xml
Modified: trunk/refman-5.1/functions-core.xml
===================================================================
--- trunk/refman-5.1/functions-core.xml 2008-03-02 09:44:48 UTC (rev 10095)
+++ trunk/refman-5.1/functions-core.xml 2008-03-02 10:11:26 UTC (rev 10096)
Changed blocks: 4, Lines Added: 17, Lines Deleted: 12; 3145 bytes
@@ -13467,10 +13467,10 @@
(including the implicit <literal>/text()</literal>) —
for whatever reason, as long as
<replaceable>xpath_expr</replaceable> is valid, and
- <replaceable>xml_frag</replaceable> is well-formed — an
- empty string is returned. No distinction is made between a
- match on an empty element and no match at all. This is by
- design.
+ <replaceable>xml_frag</replaceable> consists of elements which
+ are properly nested and closed — an empty string is
+ returned. No distinction is made between a match on an empty
+ element and no match at all. This is by design.
</para>
<para>
@@ -13561,8 +13561,9 @@
<para>
Beginning with MySQL 5.1.12, <literal>NULL</literal> is
- returned if <replaceable>xml_frag</replaceable> is invalid
- XML, and a warning is generated, as shown in this example:
+ returned if <replaceable>xml_frag</replaceable> contains
+ elements which are not properly nested or closed, and a
+ warning is generated, as shown in this example:
</para>
<programlisting>
@@ -14221,17 +14222,19 @@
<para>
For both <function role="sql">ExtractValue()</function> and
<function role="sql">UpdateXML()</function>, the XPath locator
- used must be valid and the XML to be searched must be
- well-formed. If the locator is invalid, an error is generated:
+ used must be valid and the XML to be searched must consist of
+ elements which are properly nested and closed. If the locator is
+ invalid, an error is generated:
<programlisting>
mysql> <userinput>SELECT ExtractValue('<a>c</a><b/>', '/&a');</userinput>
<errortext>ERROR 1105 (HY000): XPATH syntax error: '&a'</errortext>
</programlisting>
- If <replaceable>xml_frag</replaceable> is invalid XML, then,
- beginning with MySQL 5.1.12, <literal>NULL</literal> is
- returned, and a warning is generated, as shown in this example:
+ If <replaceable>xml_frag</replaceable> does not consist of
+ elements which are properly nested and closed, then
+ <literal>NULL</literal> is returned, and a warning is generated,
+ as shown in this example:
<programlisting>
mysql> <userinput>SELECT ExtractValue('<a>c</a><b', '//a');</userinput>
@@ -14266,7 +14269,9 @@
<para>
The replacement XML used as the third argument to
<function role="sql">UpdateXML()</function> is
- <emphasis>not</emphasis> checked for well-formedness.
+ <emphasis>not</emphasis> checked to determine whether it
+ consists solely of elements which are properly nested and
+ closed.
</para>
</important>
</para>
Modified: trunk/refman-6.0/functions-core.xml
===================================================================
--- trunk/refman-6.0/functions-core.xml 2008-03-02 09:44:48 UTC (rev 10095)
+++ trunk/refman-6.0/functions-core.xml 2008-03-02 10:11:26 UTC (rev 10096)
Changed blocks: 4, Lines Added: 15, Lines Deleted: 10; 2860 bytes
@@ -13891,10 +13891,10 @@
(including the implicit <literal>/text()</literal>) —
for whatever reason, as long as
<replaceable>xpath_expr</replaceable> is valid, and
- <replaceable>xml_frag</replaceable> is well-formed — an
- empty string is returned. No distinction is made between a
- match on an empty element and no match at all. This is by
- design.
+ <replaceable>xml_frag</replaceable> consists of elements which
+ are properly nested and closed — an empty string is
+ returned. No distinction is made between a match on an empty
+ element and no match at all. This is by design.
</para>
<para>
@@ -13983,8 +13983,9 @@
<para>
<literal>NULL</literal> is returned if
- <replaceable>xml_frag</replaceable> is invalid XML, and a
- warning is generated, as shown in this example:
+ <replaceable>xml_frag</replaceable> contains elements which
+ are not properly nested or closed, and a warning is generated,
+ as shown in this example:
</para>
<programlisting>
@@ -14628,15 +14629,17 @@
<para>
For both <function role="sql">ExtractValue()</function> and
<function role="sql">UpdateXML()</function>, the XPath locator
- used must be valid and the XML to be searched must be
- well-formed. If the locator is invalid, an error is generated:
+ used must be valid and the XML to be searched must consist of
+ elements which are properly nested and closed. If the locator is
+ invalid, an error is generated:
<programlisting>
mysql> <userinput>SELECT ExtractValue('<a>c</a><b/>', '/&a');</userinput>
<errortext>ERROR 1105 (HY000): XPATH syntax error: '&a'</errortext>
</programlisting>
- If <replaceable>xml_frag</replaceable> is invalid XML, then
+ If <replaceable>xml_frag</replaceable> does not consist of
+ elements which are properly nested and closed, then
<literal>NULL</literal> is returned, and a warning is generated,
as shown in this example:
@@ -14670,7 +14673,9 @@
<para>
The replacement XML used as the third argument to
<function role="sql">UpdateXML()</function> is
- <emphasis>not</emphasis> checked for well-formedness.
+ <emphasis>not</emphasis> checked to determine whether it
+ consists solely of elements which are properly nested and
+ closed.
</para>
</important>
</para>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r10096 - in trunk: refman-5.1 refman-6.0 | jon | 2 Mar |