You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by an...@locus.apache.org on 2000/06/02 02:06:03 UTC

cvs commit: xml-xerces/c/src/dom AttrImpl.cpp NamedNodeMapImpl.cpp NodeImpl.hpp

andyh       00/06/01 17:06:03

  Modified:    c/src/dom AttrImpl.cpp NamedNodeMapImpl.cpp NodeImpl.hpp
  Log:
  FIx problems with cloning or importing attributes setting the "specified"
  flag incorrectly.  From  Joe Polastre
  
  Revision  Changes    Path
  1.19      +10 -5     xml-xerces/c/src/dom/AttrImpl.cpp
  
  Index: AttrImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/dom/AttrImpl.cpp,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- AttrImpl.cpp	2000/05/16 18:56:40	1.18
  +++ AttrImpl.cpp	2000/06/02 00:06:02	1.19
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: AttrImpl.cpp,v 1.18 2000/05/16 18:56:40 andyh Exp $
  + * $Id: AttrImpl.cpp,v 1.19 2000/06/02 00:06:02 andyh Exp $
    */
   
   #include "AttrImpl.hpp"
  @@ -78,10 +78,15 @@
       : ParentNode(other)
   {
       name = other.name.clone();
  -    specified(false);
  -    idAttr(false);
  -    if (deep)
  -      cloneChildren(other);
  +	
  +    specified(true);
  +    if (other.idAttr())
  +    {
  +        idAttr(true);
  +        this->getOwnerDocument()->getNodeIDMap()->add(this);
  +    }
  +    
  +	cloneChildren(other);
   };
   
   
  
  
  
  1.16      +3 -1      xml-xerces/c/src/dom/NamedNodeMapImpl.cpp
  
  Index: NamedNodeMapImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/dom/NamedNodeMapImpl.cpp,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- NamedNodeMapImpl.cpp	2000/05/02 21:13:48	1.15
  +++ NamedNodeMapImpl.cpp	2000/06/02 00:06:02	1.16
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: NamedNodeMapImpl.cpp,v 1.15 2000/05/02 21:13:48 aruna1 Exp $
  + * $Id: NamedNodeMapImpl.cpp,v 1.16 2000/06/02 00:06:02 andyh Exp $
    */
   
   #include "NamedNodeMapImpl.hpp"
  @@ -104,12 +104,14 @@
   NamedNodeMapImpl *NamedNodeMapImpl::cloneMap(NodeImpl *ownerNod)
   {
       NamedNodeMapImpl *newmap = new NamedNodeMapImpl(ownerNod);
  +	
       if (nodes != null)
       {
           newmap->nodes = new NodeVector(nodes->size());
           for (unsigned int i = 0; i < nodes->size(); ++i)
           {
               NodeImpl *n = nodes->elementAt(i)->cloneNode(true);
  +			n->specified(nodes->elementAt(i)->specified());
               n->ownerNode = ownerNod;
               n->owned(true);
               newmap->nodes->addElement(n);
  
  
  
  1.19      +10 -10    xml-xerces/c/src/dom/NodeImpl.hpp
  
  Index: NodeImpl.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/dom/NodeImpl.hpp,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- NodeImpl.hpp	2000/05/13 03:51:17	1.18
  +++ NodeImpl.hpp	2000/06/02 00:06:02	1.19
  @@ -58,7 +58,7 @@
    */
   
   /*
  - * $Id: NodeImpl.hpp,v 1.18 2000/05/13 03:51:17 andyh Exp $
  + * $Id: NodeImpl.hpp,v 1.19 2000/06/02 00:06:02 andyh Exp $
    */
   
   //
  @@ -207,7 +207,7 @@
        * Flags setters and getters
        */
   
  -    inline bool readOnly() {
  +    inline bool readOnly() const {
           return (flags & READONLY) != 0;
       }
   
  @@ -215,7 +215,7 @@
           flags = (value ? flags | READONLY : flags & ~READONLY);
       }
   
  -    inline bool syncData() {
  +    inline bool syncData() const {
           return (flags & SYNCDATA) != 0;
       }
   
  @@ -223,7 +223,7 @@
           flags = (value ? flags | SYNCDATA : flags & ~SYNCDATA);
       }
   
  -    inline bool syncChildren() {
  +    inline bool syncChildren() const {
           return (flags & SYNCCHILDREN) != 0;
       }
   
  @@ -231,7 +231,7 @@
           flags = (value ? flags | SYNCCHILDREN : flags & ~SYNCCHILDREN);
       }
   
  -    inline bool owned() {
  +    inline bool owned() const {
           return (flags & OWNED) != 0;
       }
   
  @@ -239,7 +239,7 @@
           flags = (value ? flags | OWNED : flags & ~OWNED);
       }
   
  -    inline bool firstChild() {
  +    inline bool firstChild() const {
           return (flags & FIRSTCHILD) != 0;
       }
   
  @@ -247,7 +247,7 @@
           flags = (value ? flags | FIRSTCHILD : flags & ~FIRSTCHILD);
       }
   
  -    inline bool specified() {
  +    inline bool specified() const {
           return (flags & SPECIFIED) != 0;
       }
   
  @@ -255,7 +255,7 @@
           flags = (value ? flags | SPECIFIED : flags & ~SPECIFIED);
       }
   
  -    inline bool ignorableWhitespace() {
  +    inline bool ignorableWhitespace() const {
           return (flags & IGNORABLEWS) != 0;
       }
   
  @@ -263,7 +263,7 @@
           flags = (value ? flags | IGNORABLEWS : flags & ~IGNORABLEWS);
       }
   
  -    inline bool setValue() {
  +    inline bool setValue() const {
           return (flags & SETVALUE) != 0;
       }
   
  @@ -271,7 +271,7 @@
           flags = (value ? flags | SETVALUE : flags & ~SETVALUE);
       }
       
  -    inline bool idAttr() {
  +    inline bool idAttr() const {
           return (flags & ID_ATTR) != 0;
       }