|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.novell.xsl.process.TemplateCollection com.novell.xsl.process.VariableTemplate com.novell.xsl.extensions.AssignVariableTemplate
A extension element template that allows assignment to an xsl:variable-defined variable. This represents the nxsl:assign-variable element
Field Summary | |
protected Expression |
variable
The variable object that this template is to modify. |
Fields inherited from class com.novell.xsl.process.VariableTemplate |
currentValue |
Constructor Summary | |
protected |
AssignVariableTemplate(ExpandedQName name,
Expression select,
Template[] templates,
Expression variable,
Node nsContext)
Constructs an AssignVariableTemplate that create assigns a new value
to an already-defined 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. |
static Template |
parse(StylesheetParser stylesheetParser,
Element element)
Parse an nxsl:assign-variable element (an extension element) |
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 |
Field Detail |
protected Expression variable
VariableTemplate
object or a VariablePlaceholder
object
Constructor Detail |
protected AssignVariableTemplate(ExpandedQName name, Expression select, Template[] templates, Expression variable, Node nsContext)
AssignVariableTemplate
that create assigns a new value
to an already-defined variable
name
- the name of the variable (an expanded name)select
- the optional expression that is evaluated to give the
the value of the variabletemplates
- the templates to be evaluated to get the variable's value
if no select expression is givenvariable
- the Expression
-implementing object whose value this template will modify
(must be either a VariableTemplate
or a VariablePlaceholder
object)nsContext
- The node in the style sheet from which this template comesMethod Detail |
public static Template parse(StylesheetParser stylesheetParser, Element element) throws XSLTParserException
stylesheetParser
- The StylesheetParser
for which the element is to be parsed.element
- The element node in the stylesheet.
XSLTParserException
public void instantiate(ProcessingEnv env, Node currentNode, ResultHandler result) throws XSLException
For a VariableTemplate
, this method evaluates the select expression,
or instantiates the result fragment template, and places the variable within scope.
instantiate
in interface Template
instantiate
in class VariableTemplate
env
- the current processing environmentcurrentNode
- the current source noderesult
- the handler to which results are sent
XSLException
- if a fatal error occurs during instantiationpublic void dump(PrintWriter out, int indent)
dump
in interface Expression
dump
in class VariableTemplate
out
- the output stream to write toindent
- number of tabs to indent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |