use of org.sirix.axis.ChildAxis in project sirix by sirixdb.
the class XPathParser method parseAbbrevForwardStep.
/**
* Parses the the rule AbrevForwardStep according to the following production rule:
* <p>
* [31] AbbrevForwardStep ::= "@"? NodeTest .
* </p>
*
* @return FilterAxis
*/
private AbstractAxis parseAbbrevForwardStep() {
AbstractAxis axis;
boolean isAttribute;
if (is(TokenType.AT, true) || mToken.getContent().equals("attribute") || mToken.getContent().equals("schema-attribute")) {
// in case of .../attribute(..), or .../schema-attribute() the
// default
// axis
// is the attribute axis
axis = new AttributeAxis(getTransaction());
isAttribute = true;
} else {
// default axis is the child axis
axis = new ChildAxis(getTransaction());
isAttribute = false;
}
final Filter filter = parseNodeTest(isAttribute);
return new FilterAxis(axis, filter);
}
Aggregations