Select the context node or its parent node.
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()
.
It corresponds to the expression AbbreviatedStep
defined in
XPath, Section
2.5, Rule 12.
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']
Step |