org.exolab.adaptx.xslt

Class XSLIf

public class XSLIf extends XSLObject implements Conditional

Represents an XSLIf Object (xsl:if)

Version: $Revision: 3633 $ $Date: 2003-03-01 02:38:44 -0500 (Sat, 01 Mar 2003) $

Author: Keith Visco

Constructor Summary
XSLIf()
Creates a new XSLIf object
Method Summary
BooleanResultevaluate(XPathContext context)
Evaluates this Conditional using the given XPathContext.
XPathExpressiongetExpression()
Returns the XPath Expression of this xsl:if
voidsetAttribute(String name, String value)
Sets the attribute with the given name to the given value.
voidsetExpression(XPathExpression expr)
Sets the test expression for this xsl:if

Constructor Detail

XSLIf

public XSLIf()
Creates a new XSLIf object

Method Detail

evaluate

public BooleanResult evaluate(XPathContext context)
Evaluates this Conditional using the given XPathContext.

Parameters: context the XPathContext to evaluate this conditional with.

Returns: the resulting BooleanResult

getExpression

public XPathExpression getExpression()
Returns the XPath Expression of this xsl:if

Returns: the XPath Expression of this xsl:if

setAttribute

public void setAttribute(String name, String value)
Sets the attribute with the given name to the given value.

Parameters: name the name of the attribute to set value the value to set the attribute to

Throws: XSLException if this XSLObject does not allow attributes with the given name, or if the attribute is read only

setExpression

public void setExpression(XPathExpression expr)
Sets the test expression for this xsl:if

Parameters: expr the XPathExpression for this xsl:if