Package org.exolab.adaptx.xslt
Class XSLIf
- java.lang.Object
-
- org.exolab.adaptx.xslt.XSLObject
-
- org.exolab.adaptx.xslt.XSLIf
-
- All Implemented Interfaces:
Conditional
public class XSLIf extends XSLObject implements Conditional
Represents an XSLIf Object (xsl:if)- Version:
- $Revision: 3633 $ $Date: 2003-03-01 08:38:44 +0100 (Sat, 01 Mar 2003) $
- Author:
- Keith Visco
-
-
Field Summary
-
Fields inherited from class org.exolab.adaptx.xslt.XSLObject
APPLY_IMPORTS, APPLY_TEMPLATES, ARG, ATTRIBUTE, ATTRIBUTE_SET, CALL_TEMPLATE, CDATA, CHOOSE, COMMENT, CONTENTS, COPY, COPY_OF, ELEMENT, ENTITY_REF, FOR_EACH, FUNCTIONS, ID, IF, IMPORT, INCLUDE, KEY, LITERAL, LOCALE, MESSAGE, NUMBER, OTHERWISE, OUTPUT, PARAM, PI, PRESERVE_SPACE, SCRIPT, SORT, STRIP_SPACE, STYLESHEET, TEMPLATE, TEXT, VALUE_OF, VARIABLE, WHEN, WITH_PARAM
-
-
Constructor Summary
Constructors Constructor Description XSLIf()
Creates a new XSLIf object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BooleanResult
evaluate(XPathContext context)
Evaluates this Conditional using the given XPathContext.XPathExpression
getExpression()
Returns the XPath Expression of this xsl:ifvoid
setAttribute(java.lang.String name, java.lang.String value)
Sets the attribute with the given name to the given value.void
setExpression(XPathExpression expr)
Sets the test expression for this xsl:if-
Methods inherited from class org.exolab.adaptx.xslt.XSLObject
addNamespaceDecl, appendAction, appendText, appendText, getActions, getAttribute, getAttributes, getNamespace, getNearestAncestor, getNodeValue, getStylesheet, getText, getType, getTypeFromName, getTypeName, resolveNamespace, setAllowActions, setNamespace, setTypeName
-
-
-
-
Method Detail
-
getExpression
public XPathExpression getExpression() throws XPathException
Returns the XPath Expression of this xsl:if- Returns:
- the XPath Expression of this xsl:if
- Throws:
XPathException
-
evaluate
public BooleanResult evaluate(XPathContext context) throws XPathException
Evaluates this Conditional using the given XPathContext.- Specified by:
evaluate
in interfaceConditional
- Parameters:
context
- the XPathContext to evaluate this conditional with.- Returns:
- the resulting BooleanResult
- Throws:
XPathException
-
setAttribute
public void setAttribute(java.lang.String name, java.lang.String value) throws XSLException
Sets the attribute with the given name to the given value.- Overrides:
setAttribute
in classXSLObject
- Parameters:
name
- the name of the attribute to setvalue
- 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
-
-