jd.xml.xslt.template
Class Condition

java.lang.Object
  extended byjd.xml.xslt.template.Template
      extended byjd.xml.xslt.template.Condition

public class Condition
extends Template

A template for the definitions:

 <xsl:if
  test = boolean-expression>
  <!-- Content: template -->
 </xsl:if>
 
and
 <xsl:when
  test = boolean-expression>
  <!-- Content: template -->
 </xsl:when>
 


Constructor Summary
Condition(Expression test, Template template)
          Create a Condition.
 
Method Summary
 void accept(TemplateVisitor visitor)
           
 void instantiate(XsltContext context, ResultBuilder resultBuilder)
          Instantiate the template.
 boolean test(XsltContext context, ResultBuilder resultBuilder)
          Instantiate the content if the condition evaluates to true.
 
Methods inherited from class jd.xml.xslt.template.Template
addChild, addNext, allowTailRecursion, getNext, getParent, instantiate, instantiate, toString, transferRelations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Condition

public Condition(Expression test,
                 Template template)
Create a Condition.

Method Detail

accept

public void accept(TemplateVisitor visitor)
Specified by:
accept in class Template

instantiate

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

Specified by:
instantiate in class Template

test

public boolean test(XsltContext context,
                    ResultBuilder resultBuilder)
Instantiate the content if the condition evaluates to true.