jd.xml.xslt.template
Class Template

java.lang.Object
  extended byjd.xml.xslt.template.Template
Direct Known Subclasses:
ApplyImports, ApplyTemplates, ApplyTemplatesIterated, ApplyTemplatesToChildren, AttributeSet, CallTemplate, Choose, Condition, CopyBase, CreateAttribute, CreateComment, CreateElement, CreateElementEnd, CreatePi, CreateText, CreateTextUnescaped, DocumentTemplate, Fallback, ForEach, LiteralElement, Message, NumberTemplate, TraceTemplate, TryCatchTemplate, Unknown, ValueOf, ValueOfUnescaped, VariableBind

public abstract class Template
extends Object

The base class for all template implementation classes.


Constructor Summary
Template()
           
 
Method Summary
abstract  void accept(TemplateVisitor visitor)
           
 Template addChild(Template child)
           
 void addNext(Template next)
           
 boolean allowTailRecursion()
          Return if a contained call-template instruction should not resolve tail recursion.
 Template getNext()
           
 Template getParent()
           
abstract  void instantiate(XsltContext context, ResultBuilder resultBuilder)
          Instantiate the template.
static void instantiate(XsltContext context, ResultBuilder resultBuilder, Template template)
          Instantiate the template and its following siblings.
static String instantiate(XsltContext context, Template template)
          Instantiate a template and convert the result to a string.
 String toString()
          Return a string representation of the template.
protected  void transferRelations(Template template)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Template

public Template()
Method Detail

transferRelations

protected void transferRelations(Template template)

addNext

public void addNext(Template next)

getNext

public final Template getNext()

getParent

public Template getParent()

addChild

public Template addChild(Template child)

accept

public abstract void accept(TemplateVisitor visitor)

allowTailRecursion

public boolean allowTailRecursion()
Return if a contained call-template instruction should not resolve tail recursion. The default implementation returns true iif the template does not have a next template (which guarantess that the template is the last template) and its parent allows tail recursion.


instantiate

public static void instantiate(XsltContext context,
                               ResultBuilder resultBuilder,
                               Template template)
Instantiate the template and its following siblings.


instantiate

public static String instantiate(XsltContext context,
                                 Template template)
Instantiate a template and convert the result to a string.

Parameters:
template - the template

instantiate

public abstract void instantiate(XsltContext context,
                                 ResultBuilder resultBuilder)
Instantiate the template.


toString

public String toString()
Return a string representation of the template.