org.apache.xalan.templates

Class ElemIf

public class ElemIf extends ElemTemplateElement

Implement xsl:if.
 
 
 

See Also: XXX in XSLT Specification

UNKNOWN: advanced

Method Summary
voidcompose(StylesheetRoot sroot)
This function is called after everything else has been recomposed, and allows the template to set remaining values that may be based on some other property that depends on recomposition.
voidexecute(TransformerImpl transformer)
Conditionally execute a sub-template.
StringgetNodeName()
Return the node name.
XPathgetTest()
Get the "test" attribute.
intgetXSLToken()
Get an int constant identifying the type of element.
voidsetTest(XPath v)
Set the "test" attribute.

Method Detail

compose

public void compose(StylesheetRoot sroot)
This function is called after everything else has been recomposed, and allows the template to set remaining values that may be based on some other property that depends on recomposition.

Parameters: sroot The root stylesheet.

Throws: TransformerException

execute

public void execute(TransformerImpl transformer)
Conditionally execute a sub-template. The expression is evaluated and the resulting object is converted to a boolean as if by a call to the boolean function. If the result is true, then the content template is instantiated; otherwise, nothing is created.

Parameters: transformer non-null reference to the the current transform-time state.

Throws: TransformerException

getNodeName

public String getNodeName()
Return the node name.

Returns: the element's name

getTest

public XPath getTest()
Get the "test" attribute. The xsl:if element must have a test attribute, which specifies an expression.

Returns: the "test" attribute for this element.

getXSLToken

public int getXSLToken()
Get an int constant identifying the type of element.

Returns: The token ID for this element

See Also:

setTest

public void setTest(XPath v)
Set the "test" attribute. The xsl:if element must have a test attribute, which specifies an expression.

Parameters: v test attribute to set

Copyright B) 2005 Apache XML Project. All Rights Reserved.