Go to standard

XPath construct: nodeset axis? nodeTest predicate*

Standard excerpt:

A location step has three parts: * an axis, which specifies the tree relationship between the nodes selected by the location step and the context node, * a node test, which specifies the node type and expanded-name of the nodes selected by the location step, and * zero or more predicates, which use arbitrary expressions to further refine the set of nodes selected by the location step.

The syntax for a location step is the axis name and node test separated by a double colon, followed by zero or more expressions each in square brackets. For example, in child::para[position()=1], child is the name of the axis, para is the node test and [position()=1] is a predicate.

The node-set selected by the location step is the node-set that results from generating an initial node-set from the axis and node-test, and then filtering that node-set by each of the predicates in turn.

Examples (xslt:xml):

Interactive xlab: [xsl:value-of] [xsl:template]