AbsolutePathExpr

Select nodes on the absolute path.


Syntax

AbsolutePathExpr

graphics/AbsolutePathExpr.png

RelativePathExpr RelativePathExpr

Description

An AbsolutePathExpr is a path expression originating in the document root /. There are two variants depending whether the path directly begins at the document node using /, or whether there is an initial sequence of nodes in front of the relative path expression that follows, which is the case for //.

An initial / in an AbsolutePathExpr is short for the step fn:root(self::node()). The path begins with the root node that contains the context node. An initial // is an abbreviation for the steps fn:root(self::node())/descendant-or-self::node(). A node sequence is created that contains all the nodes in the same hierarchy as the context node. For both variants of this expression it is an error if the context item is not a node.

Related Syntax Construct

The following construct(s) refer to this construct:

This construct is also related to the following construct(s):

RelativePathExpr