com.icl.saxon.expr
Class TextFragmentValue
- NodeList
public final class TextFragmentValue
This class represents a Value of type result tree fragment, specifically,
an RTF whose root owns a single text node.
TextFragmentValue(String value, String systemId, Controller controller)- Constructor: create a result tree fragment containing a single text node
|
boolean | asBoolean()- Convert the result tree fragment to a boolean
|
double | asNumber()- Convert the result tree fragment to a number
|
String | asString()- Convert the result tree fragment to a string.
|
boolean | compare(int operator, Value other)- Test how a FragmentValue compares to another Value under a relational comparison.
|
void | copy(Outputter out)- Copy the result tree fragment value to a given Outputter
|
void | display(int level)- Diagnostic print of expression structure
|
NodeEnumeration | enumerate()- Return an enumeration of this nodeset value.
|
boolean | equals(Value other)- Test whether a nodeset "equals" another Value
|
int | getCount()- Count the nodes in the node-set.
|
int | getDataType()- Determine the data type of the expression, if possible
|
NodeInfo | getFirst()- Get the first node in the nodeset (in document order)
|
DocumentInfo | getRootNode()- Get the root (document) node
|
int | getType()- Return the type of the value
|
boolean | notEquals(Value other)- Test whether a nodeset "not-equals" another Value
|
void | outputStringValue(Outputter out, Context context)- Evaluate an expression as a String and write the result to the
specified outputter.
|
Expression | simplify()- Simplify the expression
|
allowGeneralUse, asBoolean, asString, enumerate, equals, evaluate, evaluateAsNodeSet, getCount, getFirst, getLength, isGeneralUseAllowed, isSorted, item, notEquals, setSorted, simplify, sort |
asBoolean, asNumber, asString, compare, conversionPreference, convertToJava, display, enumerate, enumerate, equals, evaluate, evaluateAsNodeSet, getCount, getDataType, getFirst, isSorted, notEquals, setSorted, sort |
asBoolean, asNumber, asString, compare, conversionPreference, convertToJava, equals, evaluate, getDependencies, inverse, notEquals, numericCompare, reduce, simplify, stringToNumber |
containsReferences, display, enumerate, evaluate, evaluateAsBoolean, evaluateAsNodeSet, evaluateAsNumber, evaluateAsString, getDataType, getDependencies, getStaticContext, indent, isContextDocumentNodeSet, make, outputStringValue, reduce, setStaticContext, simplify, usesCurrent |
TextFragmentValue
public TextFragmentValue(String value,
String systemId,
Controller controller) Constructor: create a result tree fragment containing a single text node
asBoolean
public boolean asBoolean()
Convert the result tree fragment to a boolean
- asBoolean in interface SingletonNodeSet
asNumber
public double asNumber()
Convert the result tree fragment to a number
- asNumber in interface NodeSetValue
asString
public String asString()
Convert the result tree fragment to a string.
- asString in interface SingletonNodeSet
compare
public boolean compare(int operator,
Value other)
throws XPathException Test how a FragmentValue compares to another Value under a relational comparison.
- compare in interface NodeSetValue
copy
public void copy(Outputter out)
throws TransformerException Copy the result tree fragment value to a given Outputter
display
public void display(int level)
Diagnostic print of expression structure
- display in interface NodeSetValue
getCount
public int getCount()
Count the nodes in the node-set.
- getCount in interface SingletonNodeSet
getDataType
public int getDataType()
Determine the data type of the expression, if possible
- getDataType in interface NodeSetValue
- Value.NODESET
getFirst
public NodeInfo getFirst()
Get the first node in the nodeset (in document order)
- getFirst in interface SingletonNodeSet
- the first node
getRootNode
public DocumentInfo getRootNode()
Get the root (document) node
getType
public int getType()
Return the type of the value
- Value.NODESET (always)
outputStringValue
public void outputStringValue(Outputter out,
Context context)
throws TransformerException Evaluate an expression as a String and write the result to the
specified outputter.
- outputStringValue in interface Expression
out - The required outputtercontext - The context in which the expression is to be evaluated