/** * Compile a location match pattern unit expression. * * @param opPos The current position in the m_opMap array. * * @return reference to {@link org.apache.xpath.patterns.StepPattern} instance. * * @throws TransformerException if a error occurs creating the Expression. */ public Expression locationPathPattern(int opPos) throws TransformerException { opPos = getFirstChildPos(opPos); return stepPattern(opPos, 0, null); }
/** * Compile a location match pattern unit expression. * * @param opPos The current position in the m_opMap array. * * @return reference to {@link org.apache.xpath.patterns.StepPattern} instance. * * @throws TransformerException if a error occurs creating the Expression. */ public Expression locationPathPattern(int opPos) throws TransformerException { opPos = getFirstChildPos(opPos); return stepPattern(opPos, 0, null); }
/** * Bottle-neck compilation of a unary operation. * * @param unary The parent unary operation. * @param opPos The position in the op map of the parent operation. * * @return The unary argument. * * @throws TransformerException if syntax or other error occurs. */ private Expression compileUnary(UnaryOperation unary, int opPos) throws TransformerException { int rightPos = getFirstChildPos(opPos); unary.setRight(compile(rightPos)); return unary; }
/** * Bottle-neck compilation of a unary operation. * * @param unary The parent unary operation. * @param opPos The position in the op map of the parent operation. * * @return The unary argument. * * @throws TransformerException if syntax or other error occurs. */ private Expression compileUnary(UnaryOperation unary, int opPos) throws TransformerException { int rightPos = getFirstChildPos(opPos); unary.setRight(compile(rightPos)); return unary; }
/** * Compile a literal string value. * * @param opPos The current position in the m_opMap array. * * @return reference to {@link org.apache.xpath.objects.XString} instance. * * @throws TransformerException if a error occurs creating the Expression. */ protected Expression literal(int opPos) { opPos = getFirstChildPos(opPos); return (XString) getTokenQueue().elementAt(getOp(opPos)); }
/** * Compile a literal number value. * * @param opPos The current position in the m_opMap array. * * @return reference to {@link org.apache.xpath.objects.XNumber} instance. * * @throws TransformerException if a error occurs creating the Expression. */ protected Expression numberlit(int opPos) { opPos = getFirstChildPos(opPos); return (XNumber) getTokenQueue().elementAt(getOp(opPos)); }
/** * Compile a literal string value. * * @param opPos The current position in the m_opMap array. * * @return reference to {@link org.apache.xpath.objects.XString} instance. * * @throws TransformerException if a error occurs creating the Expression. */ protected Expression literal(int opPos) { opPos = getFirstChildPos(opPos); return (XString) getTokenQueue().elementAt(getOp(opPos)); }
/** * Compile a literal number value. * * @param opPos The current position in the m_opMap array. * * @return reference to {@link org.apache.xpath.objects.XNumber} instance. * * @throws TransformerException if a error occurs creating the Expression. */ protected Expression numberlit(int opPos) { opPos = getFirstChildPos(opPos); return (XNumber) getTokenQueue().elementAt(getOp(opPos)); }
/** * Bottle-neck compilation of an operation with left and right operands. * * @param operation non-null reference to parent operation. * @param opPos The op map position of the parent operation. * * @return reference to {@link org.apache.xpath.operations.Operation} instance. * * @throws TransformerException if there is a syntax or other error. */ private Expression compileOperation(Operation operation, int opPos) throws TransformerException { int leftPos = getFirstChildPos(opPos); int rightPos = getNextOpPos(leftPos); operation.setLeftRight(compile(leftPos), compile(rightPos)); return operation; }
/** * Bottle-neck compilation of an operation with left and right operands. * * @param operation non-null reference to parent operation. * @param opPos The op map position of the parent operation. * * @return reference to {@link org.apache.xpath.operations.Operation} instance. * * @throws TransformerException if there is a syntax or other error. */ private Expression compileOperation(Operation operation, int opPos) throws TransformerException { int leftPos = getFirstChildPos(opPos); int rightPos = getNextOpPos(leftPos); operation.setLeftRight(compile(leftPos), compile(rightPos)); return operation; }
/** * Compile a variable reference. * * @param opPos The current position in the m_opMap array. * * @return reference to {@link org.apache.xpath.operations.Variable} instance. * * @throws TransformerException if a error occurs creating the Expression. */ protected Expression variable(int opPos) throws TransformerException { Variable var = new Variable(); opPos = getFirstChildPos(opPos); int nsPos = getOp(opPos); java.lang.String namespace = (OpCodes.EMPTY == nsPos) ? null : (java.lang.String) getTokenQueue().elementAt(nsPos); java.lang.String localname = (java.lang.String) getTokenQueue().elementAt(getOp(opPos+1)); QName qname = new QName(namespace, localname); var.setQName(qname); return var; }
/** * Compile a variable reference. * * @param opPos The current position in the m_opMap array. * * @return reference to {@link org.apache.xpath.operations.Variable} instance. * * @throws TransformerException if a error occurs creating the Expression. */ protected Expression variable(int opPos) throws TransformerException { Variable var = new Variable(); opPos = getFirstChildPos(opPos); int nsPos = getOp(opPos); java.lang.String namespace = (OpCodes.EMPTY == nsPos) ? null : (java.lang.String) getTokenQueue().elementAt(nsPos); java.lang.String localname = (java.lang.String) getTokenQueue().elementAt(getOp(opPos+1)); QName qname = new QName(namespace, localname); var.setQName(qname); return var; }
opPos = getFirstChildPos(opPos);
opPos = getFirstChildPos(opPos);
opPos = getFirstChildPos(opPos);
opPos = getFirstChildPos(opPos);
/** * Compile a literal number value. * * @param opPos The current position in the m_opMap array. * * @return reference to {@link org.apache.xpath.objects.XNumber} instance. * * @throws TransformerException if a error occurs creating the Expression. */ protected Expression numberlit(int opPos) { opPos = getFirstChildPos(opPos); return (XNumber) getTokenQueue().elementAt(getOp(opPos)); }
/** * Compile a literal string value. * * @param opPos The current position in the m_opMap array. * * @return reference to {@link org.apache.xpath.objects.XString} instance. * * @throws TransformerException if a error occurs creating the Expression. */ protected Expression literal(int opPos) { opPos = getFirstChildPos(opPos); return (XString) getTokenQueue().elementAt(getOp(opPos)); }
/** * Compile a literal number value. * * @param opPos The current position in the m_opMap array. * * @return reference to {@link org.apache.xpath.objects.XNumber} instance. * * @throws TransformerException if a error occurs creating the Expression. */ protected Expression numberlit(int opPos) { opPos = getFirstChildPos(opPos); return (XNumber) getTokenQueue().elementAt(getOp(opPos)); }
/** * Compile a literal string value. * * @param opPos The current position in the m_opMap array. * * @return reference to {@link org.apache.xpath.objects.XString} instance. * * @throws TransformerException if a error occurs creating the Expression. */ protected Expression literal(int opPos) { opPos = getFirstChildPos(opPos); return (XString) getTokenQueue().elementAt(getOp(opPos)); }