Step

Select a set of nodes starting from a given node-set.


Syntax

Step

graphics/Step.jpg

Description

A step is specified in a location path in order to select a set of nodes relative to a context node. A step can also be specified using an abbreviated syntax.

Compatibility

It corresponds to the expression Step defined in XPath, Section 2.1, Rule 4.

Examples

  • Select all medication nodes that are children of a therapy node that are children of a patient node:

    /patient/therapy/medication
  • Using abbreviated syntax, select all diagnosis elements of the current context node that have a value of "DCI":

    //diagnosis[.='DCI']
  • Using abbreviated syntax, retrieve all diagnosis elements whose parent node has the element symptoms containing the value "headache":

    //diagnosis[../symptoms ~= 'headache']

Related Expressions

AxisSpecifier NodeTest Predicate