sboag       01/03/29 11:17:54

  Modified:    java/src/org/apache/xml/utils DTM.java
  Added:       java/src/org/apache/xml/utils DTMFilter.java
                        DTMIterator.java DTMManager.java
  Log:
  Ongoing DTM interface work.  Added DTMFilter, DTMIterator, and
  DTMManager.
  
  Revision  Changes    Path
  1.2       +13 -12    xml-xalan/java/src/org/apache/xml/utils/DTM.java
  
  Index: DTM.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/utils/DTM.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DTM.java  2001/03/28 04:44:23     1.1
  +++ DTM.java  2001/03/29 19:17:53     1.2
  @@ -87,6 +87,7 @@
    * <p>DTM does _not_ directly support the W3C's Document Object Model. 
However,
    * it attempts to come close enough that an implementation of DTM can be 
created 
    * that wraps a DOM.</p>
  + * <p>State: In progress!!</p>
    */
   public interface DTM
   {
  @@ -170,7 +171,7 @@
      * If not yet resolved, waits for more nodes to be added to the document 
and
      * tries again.
      * 
  -   * @param nodeHandle int Index of this node's record.
  +   * @param nodeHandle int Handle of the node..
      * @return int DTM node-number of first child, or -1 to indicate none 
exists.
      */
     public int getFirstChild(int nodeHandle);
  @@ -180,7 +181,7 @@
      * If not yet resolved, waits for more nodes to be added to the document 
and
      * tries again.
      * 
  -   * @param nodeHandle int Index of this node's record.
  +   * @param nodeHandle int Handle of the node..
      * @return int Node-number of last child,
      * or -1 to indicate none exists.
      */
  @@ -189,7 +190,7 @@
     /**
      * Given a node handle, get the index of the node's first attribute.
      * 
  -   * @param nodeHandle int Index of this node's record.
  +   * @param nodeHandle int Handle of the node..
      * @return Handle of first attribute, or -1 to indicate none exists.
      */
     public int getFirstAttribute(int nodeHandle);
  @@ -213,7 +214,7 @@
      * Given a node handle, advance to its next sibling.
      * If not yet resolved, waits for more nodes to be added to the document 
and
      * tries again.
  -   * @param nodeHandle int Index of this node's record.
  +   * @param nodeHandle int Handle of the node..
      * @return int Node-number of next sibling,
      * or -1 to indicate none exists.
      */
  @@ -223,7 +224,7 @@
      * Given a node handle, find its preceeding sibling.
      * WARNING: DTM is asymmetric; this operation is resolved by search, and is
      * relatively expensive.
  -   * @param postition int Index of this node's record.
  +   * @param postition int Handle of the node..
      *
      * @param nodeHandle the id of the node.
      * @return int Node-number of the previous sib,
  @@ -236,7 +237,7 @@
      * element, we advance to its first attribute; if an attr, we advance to
      * the next attr on the same node.
      * 
  -   * @param nodeHandle int Index of this node's record.
  +   * @param nodeHandle int Handle of the node..
      * @return int DTM node-number of the resolved attr,
      * or -1 to indicate none exists.
      */
  @@ -256,7 +257,7 @@
      * tries again.
      *
      * @param subtreeRootNodeHandle
  -   * @param nodeHandle int Index of this node's record.
  +   * @param nodeHandle int Handle of the node..
      * @return handle of next descendant,
      * or -1 to indicate none exists.
      */
  @@ -284,7 +285,7 @@
   
     /**
      * Given a node handle, find its parent node.
  -   * @param postition int Index of this node's record.
  +   * @param postition int Handle of the node..
      *
      * @param nodeHandle the id of the node.
      * @return int Node-number of parent,
  @@ -393,7 +394,7 @@
      * Given a node handle, return its DOM-style name prefix.
      * (As defined in Namespaces, this is the portion of the name before any
      * colon character)
  -   * @param postition int Index of this node's record.
  +   * @param postition int Handle of the node..
      *
      * @param nodeHandle the id of the node.
      * @return String prefix of this node's name, or null if no explicit
  @@ -405,7 +406,7 @@
      * Given a node handle, return its DOM-style namespace URI
      * (As defined in Namespaces, this is the declared URI which this node's
      * prefix -- or default in lieu thereof -- was mapped to.)
  -   * @param postition int Index of this node's record.
  +   * @param postition int Handle of the node..
      *
      * @param nodeHandle the id of the node.
      * @return String URI value of this node's namespace, or null if no
  @@ -417,7 +418,7 @@
      * Given a node handle, return its node value. This is mostly
      * as defined by the DOM, but may ignore some conveniences.
      * <p>
  -   * @param postition int Index of this node's record.
  +   * @param postition int Handle of the node..
      *
      * @param nodeHandle The node id.
      * @return String Value of this node, or null if not
  @@ -427,7 +428,7 @@
   
     /**
      * Given a node handle, return its DOM-style node type.
  -   * @param postition int Index of this node's record.
  +   * @param postition int Handle of the node..
      *
      * @param nodeHandle The node id.
      * @return int Node type, as per the DOM's Node._NODE constants.
  
  
  
  1.1                  xml-xalan/java/src/org/apache/xml/utils/DTMFilter.java
  
  Index: DTMFilter.java
  ===================================================================
  package org.apache.xml.utils;
  
  /**
   * Simple filter for doing node tests.  Note the semantics of this are 
somewhat 
   * different that the DOM's NodeFilter.
   */
  public interface DTMFilter
  {
  
    // Constants for whatToShow.  These are used to set the node type that will 
    // be traversed.
  
    /**
     * Show all <code>Nodes</code>.
     */
    public static final int SHOW_ALL = 0xFFFFFFFF;
  
    /**
     * Show <code>Element</code> nodes.
     */
    public static final int SHOW_ELEMENT = 0x00000001;
  
    /**
     * Show <code>Attr</code> nodes. This is meaningful only when creating an
     * iterator or tree-walker with an attribute node as its
     * <code>root</code>; in this case, it means that the attribute node
     * will appear in the first position of the iteration or traversal.
     * Since attributes are never children of other nodes, they do not
     * appear when traversing over the document tree.
     */
    public static final int SHOW_ATTRIBUTE = 0x00000002;
  
    /**
     * Show <code>Text</code> nodes.
     */
    public static final int SHOW_TEXT = 0x00000004;
  
    /**
     * Show <code>CDATASection</code> nodes.
     */
    public static final int SHOW_CDATA_SECTION = 0x00000008;
  
    /**
     * Show <code>EntityReference</code> nodes.
     */
    public static final int SHOW_ENTITY_REFERENCE = 0x00000010;
  
    /**
     * Show <code>Entity</code> nodes. This is meaningful only when creating
     * an iterator or tree-walker with an<code> Entity</code> node as its
     * <code>root</code>; in this case, it means that the <code>Entity</code>
     *  node will appear in the first position of the traversal. Since
     * entities are not part of the document tree, they do not appear when
     * traversing over the document tree.
     */
    public static final int SHOW_ENTITY = 0x00000020;
  
    /**
     * Show <code>ProcessingInstruction</code> nodes.
     */
    public static final int SHOW_PROCESSING_INSTRUCTION = 0x00000040;
  
    /**
     * Show <code>Comment</code> nodes.
     */
    public static final int SHOW_COMMENT = 0x00000080;
  
    /**
     * Show <code>Document</code> nodes.
     */
    public static final int SHOW_DOCUMENT = 0x00000100;
  
    /**
     * Show <code>DocumentType</code> nodes.
     */
    public static final int SHOW_DOCUMENT_TYPE = 0x00000200;
  
    /**
     * Show <code>DocumentFragment</code> nodes.
     */
    public static final int SHOW_DOCUMENT_FRAGMENT = 0x00000400;
  
    /**
     * Show <code>Notation</code> nodes. This is meaningful only when creating
     * an iterator or tree-walker with a <code>Notation</code> node as its
     * <code>root</code>; in this case, it means that the
     * <code>Notation</code> node will appear in the first position of the
     * traversal. Since notations are not part of the document tree, they do
     * not appear when traversing over the document tree.
     */
    public static final int SHOW_NOTATION = 0x00000800;
    
    /** This bit specifies a namespace, and extends the SHOW_XXX stuff 
     *  in [EMAIL PROTECTED] org.w3c.dom.traversal.NodeFilter}. */
    public static final int SHOW_NAMESPACE = 0x00001000;
  
    /**
     * Special bitmap for match patterns starting with a function.
     * Make sure this does not conflict with [EMAIL PROTECTED] 
org.w3c.dom.traversal.NodeFilter}.
     */
    public static final int SHOW_BYFUNCTION = 0x00010000;
  
    /**
     * Test whether a specified node is visible in the logical view of a
     * <code>DTMIterator</code>. Normally, this function
     * will be called by the implementation of <code>DTMIterator</code>; 
     * it is not normally called directly from
     * user code.
     * 
     * @param nodeHandle int Handle of the node.
     * @param whatToShow one of SHOW_XXX values.
     * @return one of FILTER_ACCEPT, FILTER_REJECT, or FILTER_SKIP.
     */
    public short acceptNode(int nodeHandle, int whatToShow);
    
    /**
     * Test whether a specified node is visible in the logical view of a
     * <code>DTMIterator</code>. Normally, this function
     * will be called by the implementation of <code>DTMIterator</code>; 
     * it is not normally called directly from
     * user code.
     * 
     * @param nodeHandle int Handle of the node.
     * @param whatToShow one of SHOW_XXX values.
     * @param expandedName a value defining the exanded name as defined in 
     *                     the DTM interface.  Wild cards will be defined 
     *                     by 0xFFFF in the high word and/or in the low word.
     * @return one of FILTER_ACCEPT, FILTER_REJECT, or FILTER_SKIP.
     */
    public short acceptNode(int nodeHandle, int whatToShow, int expandedName);
   
  }
  
  
  1.1                  xml-xalan/java/src/org/apache/xml/utils/DTMIterator.java
  
  Index: DTMIterator.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Xalan" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 1999, Lotus
   * Development Corporation., http://www.lotus.com.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.xml.utils;
  
  /**
   * <code>Iterators</code> are used to step through a set of nodes.  
   * It is modeled largely after the DOM NodeIterator.
   * 
   * <p>A DTMIterator is a somewhat unusual type of iterator, in that it 
   * can serve both single node iteration and random access.</p>
   * 
   * <p>The DTMIterator's traversal semantics, i.e. how it walks the tree,
   * are specified when it is created, possibly and probably by an XPath
   * <a href="http://www.w3.org/TR/xpath#NT-LocationPath>LocationPath</a> or 
   * a <a href="http://www.w3.org/TR/xpath#NT-UnionExpr";>UnionExpr</a>.</p>
   * 
   * <p>A DTMIterator is meant to be created once as a master static object, 
and 
   * then cloned many times for runtime use.  Or the master object itself may 
   * be used for simpler use cases.</p>
   * <p>State: In progress!!</p>
   */
  public interface DTMIterator
  {
  
    // Constants returned by acceptNode
  
    /**
     * Accept the node.
     */
    public static final short FILTER_ACCEPT = 1;
  
    /**
     * Reject the node. (same as FILTER_SKIP).
     */
    public static final short FILTER_REJECT = 2;
  
    /**
     * Skip this single node. 
     */
    public static final short FILTER_SKIP = 3;
    
    /**
     * Set the environment in which this iterator operates, which should 
provide:
     * a node (the context node... same value as "root" defined below) 
     * a pair of non-zero positive integers (the context position and the 
context size) 
     * a set of variable bindings 
     * a function library 
     * the set of namespace declarations in scope for the expression.
     * 
     * <p>At this time the exact implementation of this environment is 
application 
     * dependent.  Probably a proper interface will be created fairly soon.</p>
     * 
     * @param environment The environment object.
     */
    public void setEnvironment(Object environment);
  
    /**
     * The root node of the <code>DTMIterator</code>, as specified when it
     * was created.  Note the root node is not the root node of the 
     * document tree, but the context node from where the itteration 
     * begins.
     *
     * @return nodeHandle int Handle of the context node.
     */
    public int getRoot();
  
    /**
     * The root node of the <code>DTMIterator</code>, as specified when it
     * was created.  Note the root node is not the root node of the 
     * document tree, but the context node from where the itteration 
     * begins.
     *
     * @param nodeHandle int Handle of the context node.
     */
    public void setRoot(int nodeHandle);
    
    /**
     * Reset the iterator to the start.
     */
    public void reset();
  
    /**
     * This attribute determines which node types are presented via the
     * iterator. The available set of constants is defined above.  
     * Nodes not accepted by
     * <code>whatToShow</code> will be skipped, but their children may still
     * be considered.
     *
     * @return one of the SHOW_XXX constants.
     */
    public int getWhatToShow();
  
    /**
     *  The value of this flag determines whether the children of entity
     * reference nodes are visible to the iterator. If false, they  and
     * their descendants will be rejected. Note that this rejection takes
     * precedence over <code>whatToShow</code> and the filter. 
     * <br>
     * <br> To produce a view of the document that has entity references
     * expanded and does not expose the entity reference node itself, use
     * the <code>whatToShow</code> flags to hide the entity reference node
     * and set <code>expandEntityReferences</code> to true when creating the
     * iterator. To produce a view of the document that has entity reference
     * nodes but no entity expansion, use the <code>whatToShow</code> flags
     * to show the entity reference node and set
     * <code>expandEntityReferences</code> to false.
     *
     * @return true if entity references will be expanded.
     */
    public boolean getExpandEntityReferences();
  
    /**
     * Returns the next node in the set and advances the position of the
     * iterator in the set. After a <code>DTMIterator</code> has setRoot called,
     * the first call to <code>nextNode()</code> returns the first node in
     * the set.
     * @return The next node handle in the set being iterated over, or
     *   -1 if there are no more members in that set.
     */
    public int nextNode();
  
    /**
     * Returns the previous node in the set and moves the position of the
     * <code>DTMIterator</code> backwards in the set.
     * @return The previous node handle in the set being iterated over,
     *   or <code>null</code> if there are no more members in that set.
     */
    public int previousNode();
  
    /**
     * Detaches the <code>DTMIterator</code> from the set which it iterated
     * over, releasing any computational resources and placing the iterator
     * in the INVALID state. After <code>detach</code> has been invoked,
     * calls to <code>nextNode</code> or <code>previousNode</code> will
     * raise a runtime exception.
     */
    public void detach();
  
    /**
     * Get the current node in the iterator.</a>.
     *
     * @return The current node handle, or -1.
     */
    public int getCurrentNode();
  
    /**
     * Tells if this NodeSet is "fresh", in other words, if
     * the first nextNode() that is called will return the
     * first node in the set.
     *
     * @return true if the iteration of this list has not yet begun.
     */
    public boolean isFresh();
  
    //========= Random Access ==========
  
    /**
     * If setShouldCacheNodes(true) is called, then nodes will
     * be cached, enabling random access, and giving the ability to do 
     * sorts and the like.  They are not cached by default.
     *
     * @param b true if the nodes should be cached.
     */
    public void setShouldCacheNodes(boolean b);
  
    /**
     * Get the current position, which is one less than
     * the next nextNode() call will retrieve.  i.e. if
     * you call getCurrentPos() and the return is 0, the next
     * fetch will take place at index 1.
     *
     * @return The position of the iteration.</a>.
     */
    public int getCurrentPos();
  
    /**
     * If an index is requested, NodeSet will call this method
     * to run the iterator to the index.  By default this sets
     * m_next to the index.  If the index argument is -1, this
     * signals that the iterator should be run to the end.
     *
     * @param index The index to run to, or -1 if the iterator should be run
     *              to the end.
     */
    public void runTo(int index);
  
    /**
     * Set the current position in the node set.
     * 
     * @param i Must be a valid index.
     */
    public void setCurrentPos(int i);
  
    /**
     * Returns the <code>node handle</code> of an item in the collection. If
     * <code>index</code> is greater than or equal to the number of nodes in
     * the list, this returns <code>null</code>.
     *
     * @param index of the item.
     * @return The node handle at the <code>index</code>th position in the
     *   <code>DTMIterator</code>, or <code>-1</code> if that is not a valid
     *   index.
     */
    public int item(int index);
    
    /**
     * The number of nodes in the list. The range of valid child node indices
     * is 0 to <code>length-1</code> inclusive.
     *
     * @return The number of nodes in the list.
     */
    public int getLength();
    
    //=========== Cloning operations. ============
    
    /**
     * Get a cloned Iterator that is reset to the start of the iteration.
     *
     * @return A clone of this iteration that has been reset.
     *
     * @throws CloneNotSupportedException
     */
    public DTMIterator cloneWithReset() throws CloneNotSupportedException;
  
    /**
     * Get a clone of this iterator, but don't reset the iteration in the 
     * process, so that it may be used from the current position.
     *
     * @return A clone of this object.
     *
     * @throws CloneNotSupportedException
     */
    public Object clone() throws CloneNotSupportedException;
  
  }
  
  
  
  1.1                  xml-xalan/java/src/org/apache/xml/utils/DTMManager.java
  
  Index: DTMManager.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Xalan" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 1999, Lotus
   * Development Corporation., http://www.lotus.com.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.xml.utils;
  
  /**
   * A DTMManager instance can be used to create DTM and
   * DTMIterator objects, and manage the DTM objects in the system.
   *
   * <p>The system property that determines which Factory implementation
   * to create is named "org.apache.xml.utils.DTMFactory". This
   * property names a concrete subclass of the DTMFactory abstract
   *  class. If the property is not defined, a platform default is be used.</p>
   *  
   * <p>An instance of this class <emph>must</emph> be safe to use across 
   * thread instances.  It is expected that a client will create a single 
instance 
   * of a DTMManager to use across multiple threads.  This will allow sharing 
   * of DTMs across multiple processes.</p>
   *  
   * <p>Note: this class is incomplete right now.  It will be pretty much 
   * modeled after javax.xml.transform.TransformerFactory in terms of its 
   * factory support.</p>
   * 
   * <p>State: In progress!!</p>
   */
  public abstract class DTMManager
  {
  
    /**
     * Default constructor is protected on purpose.
     */
    protected DTMManager(){}
  
    /**
     * Get an instance of a DTM.  If the unique flag is true, a new instance 
will
     * always be returned.  Otherwise it is up to the DTMManager to return a
     * new instance or an instance that it already created and may be being used
     * by someone else.
     * (I think more parameters will need to be added for error handling, and 
entity
     * resolution).
     *
     * @param source the specification of the source object.
     * @param unique true if the returned DTM must be unique, probably because 
it
     * is going to be mutated.
     *
     * @return a non-null DTM reference.
     */
    public abstract DTM getDTM(javax.xml.transform.Source source,
                               boolean unique);
                               
    /**
     * Get an instance of a DTM that "owns" a node handle.
     *
     * @param nodeHandle the nodeHandle.
     *
     * @return a non-null DTM reference.
     */
    public abstract DTM getDTM(int nodeHandle);
  
  
    /**
     * Create a new <code>DTMIterator</code> based on an XPath
     * <a href="http://www.w3.org/TR/xpath#NT-LocationPath>LocationPath</a> or
     * a <a href="http://www.w3.org/TR/xpath#NT-UnionExpr";>UnionExpr</a>.
     *
     * @param xpathCompiler ??? Somehow we need to pass in a subpart of the
     * expression.  I hate to do this with strings, since the larger expression
     * has already been parsed.
     *
     * @param pos The position in the expression.
     * @return The newly created <code>DTMIterator</code>.
     */
    public abstract DTMIterator createDTMIterator(Object xpathCompiler,
            int pos);
  
    /**
     * Create a new <code>DTMIterator</code> based on an XPath
     * <a href="http://www.w3.org/TR/xpath#NT-LocationPath>LocationPath</a> or
     * a <a href="http://www.w3.org/TR/xpath#NT-UnionExpr";>UnionExpr</a>.
     *
     * @param xpathString Must be a valid string expressing a
     * <a href="http://www.w3.org/TR/xpath#NT-LocationPath>LocationPath</a> or
     * a <a href="http://www.w3.org/TR/xpath#NT-UnionExpr";>UnionExpr</a>.
     *
     * @param presolver An object that can resolve prefixes to namespace URLs.
     *
     * @return The newly created <code>DTMIterator</code>.
     */
    public abstract DTMIterator createDTMIterator(String xpathString,
            PrefixResolver presolver);
  
    /**
     * Create a new <code>DTMIterator</code> based only on a whatToShow and
     * a DTMFilter.  The traversal semantics are defined as the descendant
     * access.
     *
     * @param whatToShow This flag specifies which node types may appear in
     *   the logical view of the tree presented by the iterator. See the
     *   description of <code>NodeFilter</code> for the set of possible
     *   <code>SHOW_</code> values.These flags can be combined using
     *   <code>OR</code>.
     * @param filter The <code>NodeFilter</code> to be used with this
     *   <code>TreeWalker</code>, or <code>null</code> to indicate no filter.
     * @param entityReferenceExpansion The value of this flag determines
     *   whether entity reference nodes are expanded.
     *
     * @return The newly created <code>NodeIterator</code>.
     */
    public abstract DTMIterator createDTMIterator(int whatToShow,
            DTMFilter filter, boolean entityReferenceExpansion);
  }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to