|
||||||||||
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.LiteralElementTemplate
A template that creates a literal result element.
Constructor Summary | |
LiteralElementTemplate(String elementName,
String[] attributeNames,
Expression[] attributeValues,
Set extNamespaces,
Set excludedNamespaces,
Collection attributeSetNames,
Template[] templates,
Node nsNode)
Constructs a LiteralElementTemplate that creates a literal
result element with the specified qualified name and contains the
specified templates. |
Method Summary | |
protected String |
adjustPrefix(String name,
ProcessingEnv env,
Map namespaceMap)
Adjust the prefix of a QName to reflect the prefix being used for the namespace in the result tree |
void |
dump(PrintWriter out,
int indent)
Dumps this object to the specified output stream. |
protected String |
getNamespaceURI(String name,
ProcessingEnv env)
Get the namespace URI from the environment |
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 LiteralElementTemplate(String elementName, String[] attributeNames, Expression[] attributeValues, Set extNamespaces, Set excludedNamespaces, Collection attributeSetNames, Template[] templates, Node nsNode)
LiteralElementTemplate
that creates a literal
result element with the specified qualified name and contains the
specified templates.
elementName
- the element's qualified nameattributeNames
- the element's qualified attribute namesattributeValues
- the element's attribute valuesextNamespaces
- any extension namespaces defined using xsl:extension-element-prefixesexcludedNamespaces
- any namespaces defined using xsl:exclude-result-prefixes
on this or any ancestor, including xsl:stylesheetattributeSetNames
- The attribute sets to use when the template is instantiated (may be null).templates
- the element's contained templatesnsNode
- The node in the style sheet from which this template comes
IllegalArgumentException
- if attributeNames and
attributeValues are not the same
lengthMethod Detail |
public void instantiate(ProcessingEnv env, Node currentNode, ResultHandler result) throws XSLException
For a LiteralElementTemplate
, this method adds an element
to the result tree. The element's children are obtained by instantiating
this template's contained templates.
env
- the current processing environmentcurrentNode
- the current source noderesult
- the handler to which results are sent
XSLException
- if a fatal error occurs during instantiationprotected String adjustPrefix(String name, ProcessingEnv env, Map namespaceMap)
name
- The QName to adjustenv
- The ProcessingEnv passed to instantiate()
namespaceMap
- A map of namespace nodes for this literal result element, indexed
by namespace name.protected String getNamespaceURI(String name, ProcessingEnv env)
name
- The QName to adjustenv
- The ProcessingEnv passed to instantiate()
public 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 |