protected NameTest parseWildcard( TokenStream tokens ) {
if (tokens.canConsume('*')) {
if (tokens.canConsume(':')) {
if (tokens.canConsume('*')) {
return new NameTest(null, null);
}
String localName = tokens.consume();
return new NameTest(null, decode(localName));
}
return new NameTest(null, null);
}
if (tokens.matches(XPathTokenizer.NAME, XPathTokenizer.SYMBOL, XPathTokenizer.SYMBOL)
&& tokens.matches(TokenStream.ANY_VALUE, ":", "*")) {
String prefix = tokens.consume();
tokens.consume(':');
tokens.consume('*');
return new NameTest(decode(prefix), null);
}
return null;
}