/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
*/
/*
* Copyright 1999-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: Operation.java,v 1.2.4.1 2005/09/14 21:31:42 jeffsuttor Exp $
*/
/**
* The baseclass for a binary operation.
*/
{
/** The left operand expression.
* @serial */
/** The right operand expression.
* @serial */
/**
* This function is used to fixup variables from QNames to stack frame
* indexes at stylesheet build time.
* @param 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).
*/
{
}
/**
* Tell if this expression or it's subexpressions can traverse outside
* the current subtree.
*
* @return true if traversal outside the context node's subtree can occur.
*/
public boolean canTraverseOutsideSubtree()
{
return true;
return true;
return false;
}
/**
* Set the left and right operand expressions for this operation.
*
*
* @param l The left expression operand.
* @param r The right expression operand.
*/
{
m_left = l;
m_right = r;
l.exprSetParent(this);
r.exprSetParent(this);
}
/**
* Execute a binary operation by calling execute on each of the operands,
* and then calling the operate method on the derived class.
*
*
* @param xctxt The runtime execution context.
*
* @return The XObject result of the operation.
*
* @throws javax.xml.transform.TransformerException
*/
{
return result;
}
/**
* Apply the operation to two operands, and return the result.
*
*
* @param left non-null reference to the evaluated left operand.
* @param right non-null reference to the evaluated right operand.
*
* @return non-null reference to the XObject that represents the result of the operation.
*
* @throws javax.xml.transform.TransformerException
*/
{
return null; // no-op
}
/** @return the left operand of binary operation, as an Expression.
*/
return m_left;
}
/** @return the right operand of binary operation, as an Expression.
*/
return m_right;
}
{
/**
* @see ExpressionOwner#getExpression()
*/
{
return m_left;
}
/**
* @see ExpressionOwner#setExpression(Expression)
*/
{
}
}
/**
* @see com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
*/
{
{
}
}
/**
* @see ExpressionOwner#getExpression()
*/
{
return m_right;
}
/**
* @see ExpressionOwner#setExpression(Expression)
*/
{
exp.exprSetParent(this);
}
/**
* @see Expression#deepEquals(Expression)
*/
{
if(!isSameClass(expr))
return false;
return false;
return false;
return true;
}
}