com.novell.xsl.parser
Class AVT

java.lang.Object
  extended bycom.novell.xsl.parser.AVT
All Implemented Interfaces:
Expression

public class AVT
extends Object
implements Expression

A string expression used for an AttributeValueTemplate


Constructor Summary
protected AVT(Expression[] operands)
          Constructs a new AttributeValueTemplate with the specified operands.
 
Method Summary
 void dump(PrintWriter writer, int indent)
          Print the expression in a readable form for debugging.
 ExpressionValue evaluate(Node contextNode, ExpressionContext context)
          Evaluate the expression with repect to the passed context
 Expression[] getOperands()
          Returns this expression's operands.
 Class getResultType()
          Return the Class object describing the result type of the expression.
 boolean isConstant()
          Return true if the expression is a constant value.
static Expression parse(String source, Parser xpathParser, ErrorHandler errorHandler)
          Parse a string an as AttributeValueTemplate and return an Expression the implements the template.
 void registerForReset(XPathResetRegistrar registrar)
          Register this expression or any subexpression that implements XPathResetCache with an object that wants to call resetCache()
 String toString()
          Provide a readable description for debugging.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AVT

protected AVT(Expression[] operands)
Constructs a new AttributeValueTemplate with the specified operands.

Parameters:
operands - the expressions to be concatenated
Method Detail

parse

public static Expression parse(String source,
                               Parser xpathParser,
                               ErrorHandler errorHandler)
                        throws XPathParserException
Parse a string an as AttributeValueTemplate and return an Expression the implements the template.

Parameters:
source - The string to be parsed.
xpathParser - The XPath expression parser to use for parsing the expressions.
Returns:
An Object implementing Expression that implements the AVT. This might not be an AVT object.
Throws:
XPathParserException

getOperands

public Expression[] getOperands()
Returns this expression's operands.

Returns:
the expressions to be concatenated

toString

public String toString()
Provide a readable description for debugging.

Returns:
String representation

evaluate

public ExpressionValue evaluate(Node contextNode,
                                ExpressionContext context)
                         throws XPathEvaluationException
Evaluate the expression with repect to the passed context

Specified by:
evaluate in interface Expression
Parameters:
contextNode - context node for expression evaluation
context - expression context for expression evaluation
Returns:
result of evaluating expression
Throws:
XPathEvaluationException

isConstant

public boolean isConstant()
Return true if the expression is a constant value.

Specified by:
isConstant in interface Expression
Returns:
True is expression is constant, false otherwise.

getResultType

public Class getResultType()
Return the Class object describing the result type of the expression.

Specified by:
getResultType in interface Expression
Returns:
A Class object.

registerForReset

public void registerForReset(XPathResetRegistrar registrar)
Register this expression or any subexpression that implements XPathResetCache with an object that wants to call resetCache()

Specified by:
registerForReset in interface Expression

dump

public void dump(PrintWriter writer,
                 int indent)
Print the expression in a readable form for debugging.

Specified by:
dump in interface Expression
Parameters:
writer - The output device.
indent - Number of tabs to indent the result.