public class GraftedElement extends TinyElementImpl
NODE_LETTER, nodeNr, parent, tree
IS_DTD_TYPE, IS_NILLED
Constructor and Description |
---|
GraftedElement(TinyTree tree,
int nodeNr,
NodeInfo externalNode,
boolean copyNamespaces)
Created a grafted element node
|
Modifier and Type | Method and Description |
---|---|
AtomicSequence |
atomize()
Get the typed value.
|
void |
copy(Receiver receiver,
int copyOptions,
Location location)
Copy this node to a given receiver
|
java.lang.String |
getAttributeValue(int fp)
Get the value of the attribute with a given fingerprint.
|
java.lang.String |
getAttributeValue(java.lang.String uri,
java.lang.String local)
Get the string value of a given attribute of this node
|
NamespaceBinding[] |
getDeclaredNamespaces(NamespaceBinding[] buffer)
Get all namespace undeclarations and undeclarations defined on this element.
|
NodeInfo |
getExternalNode() |
java.lang.String |
getStringValue()
Return the string-value of the node, that is, the concatenation
of the character content of all descendent elements and text nodes.
|
java.lang.CharSequence |
getStringValueCS()
Get the value of the item as a CharSequence.
|
boolean |
hasChildNodes()
Determine if the node has children.
|
boolean |
hasDefaultNamespace() |
AxisIterator |
iterateAxis(byte axisNumber)
Return an iterator over all the nodes reached by the given axis from this node
|
AxisIterator |
iterateAxis(byte axisNumber,
NodeTest nodeTest)
Return an iterator over the nodes reached by the given axis from this node
|
checkNotNamespaceSensitiveElement, getBaseURI, getDeclaredNamespaces, getNodeKind, getSchemaType, getURIForPrefix, hasUniformNamespaces, isId, isIdref
getStringValueCS
compareOrder, equals, generateId, getColumnNumber, getConfiguration, getDisplayName, getFingerprint, getGenre, getLineNumber, getLocalPart, getNamePool, getNodeNumber, getParent, getPrefix, getRoot, getSequenceNumber, getSystemId, getTree, getTreeInfo, getURI, hasFingerprint, hashCode, head, isAncestorOrSelf, isNilled, isSameNodeInfo, isStreamed, iterate, saveLocation, setParentNode, setSystemId
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getPublicId, toShortString
getLength, itemAt, iterator, reduce, subsequence, toGroundedValue
asIterable, effectiveBooleanValue, materialize
makeRepeatable
public GraftedElement(TinyTree tree, int nodeNr, NodeInfo externalNode, boolean copyNamespaces)
tree
- the host tree that is to contain a reference to an external nodenodeNr
- the node number at which the external reference is to appearexternalNode
- the external node, in some other treecopyNamespaces
- indicates whether namespaces in the external tree are
retained in the virtual copy.public NodeInfo getExternalNode()
public boolean hasChildNodes()
TinyParentNodeImpl
hasChildNodes
in interface NodeInfo
hasChildNodes
in class TinyParentNodeImpl
true
if this node has any attributes,
false
otherwise.public java.lang.CharSequence getStringValueCS()
TinyParentNodeImpl
getStringValueCS
in interface GroundedValue<NodeInfo>
getStringValueCS
in interface Item<NodeInfo>
getStringValueCS
in class TinyParentNodeImpl
Item.getStringValue()
public java.lang.String getStringValue()
TinyParentNodeImpl
getStringValue
in interface GroundedValue<NodeInfo>
getStringValue
in interface Item<NodeInfo>
getStringValue
in interface NodeInfo
getStringValue
in class TinyParentNodeImpl
Item.getStringValueCS()
public AtomicSequence atomize() throws XPathException
TinyElementImpl
atomize
in interface Item<NodeInfo>
atomize
in interface NodeInfo
atomize
in class TinyElementImpl
XPathException
- if the node has no typed value, for example if
it is an element node with element-only contentpublic void copy(Receiver receiver, int copyOptions, Location location) throws XPathException
TinyElementImpl
copy
in interface NodeInfo
copy
in class TinyElementImpl
receiver
- 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
- determines handling of namespaces, etclocation
- location information associated with the eventXPathException
- if any downstream error occurspublic AxisIterator iterateAxis(byte axisNumber)
TinyNodeImpl
iterateAxis
in interface NodeInfo
iterateAxis
in class TinyNodeImpl
axisNumber
- Identifies the required axis, eg. Axis.CHILD or Axis.PARENTAxisInfo
public AxisIterator iterateAxis(byte axisNumber, NodeTest nodeTest)
TinyNodeImpl
iterateAxis
in interface NodeInfo
iterateAxis
in class TinyNodeImpl
axisNumber
- Identifies the required axis, eg. Axis.CHILD or Axis.PARENTnodeTest
- A pattern to be matched by the returned nodes.AxisInfo
public java.lang.String getAttributeValue(int fp)
getAttributeValue
in class TinyElementImpl
fp
- the fingerprint of the required attributepublic java.lang.String getAttributeValue(java.lang.String uri, java.lang.String local)
TinyElementImpl
getAttributeValue
in interface NodeInfo
getAttributeValue
in class TinyElementImpl
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 boolean hasDefaultNamespace()
public NamespaceBinding[] getDeclaredNamespaces(NamespaceBinding[] buffer)
TinyElementImpl
getDeclaredNamespaces
in interface NodeInfo
getDeclaredNamespaces
in class TinyElementImpl
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.Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.