286N/A * reserved comment block 286N/A * DO NOT REMOVE OR ALTER! 286N/A * Copyright 1999-2004 The Apache Software Foundation. 286N/A * Licensed under the Apache License, Version 2.0 (the "License"); 286N/A * you may not use this file except in compliance with the License. 286N/A * You may obtain a copy of the License at 286N/A * Unless required by applicable law or agreed to in writing, software 286N/A * distributed under the License is distributed on an "AS IS" BASIS, 286N/A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 286N/A * See the License for the specific language governing permissions and 286N/A * limitations under the License. 286N/A * <code>DTMNodeList</code> gives us an implementation of the DOM's 286N/A * NodeList interface wrapped around a DTM Iterator. The author 286N/A * considers this something of an abominations, since NodeList was not 286N/A * intended to be a general purpose "list of nodes" API and is 286N/A * generally considered by the DOM WG to have be a mistake... but I'm 286N/A * Please note that this is not necessarily equivlaent to a DOM 286N/A * NodeList operating over the same document. In particular: 286N/A * <li>If there are several Text nodes in logical succession (ie, 286N/A * across CDATASection and EntityReference boundaries), we will return 286N/A * only the first; the caller is responsible for stepping through 286N/A * (%REVIEW% Provide a convenience routine here to assist, pending 286N/A * proposed DOM Level 3 getAdjacentText() operation?) </li> 286N/A * <li>Since the whole XPath/XSLT architecture assumes that the source 286N/A * document is not altered while we're working with it, we do not 286N/A * promise to implement the DOM NodeList's "live view" response to 286N/A * document mutation. </li> 286N/A * <p>State: In progress!!</p> 286N/A //================================================================ 286N/A // Methods unique to this class 286N/A * Public constructor: Create a NodeList to support 286N/A * DTMNodeProxy.getChildren(). 286N/A * Unfortunately AxisIterators and DTMIterators don't share an API, 286N/A * so I can't use the existing Axis.CHILD iterator. Rather than 286N/A * create Yet Another Class, let's set up a special case of this 286N/A * @param parentDTM The DTM containing this node 286N/A * @param parentHandle DTM node-handle integer 286N/A //================================================================ 286N/A // org.w3c.dom.NodeList API follows 286N/A * Returns the <code>index</code>th item in the collection. If 286N/A * <code>index</code> is greater than or equal to the number of nodes in 286N/A * the list, this returns <code>null</code>. 286N/A * @param index Index into the collection. 286N/A * @return The node at the <code>index</code>th position in the 286N/A * <code>NodeList</code>, or <code>null</code> if that is not a valid 286N/A * The number of nodes in the list. The range of valid child node indices 286N/A * is 0 to <code>length-1</code> inclusive.