use of org.sirix.axis.filter.WildcardFilter.EType in project sirix by sirixdb.
the class XPathParser method parseWildcard.
/**
* Parses the the rule Wildcard according to the following production rule:
* <p>
* [37] Wildcard ::= "*" | < NCName ":" "*" > | < "*" ":" NCName > .
* <p>
*
* @param pIsAtt Attribute
* @return filter
*/
private Filter parseWildcard(final boolean pIsAtt) {
Filter filter;
EType isName = EType.PREFIX;
if (is(TokenType.STAR, true)) {
if (is(TokenType.COLON, true)) {
// < "*" ":" NCName > .
isName = EType.LOCALNAME;
} else {
return // "*"
pIsAtt ? new AttributeFilter(getTransaction()) : new ElementFilter(getTransaction());
}
}
filter = new WildcardFilter(getTransaction(), parseNCName(), isName);
if (isName == EType.PREFIX) {
// < NCName ":" "*" >
consume(TokenType.COLON, true);
consume(TokenType.STAR, true);
}
return filter;
}
Aggregations