public final class TextFragmentValue extends java.lang.Object implements DocumentInfo, FingerprintedNode, javax.xml.transform.SourceLocator
ALL_NAMESPACES, EMPTY_NAMESPACE_LIST, IS_DTD_TYPE, IS_NILLED, LOCAL_NAMESPACES, NO_NAMESPACES
EMPTY_VALUE_ARRAY
?????? |
---|
TextFragmentValue(java.lang.CharSequence value,
java.lang.String baseURI)
Constructor: create a result tree fragment containing a single text node
|
?????? | ????? |
---|---|
Value |
atomize()
Get the typed value.
|
int |
compareOrder(NodeInfo other)
Determine the relative position of this node and another node, in document order.
|
void |
copy(Receiver out,
int whichNamespaces,
boolean copyAnnotations,
int locationId)
Copy the result tree fragment value to a given Outputter
|
void |
generateId(FastStringBuffer buffer)
Get a character string that uniquely identifies this node
|
java.lang.String |
getAttributeValue(int fingerprint)
Get the value of a given attribute of this node
|
java.lang.String |
getBaseURI()
Get the base URI for the document node.
|
int |
getColumnNumber()
Return the character position where the current document event ends.
|
Configuration |
getConfiguration()
Get the configuration previously set using setConfiguration
(or the default configuraton allocated automatically)
|
int[] |
getDeclaredNamespaces(int[] buffer)
Get all namespace undeclarations and undeclarations defined on this element.
|
java.lang.String |
getDisplayName()
Get the display name of this node.
|
int |
getDocumentNumber()
Get the unique document number
|
DocumentInfo |
getDocumentRoot()
Get the root (document) node
|
int |
getFingerprint()
Get the fingerprint of the node, used for matching names
|
int |
getLineNumber()
Get line number
|
java.lang.String |
getLocalPart()
Get the local name of this node.
|
int |
getNameCode()
Get the name code of the node, used for displaying names
|
NamePool |
getNamePool()
Get the name pool used for the names in this document
|
int |
getNodeKind()
Return the type of node.
|
NodeInfo |
getParent()
Find the parent node of this node.
|
java.lang.String |
getPrefix()
Get the prefix part of the name of this node.
|
java.lang.String |
getPublicId()
Return the public identifier for the current document event.
|
NodeInfo |
getRoot()
Get the root node
|
java.lang.String |
getStringValue()
Get the String Value
|
java.lang.CharSequence |
getStringValueCS()
Get the value of the item as a CharSequence.
|
java.lang.String |
getSystemId()
Get the system ID (the document URI) of the document node.
|
int |
getTypeAnnotation()
Get the type annotation of this node, if any.
|
SequenceIterator |
getTypedValue()
Get the typed value of the item
|
java.lang.String[] |
getUnparsedEntity(java.lang.String name)
Get the unparsed entity with a given name
|
java.util.Iterator |
getUnparsedEntityNames()
Get the list of unparsed entities defined in this document
|
java.lang.String |
getURI()
Get the URI part of the name of this node.
|
boolean |
hasChildNodes()
Determine whether the node has any children.
|
boolean |
isId()
Determine whether this node has the is-id property
|
boolean |
isIdref()
Determine whether this node has the is-idref property
|
boolean |
isNilled()
Determine whether the node has the is-nilled property
|
boolean |
isSameNodeInfo(NodeInfo other)
Determine whether this is the same node as another node
|
AxisIterator |
iterateAxis(byte axisNumber)
Return an iteration over the nodes reached by the given axis from this node
|
AxisIterator |
iterateAxis(byte axisNumber,
NodeTest nodeTest)
Return an enumeration over the nodes reached by the given axis from this node
|
NodeInfo |
selectID(java.lang.String id)
Get the element with a given ID.
|
void |
setConfiguration(Configuration config)
Set the configuration (containing the name pool used for all names in this document)
|
void |
setSystemId(java.lang.String systemId)
Set the system ID (that is, the document URI property) for the document node.
|
public TextFragmentValue(java.lang.CharSequence value, java.lang.String baseURI)
value
- a String containing the valuebaseURI
- the base URI of the document nodepublic void setConfiguration(Configuration config)
public Configuration getConfiguration()
getConfiguration
???? NodeInfo
public NamePool getNamePool()
getNamePool
???? NodeInfo
public int getDocumentNumber()
getDocumentNumber
???? NodeInfo
public final int getNodeKind()
getNodeKind
???? NodeInfo
Type
public java.lang.String getStringValue()
getStringValue
???? Item
getStringValue
???? NodeInfo
getStringValue
???? ValueRepresentation
Item.getStringValueCS()
public java.lang.CharSequence getStringValueCS()
getStringValueCS
???? Item
getStringValueCS
???? ValueRepresentation
Item.getStringValue()
public boolean isSameNodeInfo(NodeInfo other)
isSameNodeInfo
???? NodeInfo
other
- the node to be compared with this nodepublic void generateId(FastStringBuffer buffer)
generateId
???? NodeInfo
buffer
- the buffer to contain the generated IDpublic void setSystemId(java.lang.String systemId)
setSystemId
???? javax.xml.transform.Source
java.lang.UnsupportedOperationException
- (always). This kind of tree does not have a document URI.public java.lang.String getSystemId()
getSystemId
???? javax.xml.transform.Source
getSystemId
???? javax.xml.transform.SourceLocator
getSystemId
???? NodeInfo
public java.lang.String getBaseURI()
getBaseURI
???? NodeInfo
public int compareOrder(NodeInfo other)
compareOrder
???? NodeInfo
other
- The other node, whose position is to be compared with this nodepublic int getNameCode()
getNameCode
???? NodeInfo
allocate
,
getFingerprint
public int getFingerprint()
getFingerprint
???? NodeInfo
public java.lang.String getPrefix()
public java.lang.String getURI()
public java.lang.String getDisplayName()
getDisplayName
???? NodeInfo
public java.lang.String getLocalPart()
getLocalPart
???? NodeInfo
public boolean hasChildNodes()
hasChildNodes
???? NodeInfo
true
if this node has any attributes,
false
otherwise.public int getLineNumber()
getLineNumber
???? javax.xml.transform.SourceLocator
getLineNumber
???? NodeInfo
public int getTypeAnnotation()
getTypeAnnotation
???? NodeInfo
Type
public int[] getDeclaredNamespaces(int[] buffer)
getDeclaredNamespaces
???? NodeInfo
buffer
- If this is non-null, and the result array fits in this buffer, then the result
may overwrite the contents of this array, to avoid the cost of allocating a new array on the heap.For a node other than an element, the method returns null.
public SequenceIterator getTypedValue()
getTypedValue
???? Item
public Value atomize()
Item.getTypedValue()
. However, this method is often more convenient and may be
more efficient, especially in the common case where the value is expected to be a singleton.public java.lang.String getPublicId()
The return value is the public identifier of the document entity or of the external parsed entity in which the markup that triggered the event appears.
getPublicId
???? javax.xml.transform.SourceLocator
getSystemId()
public int getColumnNumber()
Warning: The return value from the method is intended only as an approximation for the sake of error reporting; it is not intended to provide sufficient information to edit the character content of the original XML document.
The return value is an approximation of the column number in the document entity or external parsed entity where the markup that triggered the event appears.
getColumnNumber
???? javax.xml.transform.SourceLocator
getColumnNumber
???? NodeInfo
getLineNumber()
public java.lang.String getAttributeValue(int fingerprint)
getAttributeValue
???? NodeInfo
fingerprint
- The fingerprint of the attribute namepublic AxisIterator iterateAxis(byte axisNumber)
iterateAxis
???? NodeInfo
axisNumber
- The axis to be iterated overAxis
public AxisIterator iterateAxis(byte axisNumber, NodeTest nodeTest)
iterateAxis
???? NodeInfo
axisNumber
- The axis to be iterated overnodeTest
- A pattern to be matched by the returned nodesAxis
public NodeInfo getParent()
public NodeInfo getRoot()
public DocumentInfo getDocumentRoot()
getDocumentRoot
???? NodeInfo
public void copy(Receiver out, int whichNamespaces, boolean copyAnnotations, int locationId) throws XPathException
copy
???? NodeInfo
out
- the Receiver to which the node should be copied. It is the caller's
responsibility to ensure that this Receiver is open before the method is called
(or that it is self-opening), and that it is closed after use.whichNamespaces
- in the case of an element, controls
which namespace nodes should be copied. Values are NodeInfo.NO_NAMESPACES
,
NodeInfo.LOCAL_NAMESPACES
, NodeInfo.ALL_NAMESPACES
copyAnnotations
- indicates whether the type annotations
of element and attribute nodes should be copiedlocationId
- If non-zero, identifies the location of the instruction
that requested this copy. If zero, indicates that the location information
for the original node is to be copied; in this case the Receiver must be
a LocationCopierXPathException
public NodeInfo selectID(java.lang.String id)
selectID
???? DocumentInfo
id
- The unique ID of the required elementpublic java.util.Iterator getUnparsedEntityNames()
getUnparsedEntityNames
???? DocumentInfo
public java.lang.String[] getUnparsedEntity(java.lang.String name)
getUnparsedEntity
???? DocumentInfo
name
- the name of the entitypublic boolean isId()
public boolean isIdref()