com.novell.xsl.process
Class TemplateCollection

java.lang.Object
  extended bycom.novell.xsl.process.TemplateCollection
All Implemented Interfaces:
Template
Direct Known Subclasses:
AttributeTemplate, CallTemplate, ChooseTemplate, CommentTemplate, CopyTemplate, ElementTemplate, FallbackTemplate, FallbackTemplatesTemplate, ForEachTemplate, IfTemplate, LiteralElementTemplate, MessageTemplate, OtherwiseTemplate, PITemplate, VariableTemplate, WhenTemplate

public abstract class TemplateCollection
extends Object
implements Template

An abstract class for templates that are ordered collections of templates.


Constructor Summary
TemplateCollection(Template[] templates, Node nsContext)
          Constructs a new template collection containing the specified templates.
 
Method Summary
 void dump(PrintWriter out, int indent)
          Dumps this object to the specified output stream.
 Node getNamespaceContext()
          Return the node that is the namespace context for this template
 Template[] getTemplates()
          Returns the templates in this collection.
protected  void instantiateTemplates(ProcessingEnv env, Node currentNode, ResultHandler result)
          Instantiates the templates in this collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.novell.xsl.process.Template
instantiate
 

Constructor Detail

TemplateCollection

public TemplateCollection(Template[] templates,
                          Node nsContext)
Constructs a new template collection containing the specified templates.

Parameters:
templates - the collection's templates
nsContext - The node in the style sheet from which this template comes
Method Detail

getTemplates

public Template[] getTemplates()
Returns the templates in this collection.

Returns:
this collection's templates

dump

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

Specified by:
dump in interface Template
Parameters:
out - the output stream to write to
indent - number of tabs to indent

instantiateTemplates

protected void instantiateTemplates(ProcessingEnv env,
                                    Node currentNode,
                                    ResultHandler result)
                             throws XSLException
Instantiates the templates in this collection. This is a helper method for subclasses implementing instantiate.

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

getNamespaceContext

public Node getNamespaceContext()
Return the node that is the namespace context for this template

Specified by:
getNamespaceContext in interface Template
Returns:
The namespace context node.