APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xml.internal.dtm.ref

public Class DTMAxisIterNodeList

extends DTMNodeListBase
Class Inheritance
Imports
com.sun.org.apache.xml.internal.dtm.DTM, .DTMAxisIterator, com.sun.org.apache.xml.internal.utils.IntVector, org.w3c.dom.Node

DTMAxisNodeList gives us an implementation of the DOM's NodeList interface wrapped around a DTM Iterator. The author considers this something of an abominations, since NodeList was not intended to be a general purpose "list of nodes" API and is generally considered by the DOM WG to have be a mistake... but I'm told that some of the XPath/XSLT folks say they must have this solution. Please note that this is not necessarily equivlaent to a DOM NodeList operating over the same document. In particular:

State: In progress!!

Field Summary

Modifier and TypeField and Description
private IntVector
private DTM
private DTMAxisIterator
private int

Constructor Summary

AccessConstructor and Description
private
public
DTMAxisIterNodeList(DTM dtm, DTMAxisIterator dtmAxisIterator)

Public constructor: Wrap a DTMNodeList around an existing and preconfigured DTMAxisIterator

Method Summary

Modifier and TypeMethod and Description
public DTMAxisIterator
getDTMAxisIterator()

Access the wrapped DTMIterator.

public int
public Node

Returns:

The node at the indexth position in the NodeList, or null if that is not a valid index.
item
(int
Index into the collection.
index
)

Overrides com.sun.org.apache.xml.internal.dtm.ref.DTMNodeListBase.item.

Implements org.w3c.dom.NodeList.item.

Returns the indexth item in the collection.

Field Detail

m_cachedNodesback to summary
private IntVector m_cachedNodes
m_dtmback to summary
private DTM m_dtm
m_iterback to summary
private DTMAxisIterator m_iter
m_lastback to summary
private int m_last

Constructor Detail

DTMAxisIterNodeListback to summary
private DTMAxisIterNodeList()
DTMAxisIterNodeListback to summary
public DTMAxisIterNodeList(DTM dtm, DTMAxisIterator dtmAxisIterator)

Public constructor: Wrap a DTMNodeList around an existing and preconfigured DTMAxisIterator

Method Detail

getDTMAxisIteratorback to summary
public DTMAxisIterator getDTMAxisIterator()

Access the wrapped DTMIterator. I'm not sure whether anyone will need this or not, but let's write it and think about it.

getLengthback to summary
public int getLength()

Overrides com.sun.org.apache.xml.internal.dtm.ref.DTMNodeListBase.getLength.

Implements org.w3c.dom.NodeList.getLength.

The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive.

itemback to summary
public Node item(int index)

Overrides com.sun.org.apache.xml.internal.dtm.ref.DTMNodeListBase.item.

Implements org.w3c.dom.NodeList.item.

Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.

Parameters
index:int

Index into the collection.

Returns:Node

The node at the indexth position in the NodeList, or null if that is not a valid index.