AxisSpecifier

The name of an axis or an abbreviation for it.


Syntax

AxisSpecifier

AxisName :: | AbbreviatedAxisSpecifier

Description

In a location step, an AxisSpecifier determines the initial node set originating in the context node. In practice it means that you navigate through a document tree in a certain direction that is specified by the axis. In the unabbreviated XPath syntax, you can use an AxisName to determine the direction of navigation (for example child:: selects the axis of child nodes in document order starting at the context node).

Since unabbreviated axis specifiers are not supported in X-Query, you can alternatively use an AbbreviatedAxisSpecifier to select the child axis (AbbreviatedAxisSpecifier is empty) or the attribute axis (AbbreviatedAxisSpecifier is "@"). You can further use a SequenceExpr to simulate navigation on the axes following-sibling and preceding-sibling.

Compatibility

It corresponds to the expression AxisSpecifier defined in XPath, Section 2.1, Rule 5, with the restriction that AxisName is not supported in X-Query.

Example

Select all medication that has been administered in the form of tablets (starting from the root node select all descendant type nodes that satisfy the following predicate expression: the value of the form node on the attribute axis equals the string value "tablet"):

//type[@form = 'tablet']

Related Expression

Step