AbbreviatedStep

Select the context node or its parent node.


Syntax

AbbreviatedStep

. | ..

Description

You can use an AbbreviatedStep to indicate either the context node by using the symbol "." or the parent node of the context node by using the symbol "..". The symbol "." is short for self::node(), and ".." is short for parent::node().

Compatibility

It corresponds to the expression AbbreviatedStep defined in XPath, Section 2.5, Rule 12.

Examples

  • Select all DCI diagnoses (select all diagnosis elements of the current context node that have a value of "DCI"):

    //diagnosis[.='DCI']
  • Select all diagnoses that have a headache as symptom (select all diagnosis elements whose parent node has the element symptoms containing the value "headache"):

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

Related Expression

Step