com.icl.saxon.expr
Class  NodeSetExpression
java.lang.Object
  |
  +--com.icl.saxon.expr.Expression
        |
        +--com.icl.saxon.expr.NodeSetExpression
- Direct Known Subclasses: 
- NodeListExpression, PathExpression, SingletonExpression, SortedSelection
- public abstract class NodeSetExpression- extends Expression
A NodeSetExpression is any expression denoting a set of nodes. 
 This is an abstract class, the methods are defaults which may be overridden in subclasses
 
 
 
| Methods inherited from class com.icl.saxon.expr.Expression | 
| containsReferences, evaluateAsNumber, getDependencies, getStaticContext, isNumeric, isRelative, make, make, reduce, setStaticContext, simplify, usesCurrent | 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
NodeSetExpression
public NodeSetExpression()
enumerate
public abstract NodeEnumeration enumerate(Context context)
                                   throws org.xml.sax.SAXException
- Return a node enumeration. All NodeSetExpressions must implement this method:
 the evaluate() function is defined in terms of it.- 
- Overrides:
- enumeratein class- Expression
 
- Following copied from class: com.icl.saxon.expr.Expression
- 
- Parameters:
- context- The context in which the expression is to be evaluated
- Throws:
- org.xml.sax.SAXException- when the expression is not a nodeset expression.
 
evaluate
public final Value evaluate(Context context)
                     throws org.xml.sax.SAXException
- Evaluate this node-set. This doesn't actually retrieve all the nodes: it returns a wrapper
 around a node-set expression in which all context dependencies have been eliminated.- 
- Overrides:
- evaluatein class- Expression
 
- Following copied from class: com.icl.saxon.expr.Expression
- 
- Parameters:
- context- The context in which the expression is to be evaluated
- Returns:
- the value of the expression, evaluated in the current context
 
selectFirst
public NodeInfo selectFirst(Context context)
                     throws org.xml.sax.SAXException
- Return the first node selected by this Expression when evaluated in the current context- 
- Parameters:
- context- The context for the evaluation
- Returns:
- the NodeInfo of the first node in document order, or null if the node-set
 is empty.
 
evaluateAsString
public java.lang.String evaluateAsString(Context context)
                                  throws org.xml.sax.SAXException
- Evaluate as a string. Returns the string value of the first node
 selected by the NodeSetExpression- 
- Overrides:
- evaluateAsStringin class- Expression
 
- 
- Parameters:
- context- The context in which the expression is to be evaluated
- Returns:
- the value of the NodeSetExpression, evaluated in the current context
 
evaluateAsBoolean
public boolean evaluateAsBoolean(Context context)
                          throws org.xml.sax.SAXException
- Evaluate as a boolean. Returns true if there are any nodes
 selected by the NodeSetExpression- 
- Overrides:
- evaluateAsBooleanin class- Expression
 
- 
- Parameters:
- context- The context in which the expression is to be evaluated
- Returns:
- true if there are any nodes selected by the NodeSetExpression
 
evaluateAsNodeSet
public NodeSetValue evaluateAsNodeSet(Context context)
                               throws org.xml.sax.SAXException
- Evaluate an expression as a NodeSet.- 
- Overrides:
- evaluateAsNodeSetin class- Expression
 
- 
- Parameters:
- context- The context in which the expression is to be evaluated
- Returns:
- the value of the expression, evaluated in the current context
 
getDataType
public int getDataType()
- Determine the data type of the exprssion, if possible- 
- Overrides:
- getDataTypein class- Expression
 
- 
- Returns:
- Value.NODESET