diff --git a/specifications/xpath-functions-40/src/function-catalog.xml b/specifications/xpath-functions-40/src/function-catalog.xml
index 19666dac7..241eecc83 100644
--- a/specifications/xpath-functions-40/src/function-catalog.xml
+++ b/specifications/xpath-functions-40/src/function-catalog.xml
@@ -13381,6 +13381,7 @@ else QName("", $value)
Returns a path expression that can be used to select the supplied node relative to the
root of its containing document. The behavior of the function if the argument is omitted is exactly the same as if the
+ The behavior of the function if the If The If Otherwise, the function returns a string that consists of a sequence of steps, one
- for each ancestor-or-self of If the root node is not a document node then this string is preceded by
+ a string notionally representing a call to the If the If the Otherwise, Each step consists of the character For an element node,
- For an element node, then by default
+ The suffix If the If there is more than one such prefix, then one of them is chosen arbitrarily. If the namespace prefix is the zero-length string, then the If the prefix is an NCName P, then the For an attribute node: if the node is in no namespace, If the node is in no namespace, otherwise, Otherwise, by default $node
argument is omitted is exactly the same as if the
context value (.
) had been passed as the argument.$node
is the empty sequence, the function returns the empty sequence.$options
argument, if present, defines additional parameters controlling
+ how the output is formatted. The Q{uri}local
notation.
+ $node
is a document node, the function returns the string
"/"
.$node
other than the root node. This string is
- prefixed by "Q{http://www.w3.org/2005/xpath-functions}root()"
if the root
- node is not a document node. Each step consists of the character "/"
+ for each ancestor-or-self of $node
other than the root node.fn:root
function,
+ expressed as follows:namespaces
option is present and defines a mapping from a
+ non empty prefix P
+ to the namespace URI http://www.w3.org/2005/xpath-functions
, then
+ "P:root()"
namespaces
option is present and defines a mapping from the empty string
+ to the namespace URI http://www.w3.org/2005/xpath-functions
, then
+ "root()"
"Q{http://www.w3.org/2005/xpath-functions}root()"
."/"
followed by a string whose form depends on the kind of node selected by that step, as
follows:Q{
,
- where
is the namespace URI of the node name or the
- empty string if the node is in no namespace,
is
- the local part of the node name, and
is an
- integer representing the position of the selected node among its like-named
+ Q{uri}local[position]
,
+ where uri is the namespace URI of the node name or the
+ empty string if the node is in no namespace, local is
+ the local part of the node name, and position is an
+ integer representing the one-based position of the selected node among its like-named
siblings.[position]
is omitted if the indexes
+ option is present with the value false
.namespaces
option is present, and if it includes a mapping
+ from a namespace prefix to the namespace URI of the element, or to the empty string
+ if the element is in no namespace, then:Q{uri}
part of the step is
+ replaced by the empty string.Q{uri}
part of the step is
+ replaced by P:
.@
, where
-
is the local part of the node name@
, where
+
is the local part of the node name.@Q{
, where
+ @Q{
, where
is the namespace URI of the node name,
- and
is the local part of the node name
is the local part of the node name.
If the namespaces
option is present , and if it includes a mapping
+ from a non-empty namespace prefix to the namespace URI of the attribute, then
+ the Q{uri}
part of the step is replaced with a namespace
+ prefix in the same way as for element nodes, described above.
For a text node: text()[
where
-
is an integer representing the position
- of the selected node among its text node siblings
For a text node: text()[position]
where
+ position
is an integer representing the position
+ of the selected node among its text node siblings.
The suffix [position]
is omitted if the indexes
+ option is present with the value false
.
For a comment node: comment()[
where
+
For a comment node: comment()[position]
where
is an integer representing the position
- of the selected node among its comment node siblings
The suffix [position]
is omitted if the indexes
+ option is present with the value false
.
For a processing-instruction node:
- processing-instruction(
+ processing-instruction(local)[position]
where
is the name of the processing instruction
node and
is an integer representing the
position of the selected node among its like-named processing-instruction node
- siblings
The suffix [position]
is omitted if the indexes
+ option is present with the value false
.
For a namespace node:
@@ -13462,14 +13529,16 @@ else QName("", $value) namespace node (which represents the namespace prefix).If the namespace node has no name (that is, it represents the default +
If the namespace node has no name (that is, if it represents the default
namespace):
- namespace::*[Q{http://www.w3.org/2005/xpath-functions}local-name() = ""]
namespace::*[Ulocal-name() = ""]
+ Here Ulocal-name()
represents a call on the function
+ fn:local-name
and is formatted using the same
+ conventions as the call on fn:root
described earlier.
The following errors may be raised when $node
is omitted:
Using the namespaces
option to shorten the generated path is often convenient,
+ but the resulting path may be unusable if the input tree contains multiple bindings for the same prefix.
A map returned by fn:in-scope-namespaces
will never contain an entry that maps any prefix
+ to the zero-length URI. Such an entry can, however, be added manually, and can be used to control how
+ no-namespace names are represented in the output (including the option of giving them a non-empty prefix).
Options are added to customize the form of the output.
+The $options
argument, if present, defines additional parameters controlling
- how the comparison is done. If it is supplied as a map, then he
For backwards compatibility reasons, the $options
argument can also be set
to a string containing a collation name. Supplying a string $S
for this argument is equivalent