org.apache.xpath.operations
Class Operation
- ExpressionNode, ExpressionOwner, java.io.Serializable, SourceLocator, XPathVisitable
The baseclass for a binary operation.
asIterator , asIteratorRaw , asNode , assertion , bool , canTraverseOutsideSubtree , deepEquals , error , execute , execute , execute , execute , executeCharsToContentHandler , exprAddChild , exprGetChild , exprGetNumChildren , exprGetParent , exprSetParent , fixupVariables , getColumnNumber , getExpressionOwner , getLineNumber , getPublicId , getSystemId , isNodesetExpr , isStableNumber , num , warn , xstr |
canTraverseOutsideSubtree
public boolean canTraverseOutsideSubtree()
Tell if this expression or it's subexpressions can traverse outside
the current subtree.
- canTraverseOutsideSubtree in interface Expression
- true if traversal outside the context node's subtree can occur.
execute
public XObject execute(XPathContext xctxt)
throws TransformerException
Execute a binary operation by calling execute on each of the operands,
and then calling the operate method on the derived class.
- execute in interface Expression
xctxt
- The runtime execution context.
- The XObject result of the operation.
fixupVariables
public void fixupVariables(java.util.Vector vars,
int globalsSize)
This function is used to fixup variables from QNames to stack frame
indexes at stylesheet build time.
- fixupVariables in interface Expression
vars
- List of QNames that correspond to variables. This list
should be searched backwards for the first qualified name that
corresponds to the variable reference qname. The position of the
QName in the vector from the start of the vector will be its position
in the stack frame (but variables above the globalsTop value will need
to be offset to the current stack frame).
getLeftOperand
public Expression getLeftOperand()
- the left operand of binary operation, as an Expression.
getRightOperand
public Expression getRightOperand()
- the right operand of binary operation, as an Expression.
operate
public XObject operate(XObject left,
XObject right)
throws TransformerException
Apply the operation to two operands, and return the result.
left
- non-null reference to the evaluated left operand.right
- non-null reference to the evaluated right operand.
- non-null reference to the XObject that represents the result of the operation.
setLeftRight
public void setLeftRight(Expression l,
Expression r)
Set the left and right operand expressions for this operation.
l
- The left expression operand.r
- The right expression operand.
Copyright B) 2004 Apache XML Project. All Rights Reserved.