com.novell.xsl.process
Class WithParamTemplate

java.lang.Object
  extended bycom.novell.xsl.process.TemplateCollection
      extended bycom.novell.xsl.process.VariableTemplate
          extended bycom.novell.xsl.process.WithParamTemplate
All Implemented Interfaces:
Expression, Template

public class WithParamTemplate
extends VariableTemplate

A template that instantiates an XSLT variable


Field Summary
 
Fields inherited from class com.novell.xsl.process.VariableTemplate
currentValue
 
Constructor Summary
WithParamTemplate(ExpandedQName name, Expression select, Template[] templates, Node nsContext)
          Constructs a WithParamTemplate that create binds a value to a parameter variable
 
Method Summary
 void dump(PrintWriter out, int indent)
          Dumps this object to the specified output stream.
 void instantiate(ProcessingEnv env, Node currentNode, ResultHandler result)
          Instantiates this template for the specified current node and sends the result to the specified result handler.
 
Methods inherited from class com.novell.xsl.process.VariableTemplate
evaluate, getCurrentValue, getName, getResultType, getSelect, isConstant, isParam, registerForReset, setCurrentValue
 
Methods inherited from class com.novell.xsl.process.TemplateCollection
getNamespaceContext, getTemplates, instantiateTemplates
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WithParamTemplate

public WithParamTemplate(ExpandedQName name,
                         Expression select,
                         Template[] templates,
                         Node nsContext)
Constructs a WithParamTemplate that create binds a value to a parameter variable

Parameters:
name - the name of the variable (an expanded name)
select - the optional expression that is evaluated to give the the value of the variable
templates - the templates to be evaluated to get the variable's value if no select expression is given
nsContext - The node in the style sheet from which this template comes
Method Detail

instantiate

public void instantiate(ProcessingEnv env,
                        Node currentNode,
                        ResultHandler result)
                 throws XSLException
Instantiates this template for the specified current node and sends the result to the specified result handler.

For a VariableTemplate, this method evaluates the select expression, or instantiates the result fragment template, and places the variable within scope.

Specified by:
instantiate in interface Template
Overrides:
instantiate in class VariableTemplate
Parameters:
env - the current processing environment
currentNode - the current source node
result - the handler to which results are sent
Throws:
XSLException - if a fatal error occurs during instantiation

dump

public void dump(PrintWriter out,
                 int indent)
Dumps this object to the specified output stream.

Specified by:
dump in interface Expression
Overrides:
dump in class VariableTemplate
Parameters:
out - the output stream to write to
indent - number of tabs to indent