public final class TextFragmentValue extends SingletonNodeSet
generalUseAllowed, nodestaticContext| Constructor and Description |
|---|
TextFragmentValue(java.lang.String value,
java.lang.String systemId,
Controller controller)
Constructor: create a result tree fragment containing a single text node
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
asBoolean()
Convert the result tree fragment to a boolean
|
double |
asNumber()
Convert the result tree fragment to a number
|
java.lang.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, evaluate, evaluateAsNodeSet, getLength, isGeneralUseAllowed, isSorted, item, setSorted, sortconversionPreference, convertToJava, enumerategetDependencies, inverse, numericCompare, reduce, stringToNumbercontainsReferences, evaluateAsBoolean, evaluateAsNumber, evaluateAsString, getStaticContext, indent, isContextDocumentNodeSet, make, setStaticContext, usesCurrentpublic TextFragmentValue(java.lang.String value,
java.lang.String systemId,
Controller controller)
value: - a String containing the valuepublic java.lang.String asString()
asString in class SingletonNodeSetpublic void outputStringValue(Outputter out, Context context) throws javax.xml.transform.TransformerException
outputStringValue in class Expressionout - The required outputtercontext - The context in which the expression is to be evaluatedjavax.xml.transform.TransformerExceptionpublic double asNumber()
asNumber in class NodeSetValuepublic boolean asBoolean()
asBoolean in class SingletonNodeSetpublic int getCount()
getCount in class SingletonNodeSetpublic Expression simplify()
simplify in class SingletonNodeSetpublic NodeInfo getFirst()
getFirst in class SingletonNodeSetpublic NodeEnumeration enumerate() throws XPathException
enumerate in class SingletonNodeSetXPathExceptionpublic boolean equals(Value other) throws XPathException
equals in class SingletonNodeSetXPathExceptionpublic boolean notEquals(Value other) throws XPathException
notEquals in class SingletonNodeSetXPathExceptionpublic boolean compare(int operator,
Value other)
throws XPathException
compare in class NodeSetValueoperator - The comparison operator, one of Tokenizer.LE, Tokenizer.LT,
Tokenizer.GE, Tokenizer.GT,XPathExceptionpublic int getType()
public int getDataType()
getDataType in class NodeSetValuepublic DocumentInfo getRootNode()
public void copy(Outputter out) throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerExceptionpublic void display(int level)
display in class NodeSetValue