|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.icl.saxon.expr.Expression | +--com.icl.saxon.expr.Value | +--com.icl.saxon.expr.NodeSetValue | +--com.icl.saxon.expr.SingletonNodeSet | +--com.icl.saxon.expr.FragmentValue
This class represents a Value of type result tree fragment.
A Result Tree Fragment can be created by defining a variable in XSL whose value is defined by
the contents of the xsl:variable element, possibly including start and end element tags.
Fields inherited from class com.icl.saxon.expr.SingletonNodeSet |
node |
Fields inherited from class com.icl.saxon.expr.Value |
ANY, BOOLEAN, NODESET, NUMBER, OBJECT, STRING |
Fields inherited from class com.icl.saxon.expr.Expression |
staticContext |
Constructor Summary | |
FragmentValue()
|
|
FragmentValue(java.lang.String value)
Constructor: create a result tree fragment containing a single text node |
Method Summary | |
void |
allowConversion(boolean yesOrNo)
Indicate whether implicit conversion to a node-set is permitted |
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. |
void |
characters(char[] chars,
int start,
int len)
Output character data |
void |
comment(char[] chars,
int start,
int length)
Output a comment. |
boolean |
compare(int operator,
Value other)
Test how a FragmentValue compares to another Value under a relational comparison. |
boolean |
contains(NodeInfo node)
Determine whether a particular node is present in the nodeset. |
void |
copy(Outputter out)
Copy the result tree fragment value to a given Outputter |
void |
endDocument()
Notify document end |
void |
endElement(int name)
Output an element end tag |
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 |
Emitter |
getEmitter()
Get an Emitter that can be used to feed data to this result tree fragment |
NodeInfo |
getFirst()
Get the first node in the nodeset (in document order) |
NodeInfo[] |
getNodes()
Return the nodes in the node-set as an array. |
DocumentInfo |
getRootNode()
Get the root (document) node |
int |
getType()
Return the type of the value |
boolean |
isEmpty()
Determine whether the node-set is empty. |
boolean |
isSingular()
Determine whether the node-set is singular, that is, whether it has a single member. |
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. |
void |
processingInstruction(java.lang.String name,
java.lang.String data)
Output a processing instruction |
void |
replay(Emitter emitter)
Replay the saved emitter events to a new emitter |
void |
setBaseURI(java.lang.String uri)
Set the Base URI for the nodes in the result tree fragment. |
void |
setCharacterSet(CharacterSet charset)
Set the CharacterSet to be used. |
void |
setDocumentLocator(org.xml.sax.Locator locator)
Set Document Locator |
void |
setEscaping(boolean escaping)
Switch escaping on or off. |
void |
setNamePool(NamePool pool)
Provide a namepool |
void |
setOutputDetails(OutputDetails details)
Set output details. |
void |
setUnparsedEntity(java.lang.String name,
java.lang.String uri)
Set Unparsed entity |
void |
setWriter(java.io.Writer writer)
Set the Writer to be used. |
Expression |
simplify()
Simplify the expression |
void |
startDocument()
Notify document start |
void |
startElement(int name,
org.xml.sax.Attributes attributes,
int[] namespaces,
int nscount)
Output an element start tag. |
java.lang.String |
toString()
Get a string representation of the expression |
Methods inherited from class com.icl.saxon.expr.SingletonNodeSet |
evaluate, evaluateAsNodeSet, isSorted, setSorted, sort |
Methods inherited from class com.icl.saxon.expr.NodeSetValue |
enumerate |
Methods inherited from class com.icl.saxon.expr.Value |
getDependencies, inverse, numericCompare, reduce, stringToNumber |
Methods inherited from class com.icl.saxon.expr.Expression |
containsReferences, evaluateAsBoolean, evaluateAsNumber, evaluateAsString, getStaticContext, make, setStaticContext, usesCurrent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public FragmentValue() throws org.xml.sax.SAXException
public FragmentValue(java.lang.String value) throws org.xml.sax.SAXException
value:
- a String containing the valueMethod Detail |
public void setBaseURI(java.lang.String uri)
public void setNamePool(NamePool pool)
setNamePool
in interface Emitter
public void allowConversion(boolean yesOrNo)
public Emitter getEmitter() throws org.xml.sax.SAXException
public java.lang.String asString() throws org.xml.sax.SAXException
asString
in class SingletonNodeSet
com.icl.saxon.expr.SingletonNodeSet
public void outputStringValue(Outputter out, Context context) throws org.xml.sax.SAXException
outputStringValue
in class Expression
out
- The required outputtercontext
- The context in which the expression is to be evaluatedpublic double asNumber() throws org.xml.sax.SAXException
asNumber
in class NodeSetValue
com.icl.saxon.expr.NodeSetValue
public boolean asBoolean() throws org.xml.sax.SAXException
asBoolean
in class SingletonNodeSet
com.icl.saxon.expr.SingletonNodeSet
public int getCount() throws org.xml.sax.SAXException
getCount
in class SingletonNodeSet
public boolean isEmpty() throws org.xml.sax.SAXException
isEmpty
in class SingletonNodeSet
public boolean isSingular() throws org.xml.sax.SAXException
isSingular
in class SingletonNodeSet
public boolean contains(NodeInfo node) throws org.xml.sax.SAXException
contains
in class SingletonNodeSet
public Expression simplify() throws org.xml.sax.SAXException
simplify
in class SingletonNodeSet
com.icl.saxon.expr.Value
public NodeInfo[] getNodes() throws org.xml.sax.SAXException
getNodes
in class SingletonNodeSet
public NodeInfo getFirst() throws org.xml.sax.SAXException
getFirst
in class SingletonNodeSet
public NodeEnumeration enumerate() throws org.xml.sax.SAXException
enumerate
in class SingletonNodeSet
public boolean equals(Value other) throws org.xml.sax.SAXException
equals
in class SingletonNodeSet
com.icl.saxon.expr.Value
public boolean notEquals(Value other) throws org.xml.sax.SAXException
notEquals
in class SingletonNodeSet
com.icl.saxon.expr.Value
public boolean compare(int operator, Value other) throws org.xml.sax.SAXException
compare
in class NodeSetValue
com.icl.saxon.expr.NodeSetValue
operator
- The comparison operator, one of Tokenizer.LE, Tokenizer.LT,
Tokenizer.GE, Tokenizer.GT,public int getType()
public int getDataType()
getDataType
in class NodeSetValue
public java.lang.String toString()
toString
in class java.lang.Object
public void startDocument() throws org.xml.sax.SAXException
startDocument
in interface Emitter
public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface Emitter
public void startElement(int name, org.xml.sax.Attributes attributes, int[] namespaces, int nscount) throws org.xml.sax.SAXException
startElement
in interface Emitter
com.icl.saxon.output.Emitter
namespaces
- Array of namespace codes identifying the namespace prefix/uri
pairs associated with this elementnscount
- Number of significant entries within namespaces arraypublic void endElement(int name) throws org.xml.sax.SAXException
endElement
in interface Emitter
public void characters(char[] chars, int start, int len) throws org.xml.sax.SAXException
characters
in interface Emitter
public void processingInstruction(java.lang.String name, java.lang.String data) throws org.xml.sax.SAXException
processingInstruction
in interface Emitter
public void comment(char[] chars, int start, int length) throws org.xml.sax.SAXException
comment
in interface Emitter
public void setWriter(java.io.Writer writer) throws org.xml.sax.SAXException
setWriter
in interface Emitter
public void setCharacterSet(CharacterSet charset) throws org.xml.sax.SAXException
setCharacterSet
in interface Emitter
public void setEscaping(boolean escaping) throws org.xml.sax.SAXException
setEscaping
in interface Emitter
public void setOutputDetails(OutputDetails details) throws org.xml.sax.SAXException
setOutputDetails
in interface Emitter
details
- The details of the required outputpublic void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator
in interface Emitter
public void setUnparsedEntity(java.lang.String name, java.lang.String uri)
setUnparsedEntity
in interface Emitter
public DocumentInfo getRootNode() throws org.xml.sax.SAXException
public void copy(Outputter out) throws org.xml.sax.SAXException
public void replay(Emitter emitter) throws org.xml.sax.SAXException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |