final int token = xtokens.nextToken(); Step step = new Step( new Axis(Axis.ATTRIBUTE), parseNodeTest(xtokens.nextToken(),xtokens,context)); stepsVector.addElement(step); expectingStep=false; check(expectingStep); if (xtokens.nextToken() != XPath.Tokens.EXPRTOKEN_DOUBLE_COLON) { throw new XPathException("c-general-xpath"); parseNodeTest(xtokens.nextToken(),xtokens,context)); stepsVector.addElement(step); expectingStep = false; check(expectingStep); if (xtokens.nextToken() != XPath.Tokens.EXPRTOKEN_DOUBLE_COLON) { throw new XPathException("c-general-xpath"); parseNodeTest(xtokens.nextToken(),xtokens,context)); stepsVector.addElement(step); expectingStep = false; xtokens.nextToken();
/** * 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; }