Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
A ___location path is an XPath expression used for selecting a set of nodes relative to the context node. The evaluation of a ___location path expression results in a node-set containing the nodes specified by the ___location path. A ___location path can recursively contain expressions used to filter sets of nodes.
Syntactically, a ___location path consists of one or more ___location steps, each separated by a forward slash (/
):
locationstep/locationstep/locationstep
Each ___location step in turn selects a set of nodes relative to the context node — that is, to the node selected by the preceding ___location step. A ___location path expressed this way is a relative ___location path. An absolute ___location path starts from the root element:
/locationstep/locationstep/locationstep
In a ___location path, ___location steps are evaluated from left to right. The leftmost ___location step selects a set of nodes relative to the context node. These nodes then become the context used to process the next ___location step. This processing of steps and updating of the context node repeats itself until all the ___location steps have been processed.
A ___location path can be unabbreviated or abbreviated.
In an unabbreviated ___location path, a ___location step has the following syntax:
axis::node-test[predicate]
In this syntax, axis
specifies how the nodes selected by the ___location step are related to the context node; node-test
specifies the node type and expanded name of the nodes selected by the ___location step; and predicate
is a filter expression to further refine the selection of nodes in the ___location step. Predicates are optional. In this case, a ___location step consists of axis::
and node-test
only. The following table provides some examples.
Unabbreviated Location Path | Description |
---|---|
|
Selects the last |
|
Selects the |
|
Selects all text node children of the context node. |
|
Selects the |
In an abbreviated ___location path, the axis specifier, axis::
, is not expressed explicitly in a ___location step, but implied by a set of shot cuts instead. The following table provides some examples.
Abbreviated Location Path | Description |
---|---|
|
Selects the |
|
Selects the |
|
Selects all text node children of the context node. |
|
Selects the |
The following is a summary of some of the abbreviations:
Unabbreviated | Abbreviated |
---|---|
|
|
|
|
|
|
|
|
|
|
In This Section
The following topics discuss in detail the syntax and usage of the pieces of ___location paths.