public static class TinyTextualElement.TinyTextualElementText extends java.lang.Object implements NodeInfo, javax.xml.transform.SourceLocator
Constructor and Description |
---|
TinyTextualElementText(TinyTextualElement element) |
Modifier and Type | Method and Description |
---|---|
AtomicSequence |
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 copyOptions,
Location locationId)
Copy the node to a given Outputter
|
boolean |
equals(java.lang.Object other)
Determine whether this is the same node as another node
|
void |
generateId(java.lang.StringBuilder buffer)
Get a character string that uniquely identifies this node
|
NamespaceMap |
getAllNamespaces()
Get all the namespace bindings that are in-scope for this element.
|
java.lang.String |
getAttributeValue(java.lang.String uri,
java.lang.String local)
Get the string value of a given attribute of this node
|
java.lang.String |
getBaseURI()
Get the base URI for the node.
|
int |
getColumnNumber()
Return the character position where the current document event ends.
|
NamespaceBinding[] |
getDeclaredNamespaces(NamespaceBinding[] buffer)
Get all namespace undeclarations and undeclarations defined on this element.
|
java.lang.String |
getDisplayName()
Get the display name of this 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 |
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.
|
NodeInfo |
getRoot()
Get the root node
|
SchemaType |
getSchemaType()
Get the type annotation of this node, if any.
|
java.lang.String |
getSystemId()
Get the system ID for the entity containing the node.
|
TreeInfo |
getTreeInfo()
Get information about the tree to which this NodeInfo belongs
|
UnicodeString |
getUnicodeStringValue()
Get the value of the item as a UnicodeString.
|
java.lang.String |
getURI()
Get the URI part of the name of this node.
|
boolean |
hasChildNodes()
Determine whether the node has any children.
|
boolean |
hasFingerprint()
Ask whether this NodeInfo implementation holds a fingerprint identifying the name of the
node in the NamePool.
|
int |
hashCode()
The hashCode() method obeys the contract for hashCode(): that is, if two objects are equal
(represent the same node) then they must have the same hashCode()
|
AxisIterator |
iterateAxis(int axisNumber)
Return an enumeration over the nodes reached by the given axis from this node
|
AxisIterator |
iterateAxis(int axisNumber,
NodePredicate predicate)
Return an enumeration over the nodes reached by the given axis from this node
|
Location |
saveLocation()
Get an immutable copy of this Location object.
|
void |
setSystemId(java.lang.String systemId)
Set the system ID for the entity containing the node.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
asActiveSource, attributes, children, children, deliver, getConfiguration, getGenre, getPublicId, isId, isIdref, isNilled, isSameNodeInfo, isStreamed, toShortString
getLength, getStringValue, head, itemAt, iterate, reduce, subsequence
asIterable, concatenate, containsNode, effectiveBooleanValue, materialize
makeRepeatable
public TinyTextualElementText(TinyTextualElement element)
public boolean hasFingerprint()
getFingerprint()
method must
return the fingerprint of the node. If the answer is false, then the getFingerprint()
method should throw an UnsupportedOperationException
. In the case of unnamed nodes
such as text nodes, the result can be either true (in which case getFingerprint() should
return -1) or false (in which case getFingerprint may throw an exception).hasFingerprint
in interface NodeInfo
FingerprintedNode
as a marker interface.public TreeInfo getTreeInfo()
getTreeInfo
in interface NodeInfo
public void setSystemId(java.lang.String systemId)
setSystemId
in interface javax.xml.transform.Source
setSystemId
in interface NodeInfo
public final int getNodeKind()
getNodeKind
in interface NodeInfo
Type
public UnicodeString getUnicodeStringValue()
getUnicodeStringValue
in interface GroundedValue
getUnicodeStringValue
in interface Item
public boolean equals(java.lang.Object other)
public int hashCode()
NodeInfo
public void generateId(java.lang.StringBuilder buffer)
generateId
in interface NodeInfo
buffer
- a buffer which will be updated to hold a string
that uniquely identifies this node, across all documents.public java.lang.String getSystemId()
getSystemId
in interface javax.xml.transform.Source
getSystemId
in interface javax.xml.transform.SourceLocator
getSystemId
in interface NodeInfo
getSystemId
in interface Location
getSystemId
in interface org.xml.sax.Locator
public java.lang.String getBaseURI()
getBaseURI
in interface NodeInfo
public int compareOrder(NodeInfo other)
compareOrder
in interface NodeInfo
other
- The other node, whose position is to be compared with this nodepublic int getFingerprint()
getFingerprint
in interface NodeInfo
public java.lang.String getPrefix()
public java.lang.String getURI()
public java.lang.String getDisplayName()
getDisplayName
in interface NodeInfo
public java.lang.String getLocalPart()
getLocalPart
in interface NodeInfo
public boolean hasChildNodes()
hasChildNodes
in interface NodeInfo
true
if this node has any attributes,
false
otherwise.public java.lang.String getAttributeValue(java.lang.String uri, java.lang.String local)
getAttributeValue
in interface NodeInfo
uri
- the namespace URI of the attribute name. Supply the empty string for an attribute
that is in no namespacelocal
- the local part of the attribute name.public int getLineNumber()
getLineNumber
in interface javax.xml.transform.SourceLocator
getLineNumber
in interface NodeInfo
getLineNumber
in interface Location
getLineNumber
in interface org.xml.sax.Locator
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
in interface javax.xml.transform.SourceLocator
getColumnNumber
in interface NodeInfo
getColumnNumber
in interface Location
getColumnNumber
in interface org.xml.sax.Locator
getLineNumber()
public Location saveLocation()
saveLocation
in interface Location
public SchemaType getSchemaType()
Types derived from a DTD are not reflected in the result of this method.
getSchemaType
in interface NodeInfo
public NamespaceBinding[] getDeclaredNamespaces(NamespaceBinding[] buffer)
getDeclaredNamespaces
in interface 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 NamespaceMap getAllNamespaces()
For an element return all the prefix-to-uri bindings that are in scope. This may include a binding to the default namespace (represented by a prefix of ""). It will never include "undeclarations" - that is, the namespace URI will never be empty; the effect of an undeclaration is to remove a binding from the in-scope namespaces, not to add anything.
For a node other than an element, returns null.
getAllNamespaces
in interface NodeInfo
public AtomicSequence atomize() throws XPathException
atomize
in interface Item
atomize
in interface NodeInfo
XPathException
- if the node has no typed value, for example if
it is an element node with element-only contentpublic AxisIterator iterateAxis(int axisNumber)
iterateAxis
in interface NodeInfo
axisNumber
- the axis to be iterated overAxisInfo
public AxisIterator iterateAxis(int axisNumber, NodePredicate predicate)
iterateAxis
in interface NodeInfo
axisNumber
- the axis to be iterated overpredicate
- A pattern to be matched by the returned nodesAxisInfo
public NodeInfo getParent()
public NodeInfo getRoot()
public void copy(Receiver out, int copyOptions, Location locationId) throws XPathException
copy
in interface 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.copyOptions
- a selection of the options defined in CopyOptions
locationId
- If non-null, identifies the location of the instruction
that requested this copy. If null, indicates that the location information
is not availableXPathException
- if any downstream error occursCopyright (c) 2004-2022 Saxonica Limited. All rights reserved.