net.sf.saxon.value
public class SingletonNode extends Value
Field Summary | |
---|---|
protected NodeInfo | node |
Constructor Summary | |
---|---|
SingletonNode(NodeInfo node)
Create a node-set containing zero or one nodes |
Method Summary | |
---|---|
Object | convertToJava(Class target, XPathContext context)
Convert to Java object (for passing to external functions) |
void | display(int depth, NamePool pool, PrintStream out)
Diagnostic display |
boolean | effectiveBooleanValue(XPathContext context)
Get the effective boolean value |
String | evaluateAsString(XPathContext context)
Evaluate an expression as a String. |
Item | evaluateItem(XPathContext context)
Evaluate as an item |
int | getCardinality()
Determine the static cardinality |
int | getImplementationMethod()
An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
|
ItemType | getItemType(TypeHierarchy th)
Determine the data type of the items in the expression. |
int | getLength()
Get the length of the sequence |
NodeInfo | getNode()
Get the node that forms the node-set. |
int | getSpecialProperties()
Get the static properties of this expression (other than its type). |
String | getStringValue()
Convert the value to a string, using the serialization rules.
|
Item | itemAt(int n)
Get the n'th item in the sequence (starting from 0). |
SequenceIterator | iterate(XPathContext context)
Return an enumeration of this nodeset value. |
void | process(XPathContext context)
Process the instruction, without returning any tail calls |
Parameters: node The node to be contained in the node-set, or null if the node-set is to be empty
Parameters: context The context in which the expression is to be evaluated
Returns: the value of the expression, evaluated in the current context. The expression must return a string or (); if the value of the expression is (), this method returns "".
Throws: XPathException if any dynamic error occurs evaluating the expression
Parameters: th
Returns: the most precise possible type of the node.
Parameters: context The dynamic context, giving access to the current node, the current variables, etc.