Package net.sf.saxon.tree.tiny
Class TinyTextualElement
java.lang.Object
net.sf.saxon.tree.tiny.TinyNodeImpl
net.sf.saxon.tree.tiny.TinyParentNodeImpl
net.sf.saxon.tree.tiny.TinyElementImpl
net.sf.saxon.tree.tiny.TinyTextualElement
- All Implemented Interfaces:
Source,SourceLocator,ActiveSource,GroundedValue,Item,NodeInfo,Sequence,Location,Locator
An element node in the TinyTree that has no attributes or namespace declarations and that
has a single text node child. The element-and-text-node pair are represented by a single
entry in the node arrays, but materialize as two separate objects when turned into node
objects.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInner class representing the text node; this is created on demand -
Field Summary
Fields inherited from class net.sf.saxon.tree.tiny.TinyNodeImpl
NODE_LETTER, nodeNr, parent, tree -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCopy this node to a given receiverGet all the namespace bindings that are in-scope for this element.getAttributeValue(int fp) Get the value of the attribute with a given fingerprint.getAttributeValue(NamespaceUri uri, String local) Get the string value of a given attribute of this nodegetDeclaredNamespaces(NamespaceBinding[] buffer) Get all namespace undeclarations and undeclarations defined on this element.Make an instance of the text nodeReturn the string-value of the node, that is, the concatenation of the character content of all descendent elements and text nodes.booleanDetermine if the node has children.booleanTest if this node is an ancestor-or-self of anotheriterateAxis(int axisNumber) Return an iterator over all the nodes reached by the given axis from this nodeiterateAxis(int axisNumber, NodePredicate nodeTest) Return an iterator over the nodes reached by the given axis from this nodeMethods inherited from class net.sf.saxon.tree.tiny.TinyElementImpl
atomize, checkNotNamespaceSensitiveElement, getBaseURI, getNodeKind, getSchemaType, hasUniformNamespaces, isId, isIdrefMethods inherited from class net.sf.saxon.tree.tiny.TinyParentNodeImpl
getStringValueMethods inherited from class net.sf.saxon.tree.tiny.TinyNodeImpl
compareOrder, equals, generateId, getColumnNumber, getConfiguration, getDisplayName, getFingerprint, getGenre, getLineNumber, getLocalPart, getNamePool, getNamespaceUri, getNodeNumber, getParent, getParentNodeNr, getPrefix, getRoot, getSequenceNumber, getSystemId, getTree, getTreeInfo, hasFingerprint, hashCode, hasURI, head, isNilled, isSameNodeInfo, isStreamed, saveLocation, setParentNode, setSystemIdMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.saxon.om.GroundedValue
asIterable, concatenate, containsNode, effectiveBooleanValue, materializeMethods inherited from interface net.sf.saxon.om.Item
getLength, getStringValue, itemAt, iterate, reduce, subsequenceMethods inherited from interface net.sf.saxon.om.NodeInfo
asActiveSource, attributes, children, children, deliver, getAttributeValue, getPublicId, getURI, toShortStringMethods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
Constructor Details
-
TinyTextualElement
-
-
Method Details
-
getDeclaredNamespaces
Description copied from class:TinyElementImplGet all namespace undeclarations and undeclarations defined on this element.- Specified by:
getDeclaredNamespacesin interfaceNodeInfo- Overrides:
getDeclaredNamespacesin classTinyElementImpl- Parameters:
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.- Returns:
- An array of objects representing the namespace declarations and undeclarations present on this element. For a node other than an element, return null. Otherwise, the returned array is a sequence of namespace binding objects (essentially prefix/uri pairs) If the URI is null, then this is a namespace undeclaration rather than a declaration. The XML namespace is never included in the list. If the supplied array is larger than required, then the first unused entry will be set to null.
-
getAllNamespaces
Description copied from class:TinyNodeImplGet all the namespace bindings that are in-scope for this element.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.
- Specified by:
getAllNamespacesin interfaceNodeInfo- Overrides:
getAllNamespacesin classTinyElementImpl- Returns:
- the in-scope namespaces for an element, or null for any other kind of node.
-
getAttributeValue
Description copied from class:TinyElementImplGet the string value of a given attribute of this node- Specified by:
getAttributeValuein interfaceNodeInfo- Overrides:
getAttributeValuein classTinyElementImpl- Parameters:
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.- Returns:
- the attribute value if it exists, or null if it does not exist. Always returns null if this node is not an element.
-
getAttributeValue
Description copied from class:TinyElementImplGet the value of the attribute with a given fingerprint.- Overrides:
getAttributeValuein classTinyElementImpl- Parameters:
fp- the fingerprint of the required attribute- Returns:
- the string value of the attribute if present, or null if absent
-
copy
Description copied from class:TinyElementImplCopy this node to a given receiver- Specified by:
copyin interfaceNodeInfo- Overrides:
copyin classTinyElementImpl- Parameters:
receiver- the destination of the copycopyOptions- determines handling of namespaces, etclocation- location information associated with the event- Throws:
XPathException- if any downstream error occurs
-
hasChildNodes
public boolean hasChildNodes()Description copied from class:TinyParentNodeImplDetermine if the node has children.- Specified by:
hasChildNodesin interfaceNodeInfo- Overrides:
hasChildNodesin classTinyParentNodeImpl- Returns:
trueif this node has any attributes,falseotherwise.
-
getUnicodeStringValue
Description copied from class:TinyParentNodeImplReturn the string-value of the node, that is, the concatenation of the character content of all descendent elements and text nodes.- Specified by:
getUnicodeStringValuein interfaceGroundedValue- Specified by:
getUnicodeStringValuein interfaceItem- Overrides:
getUnicodeStringValuein classTinyParentNodeImpl- Returns:
- the accumulated character content of the element, including descendant elements.
-
iterateAxis
Description copied from class:TinyNodeImplReturn an iterator over all the nodes reached by the given axis from this node- Specified by:
iterateAxisin interfaceNodeInfo- Overrides:
iterateAxisin classTinyNodeImpl- Parameters:
axisNumber- Identifies the required axis, eg. Axis.CHILD or Axis.PARENT- Returns:
- a AxisIteratorImpl that scans the nodes reached by the axis in turn.
- See Also:
-
iterateAxis
Description copied from class:TinyNodeImplReturn an iterator over the nodes reached by the given axis from this node- Specified by:
iterateAxisin interfaceNodeInfo- Overrides:
iterateAxisin classTinyNodeImpl- Parameters:
axisNumber- Identifies the required axis, eg. Axis.CHILD or Axis.PARENTnodeTest- A condition to be matched by the returned nodes.- Returns:
- a AxisIteratorImpl that scans the nodes reached by the axis in turn.
- See Also:
-
isAncestorOrSelf
Description copied from class:TinyNodeImplTest if this node is an ancestor-or-self of another- Overrides:
isAncestorOrSelfin classTinyNodeImpl- Parameters:
d- the putative descendant-or-self node- Returns:
- true if this node is an ancestor-or-self of d
-
getTextNode
Make an instance of the text node- Returns:
- the new or existing instance
-