|
||||||||||
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.AttributeTemplate
A template that adds an attribute to a result element. This template
corresponds to the xsl:attribute
element.
Constructor Summary | |
AttributeTemplate(Expression name,
Expression namespace,
Template[] templates,
int importance,
int position,
Node nsContext)
Constructs an AttributeTemplate that adds an attribute to
the containing result element; the attribute's name is given by the
specified expression, and its value is given by the specified templates. |
Method Summary | |
void |
dump(PrintWriter out,
int indent)
Dumps this object to the specified output stream. |
int |
getImportance()
Return the import precedence of this AttributeTemplate . |
Expression |
getNameExpression()
Return the name expression for this AttributeTemplate |
Expression |
getNamespaceExpression()
Return the namespace expression for this AttributeTemplate |
int |
getPosition()
Return the position of this AttributeTemplate in the stylesheet relative
to other AttributeTemplate s in the stylesheet. |
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.TemplateCollection |
getNamespaceContext, getTemplates, instantiateTemplates |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AttributeTemplate(Expression name, Expression namespace, Template[] templates, int importance, int position, Node nsContext)
AttributeTemplate
that adds an attribute to
the containing result element; the attribute's name is given by the
specified expression, and its value is given by the specified templates.
name
- the attribute value template that evaluates to the
attribute's namenamespace
- the attribute value template that evaluates to the namespace
for the attribute name (may be null)templates
- the templates to be evaluated to get the attribute's
valueimportance
- Import precedence of xsl:attribute element in the stylesheetposition
- The position of the xsl:attribute element in the stylesheetnsContext
- The node in the style sheet from which this template comesMethod Detail |
public Expression getNameExpression()
AttributeTemplate
public Expression getNamespaceExpression()
AttributeTemplate
public int getPosition()
AttributeTemplate
in the stylesheet relative
to other AttributeTemplate
s in the stylesheet.
int
representing the position of this template in the stylesheetpublic int getImportance()
AttributeTemplate
.
int
representing the relative import precedence of this instance.public void instantiate(ProcessingEnv env, Node currentNode, ResultHandler result) throws XSLException
For an AttributeTemplate
, this method adds an attribute to
the result tree. The attribute's value is obtained by instantiating this
template's contained templates. The contained templates should produce
only text nodes.
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 Template
dump
in class TemplateCollection
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 |