com.saxonica.stream.om
Class FleetingElementNode

java.lang.Object
  extended by com.saxonica.stream.om.FleetingNode
      extended by com.saxonica.stream.om.FleetingElementNode
All Implemented Interfaces:
Source, PullEvent, FingerprintedNode, Item, NodeInfo, ValueRepresentation

public class FleetingElementNode
extends FleetingNode


Field Summary
 
Fields inherited from class com.saxonica.stream.om.FleetingNode
root
 
Fields inherited from interface net.sf.saxon.om.NodeInfo
ALL_NAMESPACES, EMPTY_NAMESPACE_LIST, IS_DTD_TYPE, IS_NILLED, LOCAL_NAMESPACES, NO_NAMESPACES
 
Fields inherited from interface net.sf.saxon.om.ValueRepresentation
EMPTY_VALUE_ARRAY
 
Constructor Summary
FleetingElementNode()
           
 
Method Summary
 String getAttributeValue(int fingerprint)
          Get the string value of a given attribute of this node
 int[] getDeclaredNamespaces(int[] buffer)
          Get all namespace declarations and undeclarations defined on this element.
 AxisIterator iterateAxis(byte axisNumber, NodeTest nodeTest)
          Return an iteration over all the nodes reached by the given axis from this node that match a given NodeTest
 void setAttributes(AttributeCollection attributes)
           
 void setLocalNamespaces(int[] namespaces)
           
 
Methods inherited from class com.saxonica.stream.om.FleetingNode
atomize, compareOrder, copy, generateId, getBaseURI, getColumnNumber, getConfiguration, getDisplayName, getDocumentNumber, getDocumentRoot, getFingerprint, getLineNumber, getLocalPart, getNameCode, getNamePool, getNodeKind, getParent, getPrefix, getRoot, getStringValue, getStringValueCS, getSystemId, getTypeAnnotation, getTypedValue, getURI, hasChildNodes, isId, isIdref, isNilled, isSameNodeInfo, iterateAxis, setNameCode, setNodeKind, setParent, setStringValue, setSystemId, setTypeAnnotation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.saxon.om.NodeInfo
equals, hashCode
 

Constructor Detail

FleetingElementNode

public FleetingElementNode()
Method Detail

setLocalNamespaces

public void setLocalNamespaces(int[] namespaces)

setAttributes

public void setAttributes(AttributeCollection attributes)

iterateAxis

public AxisIterator iterateAxis(byte axisNumber,
                                NodeTest nodeTest)
Return an iteration over all the nodes reached by the given axis from this node that match a given NodeTest

Specified by:
iterateAxis in interface NodeInfo
Overrides:
iterateAxis in class FleetingNode
Parameters:
axisNumber - an integer identifying the axis; one of the constants defined in class Axis
nodeTest - A condition to be satisfied by the returned nodes; nodes that do not satisfy this condition are not included in the result
Returns:
an AxisIterator that delivers the nodes reached by the axis in turn. The nodes are returned in axis order (document order for a forwards axis, reverse document order for a reverse axis).
Throws:
UnsupportedOperationException - if the namespace axis is requested and this axis is not supported for this implementation.
Since:
8.4
See Also:
Axis

getDeclaredNamespaces

public int[] getDeclaredNamespaces(int[] buffer)
Get all namespace declarations and undeclarations defined on this element.

This method is intended primarily for internal use. User applications needing information about the namespace context of a node should use iterateAxis(Axis.NAMESPACE). (However, not all implementations support the namespace axis, whereas all implementations are required to support this method.)

Specified by:
getDeclaredNamespaces in interface NodeInfo
Overrides:
getDeclaredNamespaces in class FleetingNode
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 integers 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 codes, whose meaning may be interpreted by reference to the name pool. The top half word of each namespace code represents the prefix, the bottom half represents the URI. If the bottom half is zero, 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 -1.

For a node other than an element, the method returns null.


getAttributeValue

public String getAttributeValue(int fingerprint)
Get the string value of a given attribute of this node

Specified by:
getAttributeValue in interface NodeInfo
Overrides:
getAttributeValue in class FleetingNode
Parameters:
fingerprint - The fingerprint 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.
Since:
8.4


Copyright (c) Saxonica Limited. All rights reserved.