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>, NodeInfo, ValueRepresentation<NodeInfo>

public class FleetingElementNode
extends FleetingNode

Represents an element node available transiently within a streamed document


Field Summary
 
Fields inherited from class com.saxonica.stream.om.FleetingNode
root
 
Fields inherited from interface net.sf.saxon.om.NodeInfo
ALL_NAMESPACES, 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
 void copy(Receiver out, int copyOptions, int locationId)
          Copy this node to a given Receiver.
 String getAttributeValue(int fingerprint)
          Get the string value of a given attribute of this node
 String getAttributeValue(String uri, String local)
          Get the string value of a given attribute of this node
 NamespaceBinding[] getDeclaredNamespaces(NamespaceBinding[] 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(NamespaceBinding[] namespaces)
           
 
Methods inherited from class com.saxonica.stream.om.FleetingNode
atomize, compareOrder, generateId, getBaseURI, getColumnNumber, getConfiguration, getDisplayName, getDocumentNumber, getDocumentRoot, getFingerprint, getLineNumber, getLocalPart, getNameCode, getNamePool, getNodeKind, getParent, getPrefix, getRoot, getSchemaType, getStringValue, getStringValueCS, getSystemId, getTypeAnnotation, getTypedValue, getURI, hasChildNodes, isId, isIdref, isNilled, isSameNodeInfo, iterateAxis, setNodeKind, setNodeName, 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(NamespaceBinding[] namespaces)

setAttributes

public void setAttributes(AttributeCollection attributes)

copy

public void copy(Receiver out,
                 int copyOptions,
                 int locationId)
          throws XPathException
Copy this node to a given Receiver.

This method is primarily for internal use. It should not be considered a stable part of the Saxon API.

Specified by:
copy in interface NodeInfo
Overrides:
copy in class FleetingNode
Parameters:
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 -
locationId - If non-zero, identifies the location of the instruction that requested this copy. If zero, indicates that the location information for the original node is to be copied; in this case the Receiver must be
Throws:
XPathException - if any downstream error occurs

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 NamespaceBinding[] getDeclaredNamespaces(NamespaceBinding[] 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

getAttributeValue

public String getAttributeValue(String uri,
                                String local)
Get the string value of a given attribute of this node

Specified by:
getAttributeValue in interface NodeInfo
Overrides:
getAttributeValue in class FleetingNode
Parameters:
uri - the namespace URI of the attribute name. Supply the empty string for an attribute that is in no namespace
local - 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.
Since:
9.4


Copyright (c) 2004-2011 Saxonica Limited. All rights reserved.