com.icl.saxon.tree
public abstract class NodeImpl extends AbstractNode
This is the top-level class in the implementation class hierarchy; it essentially contains all those methods that can be defined using other primitive methods, without direct access to data.
Field Summary | |
---|---|
protected static NodeInfo[] | emptyArray |
protected int | index |
protected ParentNodeImpl | parent |
Method Summary | |
---|---|
int | compareOrder(NodeInfo other)
Determine the relative position of this node and another node, in document order.
|
String | generateId()
Get a character string that uniquely identifies this node within this document
(The calling code will prepend a document identifier) |
NamedNodeMap | getAttributes()
Return a NamedNodeMap containing the attributes of this node (if
it is an Element ) or null otherwise. |
String | getAttributeValue(String uri, String localName)
Find the value of a given attribute of this node. |
String | getAttributeValue(int fingerprint)
Get the value of a given attribute of this node |
String | getBaseURI()
Get the base URI for the node. |
NodeList | getChildNodes()
Return a NodeList that contains all children of this node. |
String | getDisplayName()
Get the display name of this node. |
Element | getDocumentElement()
Get the outermost element. |
DocumentInfo | getDocumentRoot()
Get the root (document) node |
AxisEnumeration | getEnumeration(byte axisNumber, NodeTest nodeTest)
Return an enumeration over the nodes reached by the given axis from this node |
int | getFingerprint()
Get the fingerprint of the node. |
Node | getFirstChild()
Get first child - default implementation used for leaf nodes |
Node | getLastChild()
Get last child - default implementation used for leaf nodes |
int | getLineNumber()
Get the line number of the node within its source document entity |
String | getLocalName()
Get the local name of this node. |
int | getNameCode()
Get the nameCode of the node. |
NamePool | getNamePool()
Get the NamePool |
NodeImpl | getNextInDocument(NodeImpl anchor)
Get the next node in document order |
Node | getNextSibling()
Get next sibling node |
Node | getOriginatingNode()
Get the node corresponding to this javax.xml.transform.dom.DOMLocator |
NodeInfo | getParent()
Find the parent node of this node. |
String | getPrefix()
Get the prefix part of the name of this node. |
NodeImpl | getPreviousInDocument()
Get the previous node in document order |
Node | getPreviousSibling()
Get the previous sibling of the node |
protected long | getSequenceNumber()
Get the node sequence number (in document order). |
String | getSystemId()
Get the system ID for the node. |
String | getURI()
Get the URI part of the name of this node. |
boolean | hasAttributes()
Returns whether this node (if it is an element) has any attributes. |
boolean | hasChildNodes()
Determine whether the node has any children. |
boolean | isSameNodeInfo(NodeInfo other)
Determine whether this is the same node as another node |
void | outputNamespaceNodes(Outputter out, boolean includeAncestors)
Output all namespace nodes associated with this element. |
void | removeNode()
Remove this node from the tree. |
void | setSystemId(String uri)
Set the system ID of this node. |
Parameters: other The other node, whose position is to be compared with this node
Returns: -1 if this node precedes the other node, +1 if it follows the other node, or 0 if they are the same node. (In this case, isSameNode() will always return true, and the two nodes will produce the same result for generateId())
Returns: a string.
NamedNodeMap
containing the attributes of this node (if
it is an Element
) or null
otherwise. (DOM method)Parameters: uri the namespace uri of an attribute localName the local name of an attribute
Returns: the value of the attribute, if it exists, otherwise null
Parameters: fingerprint The fingerprint of the attribute name
Returns: the attribute value if it exists or null if not
NodeList
that contains all children of this node. If
there are no children, this is a NodeList
containing no
nodes.Returns: The display name of this node. For a node with no name, return an empty string.
Returns: the Element node for the outermost element of the document. If the document is not well-formed, this returns the last element child of the root if there is one, otherwise null.
Returns: the DocumentInfo representing the containing document
Parameters: node NodeInfo representing the node from which the enumeration starts nodeType the type(s) of node to be included, e.g. NodeInfo.ELEMENT, NodeInfo.TEXT. The value NodeInfo.NODE means include any type of node. nodeTest A pattern to be matched by the returned nodes
Returns: an AxisEnumeration that scans the nodes reached by the axis in turn.
Returns: null
Returns: null
Returns: The local name of this node. For a node with no name, return an empty string.
Parameters: anchor: the scan stops when it reaches a node that is not a descendant of the specified anchor node
Returns: the next node in the document, or null if there is no such node
Returns: The next sibling node of the required type. Returns null if the current node is the last child of its parent.
Returns: The Node object describing the containing element or root node.
Returns: the prefix part of the name. For an unnamed node, return an empty string.
Returns: the previous node in the document, or null if there is no such node
Returns: The previous sibling node. Returns null if the current node is the first child of its parent.
Returns: The URI of the namespace of this node. For the default namespace, return an empty string. For an unnamed node, return null.
Returns: true
if this node has any attributes,
false
otherwise.
Since: DOM Level 2
Returns: true
if the node has any children,
false
if the node has no children.
Returns: true if this Node object and the supplied Node object represent the same node in the tree.
Parameters: out The relevant outputter includeAncestors True if namespaces declared on ancestor elements must be output; false if it is known that these are already on the result tree