net.sf.saxon.functions

Class Contains

public class Contains extends CollatingFunction

Implements the fn:contains() function
Method Summary
booleaneffectiveBooleanValue(XPathContext context)
Get the effective boolean value of the expression.
ItemevaluateItem(XPathContext context)
Evaluate the function

Method Detail

effectiveBooleanValue

public boolean effectiveBooleanValue(XPathContext context)
Get the effective boolean value of the expression. This returns false if the value is the empty sequence, a zero-length string, a number equal to zero, or the boolean false. Otherwise it returns true.

Parameters: context The context in which the expression is to be evaluated

Returns: the effective boolean value

Throws: net.sf.saxon.trans.XPathException if any dynamic error occurs evaluating the expression

evaluateItem

public Item evaluateItem(XPathContext context)
Evaluate the function