QualifiersThere are several axis qualifiers: parent Type1/parent::Type2 means that node of type Type1 has a parent of type Type2 ancestor Type1/ancestor::Type2 means that node of type Type1 has an ancestor of type Type2 descendant Type1/descendant::Type2 means that node of type Type1 has a descendant of type Type2 descendant-or-self Type1/descendant-or-self::Type2 means that 1) Type1 is a supertype for type Type2, or 2) node of type Type1 has a descendant of type Type2. In particular, this axis can be useful if '*' is used in place of Type1. following-sibling Type1/following-sibling::Type2 means that two nodes belong to the same list child, and the node whose type is Type2 follows the node of type Type1 in this list (immediately or transitively) next-sibling Type1/next-sibling::Type2 means that two nodes belong to the same list child, and the node whose type is Type2 immediately follows the node of type Type1 in this list child_name Type1/<child_name>::Type2 means that the child child_name of Type1 node is of type Type2. If there are no AST types with such a child, an error is reported sibling_indexafter a child name Type1/<child name>[<sibling_index>]::Type2 means that node of type Type1 is the sibling_index-th element of list child of node whose type is Type2 sibling qualifierafter a child name //ExprCall/Params[*]::ExprBinary If an asterisk is specified between square brackets (instead of a number), the first matching element of the corresponding list child is taken. The expression above is matched if the function call has at least one argument of type 'ExprBinary'. |