You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by tn...@apache.org on 2002/05/27 23:13:07 UTC

cvs commit: xml-xerces/c/src/xercesc/dom DOMDocumentRange.hpp DOMDocumentTraversal.hpp DOM.hpp DOMDocument.hpp Makefile.in

tng         02/05/27 14:13:07

  Modified:    c/src/xercesc/dom DOM.hpp DOMDocument.hpp Makefile.in
  Added:       c/src/xercesc/dom DOMDocumentRange.hpp
                        DOMDocumentTraversal.hpp
  Log:
  Add DOMDocumentRange and DOMDocumentTraversal.
  
  Revision  Changes    Path
  1.4       +3 -1      xml-xerces/c/src/xercesc/dom/DOM.hpp
  
  Index: DOM.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/DOM.hpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DOM.hpp	21 May 2002 20:29:08 -0000	1.3
  +++ DOM.hpp	27 May 2002 21:13:07 -0000	1.4
  @@ -58,7 +58,7 @@
    */
   
   /*
  - * $Id: DOM.hpp,v 1.3 2002/05/21 20:29:08 tng Exp $
  + * $Id: DOM.hpp,v 1.4 2002/05/27 21:13:07 tng Exp $
    */
   
   //
  @@ -71,6 +71,8 @@
   #include <xercesc/dom/DOMCharacterData.hpp>
   #include <xercesc/dom/DOMComment.hpp>
   #include <xercesc/dom/DOMDocument.hpp>
  +#include <xercesc/dom/DOMDocumentRange.hpp>
  +#include <xercesc/dom/DOMDocumentTraversal.hpp>
   #include <xercesc/dom/DOMDocumentFragment.hpp>
   #include <xercesc/dom/DOMDocumentType.hpp>
   #include <xercesc/dom/DOMException.hpp>
  
  
  
  1.4       +7 -78     xml-xerces/c/src/xercesc/dom/DOMDocument.hpp
  
  Index: DOMDocument.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/DOMDocument.hpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DOMDocument.hpp	27 May 2002 18:28:26 -0000	1.3
  +++ DOMDocument.hpp	27 May 2002 21:13:07 -0000	1.4
  @@ -58,11 +58,14 @@
    */
   
   /*
  - * $Id: DOMDocument.hpp,v 1.3 2002/05/27 18:28:26 tng Exp $
  + * $Id: DOMDocument.hpp,v 1.4 2002/05/27 21:13:07 tng Exp $
   */
   
   #include <xercesc/util/XercesDefs.hpp>
   #include "DOMNode.hpp"
  +#include "DOMDocumentRange.hpp"
  +#include "DOMDocumentTraversal.hpp"
  +
   
   class DOMNodeIteratorImpl;
   
  @@ -81,9 +84,6 @@
   class DOMNotation;
   class DOMText;
   class DOMNode;
  -class DOMNodeIterator;
  -class DOMTreeWalker;
  -class DOMRange;
   
   
   /**
  @@ -98,7 +98,9 @@
   * <code>ownerDocument</code> attribute which associates them with the
   * <code>Document</code> within whose  context they were created.
   */
  -class CDOM_EXPORT DOMDocument: public DOMNode {
  +class CDOM_EXPORT DOMDocument: public DOMDocumentRange,
  + public DOMDocumentTraversal,
  + public DOMNode {
   
   protected:
       /** @name Constructors and assignment operators */
  @@ -271,79 +273,6 @@
        */
       virtual DOMEntityReference    *createEntityReference(const XMLCh *name) = 0;
   
  -
  -    /**
  -     * Creates a NodeIterator object.   (DOM2)
  -     *
  -     * NodeIterators are used to step through a set of nodes, e.g. the set of nodes in a NodeList, the
  -     * document subtree governed by a particular node, the results of a query, or any other set of nodes.
  -     * The set of nodes to be iterated is determined by the implementation of the NodeIterator. DOM Level 2
  -     * specifies a single NodeIterator implementation for document-order traversal of a document subtree.
  -     * Instances of these iterators are created by calling <code>DocumentTraversal.createNodeIterator()</code>.
  -     *
  -     * 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 expandEntityReferences 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
  -     * expandEntityReferences to false.
  -     *
  -     * @param root The root node of the DOM tree
  -     * @param whatToShow This attribute determines which node types are presented via the iterator.
  -     * @param filter The filter used to screen nodes
  -     * @param entityReferenceExpansion The value of this flag determines whether the children of entity reference nodes are
  -     *                   visible to the iterator. If false, they will be skipped over.
  -     */
  -
  -    virtual DOMNodeIterator *createNodeIterator(DOMNode         *root,
  -                                                   unsigned long    whatToShow,
  -                                                   DOMNodeFilter* filter,
  -                                                   bool             entityReferenceExpansion) = 0;
  -     /**
  -     * Creates a TreeWalker object.   (DOM2)
  -     *
  -     * TreeWalker objects are used to navigate a document tree or subtree using the view of the document defined
  -     * by its whatToShow flags and any filters that are defined for the TreeWalker. Any function which performs
  -     * navigation using a TreeWalker will automatically support any view defined by a TreeWalker.
  -     *
  -     * Omitting nodes from the logical view of a subtree can result in a structure that is substantially different from
  -     * the same subtree in the complete, unfiltered document. Nodes that are siblings in the TreeWalker view may
  -     * be children of different, widely separated nodes in the original view. For instance, consider a Filter that skips
  -     * all nodes except for Text nodes and the root node of a document. In the logical view that results, all text
  -     * nodes will be siblings and appear as direct children of the root node, no matter how deeply nested the
  -     * structure of the original document.
  -     *
  -     * To produce a view of the document that has entity references expanded
  -     * and does not expose the entity reference node itself, use the whatToShow
  -     * flags to hide the entity reference node and set <code>expandEntityReferences</code> to
  -     * true when creating the TreeWalker. 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
  -     *
  -     * @param root The root node of the DOM tree
  -     * @param whatToShow This attribute determines which node types are presented via the tree-walker.
  -     * @param filter The filter used to screen nodes
  -     * @param entityReferenceExpansion The value of this flag determines whether the children of entity reference nodes are
  -     *                   visible to the tree-walker. If false, they will be skipped over.
  -     */
  -
  -    virtual DOMTreeWalker  *createTreeWalker(DOMNode        *root,
  -                                               unsigned long     whatToShow,
  -                                               DOMNodeFilter  *filter,
  -                                               bool              entityReferenceExpansion) = 0;
  -
  -    /**
  -	  * To create the range  consisting of boundary-points and offset of the
  -      * selected contents
  -      *
  -      * @return The initial state of the Range such that both the boundary-points
  -      * are positioned at the beginning of the corresponding DOMDOcument, before
  -      * any content. The range returned can only be used to select content
  -      * associated with this document, or with documentFragments and Attrs for
  -      * which this document is the ownerdocument
  -	  */
  -    virtual DOMRange    *createRange() = 0;
   
       //@}
       /** @name Getter functions */
  
  
  
  1.4       +3 -1      xml-xerces/c/src/xercesc/dom/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/Makefile.in,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Makefile.in	23 May 2002 15:47:24 -0000	1.3
  +++ Makefile.in	27 May 2002 21:13:07 -0000	1.4
  @@ -54,7 +54,7 @@
   # <http://www.apache.org/>.
   #
   #
  -# $Id: Makefile.in,v 1.3 2002/05/23 15:47:24 knoaman Exp $
  +# $Id: Makefile.in,v 1.4 2002/05/27 21:13:07 tng Exp $
   #
   
   PLATFORM = @platform@
  @@ -83,6 +83,8 @@
   	DOMCharacterData.hpp \
   	DOMComment.hpp \
   	DOMDocument.hpp \
  +	DOMDocumentRange.hpp \
  +	DOMDocumentTraversal.hpp \
   	DOMDocumentFragment.hpp \
   	DOMDocumentType.hpp \
   	DOMElement.hpp \
  
  
  
  1.1                  xml-xerces/c/src/xercesc/dom/DOMDocumentRange.hpp
  
  Index: DOMDocumentRange.hpp
  ===================================================================
  #ifndef DOMDocumentRange_HEADER_GUARD_
  #define DOMDocumentRange_HEADER_GUARD_
  
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2002 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 "Xerces" 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 apache\@apache.org.
   *
   * 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) 2002, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Id: DOMDocumentRange.hpp,v 1.1 2002/05/27 21:13:07 tng Exp $
  */
  
  #include <xercesc/util/XercesDefs.hpp>
  
  class DOMRange;
  
  
  /**
   * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
   * @since DOM Level 2
   */
  class CDOM_EXPORT DOMDocumentRange {
  
  protected:
      DOMDocumentRange() {};
      DOMDocumentRange(const DOMDocumentRange &other) {};
      DOMDocumentRange & operator = (const DOMDocumentRange &other) {return *this;};
  
  public:
      virtual ~DOMDocumentRange() {};
  
  
    //@}
    /** @name Factory methods to create new nodes for the Document */
    //@{
  
      /**
  	  * To create the range  consisting of boundary-points and offset of the
        * selected contents
        *
        * @return The initial state of the Range such that both the boundary-points
        * are positioned at the beginning of the corresponding DOMDOcument, before
        * any content. The range returned can only be used to select content
        * associated with this document, or with documentFragments and Attrs for
        * which this document is the ownerdocument
  	  */
      virtual DOMRange    *createRange() = 0;
  
      //@}
  };
  
  
  #endif
  
  
  
  1.1                  xml-xerces/c/src/xercesc/dom/DOMDocumentTraversal.hpp
  
  Index: DOMDocumentTraversal.hpp
  ===================================================================
  #ifndef DOMDocumentTraversal_HEADER_GUARD_
  #define DOMDocumentTraversal_HEADER_GUARD_
  
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2002 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 "Xerces" 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 apache\@apache.org.
   *
   * 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) 2002, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Id: DOMDocumentTraversal.hpp,v 1.1 2002/05/27 21:13:07 tng Exp $
  */
  
  #include <xercesc/util/XercesDefs.hpp>
  
  class DOMNode;
  class DOMNodeFilter;
  class DOMNodeIterator;
  class DOMTreeWalker;
  
  
  /**
   * <code>DocumentTraversal</code> contains methods that create
   * <code>NodeIterators</code> and <code>TreeWalkers</code> to traverse a
   * node and its children in document order (depth first, pre-order
   * traversal, which is equivalent to the order in which the start tags occur
   * in the text representation of the document). In DOMs which support the
   * Traversal feature, <code>DocumentTraversal</code> will be implemented by
   * the same objects that implement the Document interface.
   * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
   * @since DOM Level 2
   */
  class CDOM_EXPORT DOMDocumentTraversal {
  
  protected:
      DOMDocumentTraversal() {};
      DOMDocumentTraversal(const DOMDocumentTraversal &other) {};
      DOMDocumentTraversal & operator = (const DOMDocumentTraversal &other) {return *this;};
  
  public:
      virtual ~DOMDocumentTraversal() {};
  
    //@}
    /** @name Factory methods to create new nodes for the Document */
    //@{
  
      /**
       * Creates a NodeIterator object.   (DOM2)
       *
       * NodeIterators are used to step through a set of nodes, e.g. the set of nodes in a NodeList, the
       * document subtree governed by a particular node, the results of a query, or any other set of nodes.
       * The set of nodes to be iterated is determined by the implementation of the NodeIterator. DOM Level 2
       * specifies a single NodeIterator implementation for document-order traversal of a document subtree.
       * Instances of these iterators are created by calling <code>DocumentTraversal.createNodeIterator()</code>.
       *
       * 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 expandEntityReferences 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
       * expandEntityReferences to false.
       *
       * @param root The root node of the DOM tree
       * @param whatToShow This attribute determines which node types are presented via the iterator.
       * @param filter The filter used to screen nodes
       * @param entityReferenceExpansion The value of this flag determines whether the children of entity reference nodes are
       *                   visible to the iterator. If false, they will be skipped over.
       */
  
      virtual DOMNodeIterator *createNodeIterator(DOMNode         *root,
                                                     unsigned long    whatToShow,
                                                     DOMNodeFilter* filter,
                                                     bool             entityReferenceExpansion) = 0;
       /**
       * Creates a TreeWalker object.   (DOM2)
       *
       * TreeWalker objects are used to navigate a document tree or subtree using the view of the document defined
       * by its whatToShow flags and any filters that are defined for the TreeWalker. Any function which performs
       * navigation using a TreeWalker will automatically support any view defined by a TreeWalker.
       *
       * Omitting nodes from the logical view of a subtree can result in a structure that is substantially different from
       * the same subtree in the complete, unfiltered document. Nodes that are siblings in the TreeWalker view may
       * be children of different, widely separated nodes in the original view. For instance, consider a Filter that skips
       * all nodes except for Text nodes and the root node of a document. In the logical view that results, all text
       * nodes will be siblings and appear as direct children of the root node, no matter how deeply nested the
       * structure of the original document.
       *
       * To produce a view of the document that has entity references expanded
       * and does not expose the entity reference node itself, use the whatToShow
       * flags to hide the entity reference node and set <code>expandEntityReferences</code> to
       * true when creating the TreeWalker. 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
       *
       * @param root The root node of the DOM tree
       * @param whatToShow This attribute determines which node types are presented via the tree-walker.
       * @param filter The filter used to screen nodes
       * @param entityReferenceExpansion The value of this flag determines whether the children of entity reference nodes are
       *                   visible to the tree-walker. If false, they will be skipped over.
       */
  
      virtual DOMTreeWalker  *createTreeWalker(DOMNode        *root,
                                                 unsigned long     whatToShow,
                                                 DOMNodeFilter  *filter,
                                                 bool              entityReferenceExpansion) = 0;
  
      //@}
  };
  
  
  #endif
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org