com.novell.xsl.process
Class PITemplate

java.lang.Object
  extended bycom.novell.xsl.process.TemplateCollection
      extended bycom.novell.xsl.process.PITemplate
All Implemented Interfaces:
Template

public class PITemplate
extends TemplateCollection

A template that creates a processing instruction. This template corresponds to the xsl:processing-instruction element.


Constructor Summary
PITemplate(Expression name, Template[] templates, Node nsNode)
          Constructs a PITemplate that creates a processing instruction whose target name is given by the specified expression, and whose value is given by the specified templates.
 
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.TemplateCollection
getNamespaceContext, getTemplates, instantiateTemplates
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PITemplate

public PITemplate(Expression name,
                  Template[] templates,
                  Node nsNode)
Constructs a PITemplate that creates a processing instruction whose target name is given by the specified expression, and whose value is given by the specified templates.

Parameters:
name - the string expression that evaluates to the processing instruction's name
templates - the templates to be evaluated to get the processing instruction's value
nsNode - 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 PITemplate, this method adds a processing instruction node to the result tree. The processing instruction's value is obtained by instantiating this template's contained templates. The contained templates should produce only text nodes.

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 Template
Overrides:
dump in class TemplateCollection
Parameters:
out - the output stream to write to
indent - number of tabs to indent