AbbreviatedAxisSpecifier

Indicates the axis to be used for selecting nodes in a path expression.


Syntax

AbbreviatedAxisSpecifier

@?

Description

If empty, AbbreviatedAxisSpecifier indicates the child axis. If it is @, it indicates the attribute axis.

Compatibility

It corresponds to the expression AbbreviatedAxisSpecifier defined in XPath, Section 2.5, Rule 13.

Examples

  • Select the grade of a patient's next of kin. The last step of the location path contains the abbreviated axis specifier @ plus the name of an attribute node, which would be ./attribute::grade in the unabbreviated syntax.

    /patient/nextofkin/@grade
  • Select the name of a patient's next of kin. The last step of the location path contains the empty abbreviated axis specifier plus the name of a child node, which would be ./child::name in the unabbreviated syntax.

    /patient/nextofkin/name

Related Expressions

AxisSpecifier RelativeLocationPath Step