case EXPRTOKEN_NAMETEST_NAMESPACE: System.out.print("<NAMETEST_NAMESPACE"); System.out.print(" prefix=\"" + getTokenString(fTokens[++i]) + "\""); System.out.print("/>"); break; System.out.print("<NAMETEST_QNAME"); if (fTokens[++i] != -1) System.out.print(" prefix=\"" + getTokenString(fTokens[i]) + "\""); System.out.print(" localpart=\"" + getTokenString(fTokens[++i]) + "\""); System.out.print("/>"); break; System.out.print("<FUNCTION_NAME"); if (fTokens[++i] != -1) System.out.print(" prefix=\"" + getTokenString(fTokens[i]) + "\""); System.out.print(" localpart=\"" + getTokenString(fTokens[++i]) + "\""); System.out.print("/>"); break; case EXPRTOKEN_LITERAL: System.out.print("<LITERAL"); System.out.print(" value=\"" + getTokenString(fTokens[++i]) + "\""); System.out.print("/>"); break; case EXPRTOKEN_NUMBER: System.out.print("<NUMBER"); System.out.print(" whole=\"" + getTokenString(fTokens[++i]) + "\""); System.out.print(" part=\"" + getTokenString(fTokens[++i]) + "\"");
/** * Obtains the token at the current position as a String. * * If there's no current token or if the current token * is not a string token, this method throws * <tt>new XPathException("c-general-xpath");</tt>. */ public String nextTokenAsString() throws XPathException { String s = getTokenString(nextToken()); if(s==null) throw new XPathException("c-general-xpath"); return s; }