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

cvs commit: xml-xerces/c/src/dom AttrImpl.cpp CDATASectionImpl.cpp CharacterDataImpl.cpp CharacterDataImpl.hpp DocumentFragmentImpl.cpp DocumentImpl.cpp DocumentTypeImpl.cpp ElementDefinitionImpl.cpp ElementImpl.cpp EntityImpl.cpp EntityReferenceImpl.cpp NodeContainer.cpp NodeContainer.hpp NodeImpl.cpp NodeImpl.hpp NotationImpl.cpp ProcessingInstructionImpl.cpp ProcessingInstructionImpl.hpp TextImpl.cpp

lehors      00/04/06 17:51:54

  Modified:    c/src/dom AttrImpl.cpp CDATASectionImpl.cpp
                        CharacterDataImpl.cpp CharacterDataImpl.hpp
                        DocumentFragmentImpl.cpp DocumentImpl.cpp
                        DocumentTypeImpl.cpp ElementDefinitionImpl.cpp
                        ElementImpl.cpp EntityImpl.cpp
                        EntityReferenceImpl.cpp NodeContainer.cpp
                        NodeContainer.hpp NodeImpl.cpp NodeImpl.hpp
                        NotationImpl.cpp ProcessingInstructionImpl.cpp
                        ProcessingInstructionImpl.hpp TextImpl.cpp
  Log:
  moved the value attribute from NodeImpl to every class that really
  needs it, so that others (including ElementImpl and AttrImpl) are smaller
  
  Revision  Changes    Path
  1.14      +2 -2      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.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- AttrImpl.cpp	2000/04/06 23:59:21	1.13
  +++ AttrImpl.cpp	2000/04/07 00:51:44	1.14
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: AttrImpl.cpp,v 1.13 2000/04/06 23:59:21 lehors Exp $
  + * $Id: AttrImpl.cpp,v 1.14 2000/04/07 00:51:44 lehors Exp $
    */
   
   #include "AttrImpl.hpp"
  @@ -69,7 +69,7 @@
   #define null 0
   
   AttrImpl::AttrImpl(DocumentImpl *ownerDoc, const DOMString &aName) 
  -    : NodeContainer (ownerDoc, DOMString())
  +    : NodeContainer (ownerDoc)
   {
       name = aName.clone();
       specified = true;
  
  
  
  1.6       +2 -2      xml-xerces/c/src/dom/CDATASectionImpl.cpp
  
  Index: CDATASectionImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/dom/CDATASectionImpl.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CDATASectionImpl.cpp	2000/04/06 23:59:22	1.5
  +++ CDATASectionImpl.cpp	2000/04/07 00:51:44	1.6
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: CDATASectionImpl.cpp,v 1.5 2000/04/06 23:59:22 lehors Exp $
  + * $Id: CDATASectionImpl.cpp,v 1.6 2000/04/07 00:51:44 lehors Exp $
    */
   
   #include "CDATASectionImpl.hpp"
  @@ -65,7 +65,7 @@
   
   CDATASectionImpl::CDATASectionImpl(DocumentImpl *ownerDoc,
                                      const DOMString &data)
  -    : TextImpl(ownerDoc,data)
  +    : TextImpl(ownerDoc, data)
   {
   };
   
  
  
  
  1.11      +31 -12    xml-xerces/c/src/dom/CharacterDataImpl.cpp
  
  Index: CharacterDataImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/dom/CharacterDataImpl.cpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- CharacterDataImpl.cpp	2000/04/06 23:59:22	1.10
  +++ CharacterDataImpl.cpp	2000/04/07 00:51:44	1.11
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: CharacterDataImpl.cpp,v 1.10 2000/04/06 23:59:22 lehors Exp $
  + * $Id: CharacterDataImpl.cpp,v 1.11 2000/04/07 00:51:44 lehors Exp $
    */
   
   #include "CharacterDataImpl.hpp"
  @@ -64,13 +64,15 @@
   
   CharacterDataImpl::CharacterDataImpl(DocumentImpl *ownerDoc,
                                        const DOMString &data)
  -    : NodeImpl(ownerDoc, data)
  +    : NodeImpl(ownerDoc)
   {
  +    this->data = data.clone();
   };
   
   CharacterDataImpl::CharacterDataImpl(const CharacterDataImpl &other, bool deep)
       : NodeImpl(other)
   {
  +    data = other.data.clone();
   };
   
   
  @@ -78,6 +80,20 @@
   };
   
   
  +DOMString CharacterDataImpl::getNodeValue()
  +{
  +    return data;
  +};
  +
  +
  +void CharacterDataImpl::setNodeValue(const DOMString &value)
  +{
  +    if (readOnly)
  +        throw DOM_DOMException(DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR,
  +                               null);
  +    data = value.clone();
  +};
  +
   
   void CharacterDataImpl::appendData(const DOMString &data)
   {
  @@ -85,7 +101,7 @@
           throw DOM_DOMException(
           DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null);
       
  -    value.appendData(data);
  +    this->data.appendData(data);
   };
   
   
  @@ -98,14 +114,14 @@
       // Note: the C++ DOMString operation throws the correct DOMExceptions
       //       when parameter values are bad.
       //  
  -    value.deleteData(offset, count);
  +    data.deleteData(offset, count);
   };
   
   
   
   DOMString &CharacterDataImpl::getData()
   {
  -    return value; 
  +    return data; 
   };
   
   
  @@ -121,7 +137,7 @@
   //
   unsigned int CharacterDataImpl::getCharDataLength()
   {
  -    return value.length();  
  +    return data.length();  
   };
   
   
  @@ -136,12 +152,13 @@
       // Note: the C++ DOMString operation throws the correct DOMExceptions
       //       when parameter values are bad.
       //  
  -    value.insertData(offset, data);
  +    this->data.insertData(offset, data);
   }
   
   
   
  -void CharacterDataImpl::replaceData(unsigned int offset, unsigned int count, const DOMString &data)
  +void CharacterDataImpl::replaceData(unsigned int offset, unsigned int count,
  +                                    const DOMString &data)
   {
       if (readOnly)
           throw DOM_DOMException(
  @@ -156,20 +173,22 @@
   void CharacterDataImpl::setData(const DOMString &arg)
   {
       if (readOnly)
  -        throw DOM_DOMException(DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null);
  -    value = arg.clone();
  +        throw DOM_DOMException(DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR,
  +                               null);
  +    data = arg.clone();
   };
   
   
   
   
   
  -DOMString CharacterDataImpl::substringData(unsigned int offset, unsigned int count)
  +DOMString CharacterDataImpl::substringData(unsigned int offset,
  +                                           unsigned int count)
   {
   
       // Note: the C++ DOMString operation throws the correct DOMExceptions
       //       when parameter values are bad.
       //  
  -    return value.substringData(offset, count);
  +    return data.substringData(offset, count);
   };
   
  
  
  
  1.9       +6 -1      xml-xerces/c/src/dom/CharacterDataImpl.hpp
  
  Index: CharacterDataImpl.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/dom/CharacterDataImpl.hpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- CharacterDataImpl.hpp	2000/04/06 23:59:22	1.8
  +++ CharacterDataImpl.hpp	2000/04/07 00:51:45	1.9
  @@ -58,7 +58,7 @@
    */
   
   /*
  - * $Id: CharacterDataImpl.hpp,v 1.8 2000/04/06 23:59:22 lehors Exp $
  + * $Id: CharacterDataImpl.hpp,v 1.9 2000/04/07 00:51:45 lehors Exp $
    */
   
   //
  @@ -77,10 +77,15 @@
   
   class CDOM_EXPORT CharacterDataImpl: public NodeImpl
   {
  +protected:
  +    DOMString data;
  +
   public:
       CharacterDataImpl(DocumentImpl *ownerDocument, const DOMString &data);
       CharacterDataImpl(const CharacterDataImpl &other, bool deep = false);
       virtual ~CharacterDataImpl();
  +    virtual DOMString getNodeValue();
  +    virtual void setNodeValue(const DOMString &value);
       virtual void appendData(const DOMString &data);
       virtual void deleteData(unsigned int offset, unsigned int count);
       virtual DOMString &getData();
  
  
  
  1.9       +2 -2      xml-xerces/c/src/dom/DocumentFragmentImpl.cpp
  
  Index: DocumentFragmentImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/dom/DocumentFragmentImpl.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DocumentFragmentImpl.cpp	2000/04/06 23:59:22	1.8
  +++ DocumentFragmentImpl.cpp	2000/04/07 00:51:45	1.9
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: DocumentFragmentImpl.cpp,v 1.8 2000/04/06 23:59:22 lehors Exp $
  + * $Id: DocumentFragmentImpl.cpp,v 1.9 2000/04/07 00:51:45 lehors Exp $
    */
   
   #include "DocumentFragmentImpl.hpp"
  @@ -67,7 +67,7 @@
   static DOMString *nam;   // Will be lazily initialized to "#document-fragment"
   
   DocumentFragmentImpl::DocumentFragmentImpl(DocumentImpl *masterDoc)
  -    : NodeContainer(masterDoc, null)
  +    : NodeContainer(masterDoc)
   {
   };
           
  
  
  
  1.18      +3 -3      xml-xerces/c/src/dom/DocumentImpl.cpp
  
  Index: DocumentImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/dom/DocumentImpl.cpp,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- DocumentImpl.cpp	2000/04/06 23:59:22	1.17
  +++ DocumentImpl.cpp	2000/04/07 00:51:45	1.18
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: DocumentImpl.cpp,v 1.17 2000/04/06 23:59:22 lehors Exp $
  + * $Id: DocumentImpl.cpp,v 1.18 2000/04/07 00:51:45 lehors Exp $
    */
   
   //
  @@ -113,7 +113,7 @@
   
   
   DocumentImpl::DocumentImpl()
  -    : NodeContainer(null, null)
  +    : NodeContainer(null)
   {
       docType=null;
       docElement=null;
  @@ -128,7 +128,7 @@
   DocumentImpl::DocumentImpl(const DOMString &fNamespaceURI,
                              const DOMString &qualifiedName,
                              DocumentTypeImpl *doctype)
  -    : NodeContainer(null, null)
  +    : NodeContainer(null)
   {
       if (doctype != null && doctype->getOwnerDocument() != null)
   	// a doctype can belong to only one DocumentImpl
  
  
  
  1.14      +4 -4      xml-xerces/c/src/dom/DocumentTypeImpl.cpp
  
  Index: DocumentTypeImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/dom/DocumentTypeImpl.cpp,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- DocumentTypeImpl.cpp	2000/04/06 23:59:23	1.13
  +++ DocumentTypeImpl.cpp	2000/04/07 00:51:45	1.14
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: DocumentTypeImpl.cpp,v 1.13 2000/04/06 23:59:23 lehors Exp $
  + * $Id: DocumentTypeImpl.cpp,v 1.14 2000/04/07 00:51:45 lehors Exp $
    */
   
   #include "DocumentTypeImpl.hpp"
  @@ -67,7 +67,7 @@
   
   DocumentTypeImpl::DocumentTypeImpl(DocumentImpl *ownerDoc,
                                      const DOMString &dtName) 
  -    : NodeContainer(ownerDoc,null),
  +    : NodeContainer(ownerDoc),
       publicId(null), systemId(null)	//DOM Level 2
   {
       name = dtName.clone();
  @@ -82,7 +82,7 @@
   //Introduced in DOM Level 2
   DocumentTypeImpl::DocumentTypeImpl(const DOMString &qualifiedName,
       const DOMString &fPublicId, const DOMString &fSystemId)
  -    : NodeContainer(null, null),
  +    : NodeContainer(null),
       publicId(fPublicId), systemId(fSystemId)
   {
       name = qualifiedName.clone();
  @@ -98,7 +98,7 @@
   
   
   DocumentTypeImpl::DocumentTypeImpl(const DocumentTypeImpl &other, bool deep)
  -: NodeContainer(other)
  +    : NodeContainer(other)
   {
       name = other.name.clone();
       if (deep)
  
  
  
  1.7       +2 -2      xml-xerces/c/src/dom/ElementDefinitionImpl.cpp
  
  Index: ElementDefinitionImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/dom/ElementDefinitionImpl.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ElementDefinitionImpl.cpp	2000/04/06 23:59:23	1.6
  +++ ElementDefinitionImpl.cpp	2000/04/07 00:51:45	1.7
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: ElementDefinitionImpl.cpp,v 1.6 2000/04/06 23:59:23 lehors Exp $
  + * $Id: ElementDefinitionImpl.cpp,v 1.7 2000/04/07 00:51:45 lehors Exp $
    */
   
   #include "ElementDefinitionImpl.hpp"
  @@ -65,7 +65,7 @@
   
   ElementDefinitionImpl::ElementDefinitionImpl(DocumentImpl *ownerDoc,
                                                const DOMString &nam)
  -    : NodeImpl(ownerDoc, null) 
  +    : NodeImpl(ownerDoc) 
   {
       name = name.clone();
       attributes = 0;
  
  
  
  1.18      +2 -2      xml-xerces/c/src/dom/ElementImpl.cpp
  
  Index: ElementImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/dom/ElementImpl.cpp,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- ElementImpl.cpp	2000/04/06 23:59:23	1.17
  +++ ElementImpl.cpp	2000/04/07 00:51:45	1.18
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: ElementImpl.cpp,v 1.17 2000/04/06 23:59:23 lehors Exp $
  + * $Id: ElementImpl.cpp,v 1.18 2000/04/07 00:51:45 lehors Exp $
    */
   
   #include "DeepNodeListImpl.hpp"
  @@ -70,7 +70,7 @@
   
   
   ElementImpl::ElementImpl(DocumentImpl *ownerDoc, const DOMString &eName)
  -    : NodeContainer(ownerDoc, null)
  +    : NodeContainer(ownerDoc)
   {
       name = eName.clone();
       
  
  
  
  1.10      +2 -2      xml-xerces/c/src/dom/EntityImpl.cpp
  
  Index: EntityImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/dom/EntityImpl.cpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- EntityImpl.cpp	2000/04/06 23:59:23	1.9
  +++ EntityImpl.cpp	2000/04/07 00:51:45	1.10
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: EntityImpl.cpp,v 1.9 2000/04/06 23:59:23 lehors Exp $
  + * $Id: EntityImpl.cpp,v 1.10 2000/04/07 00:51:45 lehors Exp $
    */
   
   #include "DOM_DOMException.hpp"
  @@ -64,7 +64,7 @@
   
   
   EntityImpl::EntityImpl(DocumentImpl *ownerDoc, const DOMString &eName)
  -    : NodeContainer(ownerDoc, null)
  +    : NodeContainer(ownerDoc)
   {
       name = eName.clone();
   };
  
  
  
  1.11      +2 -2      xml-xerces/c/src/dom/EntityReferenceImpl.cpp
  
  Index: EntityReferenceImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/dom/EntityReferenceImpl.cpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- EntityReferenceImpl.cpp	2000/04/06 23:59:23	1.10
  +++ EntityReferenceImpl.cpp	2000/04/07 00:51:45	1.11
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: EntityReferenceImpl.cpp,v 1.10 2000/04/06 23:59:23 lehors Exp $
  + * $Id: EntityReferenceImpl.cpp,v 1.11 2000/04/07 00:51:45 lehors Exp $
    */
   
   /**
  @@ -122,7 +122,7 @@
   
   EntityReferenceImpl::EntityReferenceImpl(DocumentImpl *ownerDoc,
                                            const DOMString &entityName)
  -    : NodeContainer(ownerDoc, null)
  +    : NodeContainer(ownerDoc)
   {
       name = entityName.clone();
       // EntityReference behaves as a read-only node, since its contents
  
  
  
  1.4       +3 -4      xml-xerces/c/src/dom/NodeContainer.cpp
  
  Index: NodeContainer.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/dom/NodeContainer.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NodeContainer.cpp	2000/04/06 23:59:24	1.3
  +++ NodeContainer.cpp	2000/04/07 00:51:45	1.4
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: NodeContainer.cpp,v 1.3 2000/04/06 23:59:24 lehors Exp $
  + * $Id: NodeContainer.cpp,v 1.4 2000/04/07 00:51:45 lehors Exp $
    */
   
   #include "NodeContainer.hpp"
  @@ -73,9 +73,8 @@
   static DOMString *s_xmlns = null;
   static DOMString *s_xmlnsURI = null;
   
  -NodeContainer::NodeContainer(DocumentImpl *ownerDoc,
  -                             const DOMString &initValue)
  -    : NodeImpl(ownerDoc, initValue)
  +NodeContainer::NodeContainer(DocumentImpl *ownerDoc)
  +    : NodeImpl(ownerDoc)
   {
       this->firstChild = null;
       this->lastChild  = null;
  
  
  
  1.3       +2 -3      xml-xerces/c/src/dom/NodeContainer.hpp
  
  Index: NodeContainer.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/dom/NodeContainer.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- NodeContainer.hpp	2000/04/06 23:59:24	1.2
  +++ NodeContainer.hpp	2000/04/07 00:51:46	1.3
  @@ -67,7 +67,7 @@
   //
   
   /*
  - * $Id: NodeContainer.hpp,v 1.2 2000/04/06 23:59:24 lehors Exp $
  + * $Id: NodeContainer.hpp,v 1.3 2000/04/07 00:51:46 lehors Exp $
    */
   
   /**
  @@ -87,8 +87,7 @@
       NodeImpl                *lastChild;
   
   public:
  -    NodeContainer(DocumentImpl *ownerDocument,
  -                  const DOMString &initValue);
  +    NodeContainer(DocumentImpl *ownerDocument);
       NodeContainer(const NodeContainer &other);
       
       virtual NodeImpl *appendChild(NodeImpl *newChild);
  
  
  
  1.21      +14 -21    xml-xerces/c/src/dom/NodeImpl.cpp
  
  Index: NodeImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/dom/NodeImpl.cpp,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- NodeImpl.cpp	2000/04/06 23:59:24	1.20
  +++ NodeImpl.cpp	2000/04/07 00:51:46	1.21
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: NodeImpl.cpp,v 1.20 2000/04/06 23:59:24 lehors Exp $
  + * $Id: NodeImpl.cpp,v 1.21 2000/04/07 00:51:46 lehors Exp $
    */
   
   // This class doesn't support having any children, and implements the behavior
  @@ -77,12 +77,9 @@
   static DOMString *s_xmlns = null;
   static DOMString *s_xmlnsURI = null;
   
  -NodeImpl::NodeImpl(DocumentImpl *ownerDoc,
  -                   const DOMString &initValue)
  +NodeImpl::NodeImpl(DocumentImpl *ownerDoc)
   {
       this->ownerDocument=ownerDoc;
  -    this->value=initValue.clone();
  -    
       this->changes = 0;
       this->userData = null;
       this->readOnly = false;
  @@ -98,7 +95,6 @@
   // This only makes a shallow copy, cloneChildren must also be called for a
   // deep clone
   NodeImpl::NodeImpl(const NodeImpl &other) {
  -    this->value = other.value.clone();
       this->readOnly = false;
       this->ownerDocument = other.ownerDocument;
       this->userData = other.userData;
  @@ -219,7 +215,7 @@
   
   DOMString NodeImpl::getNodeValue()
   {
  -    return value;
  +    return null;                // overridden in some subclasses
   };
   
   
  @@ -298,21 +294,18 @@
         //    the entire document will be deleted as well.
         RefCountedImpl::removeRef(doc);
     };
  -  
  -  
  -  void NodeImpl::setNodeValue(const DOMString &val)
  -  {
  -      if (readOnly)
  -          throw DOM_DOMException(
  -          DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null);
  -      
  -      // Default behavior, overridden in some subclasses
  -      this->value = val.clone();
  -  };
  -  
  -  
   
  -  
  +
  +void NodeImpl::setNodeValue(const DOMString &val)
  +{
  +    if (readOnly)
  +        throw DOM_DOMException(DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR,
  +                               null);
  +    // Default behavior is to do nothing, overridden in some subclasses
  +};
  +
  +
  +
   void NodeImpl::setReadOnly(bool readOnl, bool deep)
   {
       this->readOnly = readOnl;
  
  
  
  1.15      +4 -6      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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- NodeImpl.hpp	2000/04/06 23:59:24	1.14
  +++ NodeImpl.hpp	2000/04/07 00:51:46	1.15
  @@ -58,7 +58,7 @@
    */
   
   /*
  - * $Id: NodeImpl.hpp,v 1.14 2000/04/06 23:59:24 lehors Exp $
  + * $Id: NodeImpl.hpp,v 1.15 2000/04/07 00:51:46 lehors Exp $
    */
   
   //
  @@ -99,21 +99,19 @@
   
   class CDOM_EXPORT NodeImpl: public NodeListImpl {
   public:
  -    DOMString               value;                  // String value (not used in all nodes)
       bool                    readOnly;
  -    DocumentImpl            *ownerDocument;         // Document this node belongs to
  +    DocumentImpl            *ownerDocument; // Document this node belongs to
       NodeImpl                *previousSibling;
       NodeImpl                *nextSibling;
       NodeImpl                *ownerNode; // typically the parent but not always!
       int changes;
       void *userData;
   
  -    static int              gLiveNodeImpls;         // Counters for debug & tuning.
  +    static int              gLiveNodeImpls; // Counters for debug & tuning.
       static int              gTotalNodeImpls;
   
   public:
  -    NodeImpl(DocumentImpl *ownerDocument,
  -        const DOMString &initValue);
  +    NodeImpl(DocumentImpl *ownerDocument);
       NodeImpl(const NodeImpl &other);
       virtual ~NodeImpl();
       
  
  
  
  1.9       +2 -2      xml-xerces/c/src/dom/NotationImpl.cpp
  
  Index: NotationImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/dom/NotationImpl.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- NotationImpl.cpp	2000/04/06 23:59:24	1.8
  +++ NotationImpl.cpp	2000/04/07 00:51:46	1.9
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: NotationImpl.cpp,v 1.8 2000/04/06 23:59:24 lehors Exp $
  + * $Id: NotationImpl.cpp,v 1.9 2000/04/07 00:51:46 lehors Exp $
    */
   
   #include "NotationImpl.hpp"
  @@ -87,7 +87,7 @@
   */
   
   NotationImpl::NotationImpl(DocumentImpl *ownerDoc, const DOMString &nName)
  -    : NodeImpl(ownerDoc, null)
  +    : NodeImpl(ownerDoc)
   {
       name = nName.clone();
   };
  
  
  
  1.8       +28 -12    xml-xerces/c/src/dom/ProcessingInstructionImpl.cpp
  
  Index: ProcessingInstructionImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/dom/ProcessingInstructionImpl.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ProcessingInstructionImpl.cpp	2000/04/06 23:59:24	1.7
  +++ ProcessingInstructionImpl.cpp	2000/04/07 00:51:46	1.8
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: ProcessingInstructionImpl.cpp,v 1.7 2000/04/06 23:59:24 lehors Exp $
  + * $Id: ProcessingInstructionImpl.cpp,v 1.8 2000/04/07 00:51:46 lehors Exp $
    */
   
   #include "ProcessingInstructionImpl.hpp"
  @@ -67,9 +67,10 @@
   ProcessingInstructionImpl::ProcessingInstructionImpl(DocumentImpl *ownerDoc,
                                                        const DOMString &target,
                                                        const DOMString &data)
  -    : NodeImpl(ownerDoc,data)
  +    : NodeImpl(ownerDoc)
   {
  -    name = target.clone();
  +    this->target = target.clone();
  +    this->data = data.clone();
   };
   
   
  @@ -78,7 +79,8 @@
                                           bool deep)
       : NodeImpl(other)
   {
  -    name = other.name.clone();
  +    target = other.target.clone();
  +    data = other.data.clone();
   };
   
   
  @@ -95,7 +97,7 @@
   
   DOMString ProcessingInstructionImpl::getNodeName()
   {
  -    return name;
  +    return target;
   };
   
   
  @@ -104,9 +106,24 @@
   };
   
   
  +DOMString ProcessingInstructionImpl::getNodeValue()
  +{
  +    return data.clone();
  +};
  +
  +
  +void ProcessingInstructionImpl::setNodeValue(const DOMString &value)
  +{
  +    if (readOnly)
  +        throw DOM_DOMException(DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR,
  +                               null);
  +    data = value.clone();
  +};
  +
  +
   DOMString ProcessingInstructionImpl::getData()
   {
  -    return value.clone();
  +    return data.clone();
   };
   
   
  @@ -122,7 +139,7 @@
   */
   DOMString ProcessingInstructionImpl::getTarget()
   {
  -    return name.clone();
  +    return target.clone();
   };
   
   
  @@ -134,9 +151,8 @@
   */
   void ProcessingInstructionImpl::setData(const DOMString &arg)
   {
  -    if(readOnly)
  -        throw DOM_DOMException(
  -        DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR,null);
  -    
  -    value = arg;
  +    if (readOnly)
  +        throw DOM_DOMException(DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR,
  +                               null);
  +    data = arg.clone();
   };
  
  
  
  1.8       +5 -2      xml-xerces/c/src/dom/ProcessingInstructionImpl.hpp
  
  Index: ProcessingInstructionImpl.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/dom/ProcessingInstructionImpl.hpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ProcessingInstructionImpl.hpp	2000/04/06 23:59:24	1.7
  +++ ProcessingInstructionImpl.hpp	2000/04/07 00:51:46	1.8
  @@ -57,7 +57,7 @@
    */
   
   /*
  - * $Id: ProcessingInstructionImpl.hpp,v 1.7 2000/04/06 23:59:24 lehors Exp $
  + * $Id: ProcessingInstructionImpl.hpp,v 1.8 2000/04/07 00:51:46 lehors Exp $
    */
   
   //
  @@ -77,7 +77,8 @@
   
   class CDOM_EXPORT ProcessingInstructionImpl: public NodeImpl {
   protected:
  -    DOMString name;
  +    DOMString target;
  +    DOMString data;
   
   public:
       ProcessingInstructionImpl(DocumentImpl *ownerDoc,
  @@ -87,6 +88,8 @@
                                 bool deep=false);
       virtual ~ProcessingInstructionImpl();
       virtual NodeImpl *cloneNode(bool deep);
  +    virtual DOMString getNodeValue();
  +    virtual void setNodeValue(const DOMString &value);
       virtual DOMString getNodeName();
       virtual short getNodeType();
       virtual DOMString getData();
  
  
  
  1.10      +5 -5      xml-xerces/c/src/dom/TextImpl.cpp
  
  Index: TextImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/dom/TextImpl.cpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TextImpl.cpp	2000/04/06 23:59:24	1.9
  +++ TextImpl.cpp	2000/04/07 00:51:46	1.10
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: TextImpl.cpp,v 1.9 2000/04/06 23:59:24 lehors Exp $
  + * $Id: TextImpl.cpp,v 1.10 2000/04/07 00:51:46 lehors Exp $
    */
   
   #include "DocumentImpl.hpp"
  @@ -92,7 +92,7 @@
   
   NodeImpl *TextImpl::cloneNode(bool deep)
   {
  -    return ownerDocument->createTextNode(value);
  +    return ownerDocument->createTextNode(data);
   };
   
   
  @@ -112,18 +112,18 @@
           throw DOM_DOMException(
               DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null);
       }
  -	unsigned int len = value.length();
  +	unsigned int len = data.length();
       if (offset >= len)
           throw DOM_DOMException(DOM_DOMException::INDEX_SIZE_ERR, null);
                   
       TextImpl *newText = 
                   (TextImpl *) ownerDocument->createTextNode(
  -                        value.substringData(offset, value.length() - offset));
  +                        data.substringData(offset, data.length() - offset));
       NodeImpl *parent = getParentNode();
       if (parent != null)
           parent->insertBefore(newText, getNextSibling());
   
  -    value = value.substringData(0, offset);
  +    data = data.substringData(0, offset);
       return newText;
   };