tng         2002/09/23 12:41:07

  Modified:    c/src/xercesc/dom/impl DOMDocumentImpl.cpp
                        DOMDocumentImpl.hpp DOMElementImpl.cpp
                        DOMElementNSImpl.cpp DOMElementNSImpl.hpp
                        DOMEntityImpl.cpp DOMEntityImpl.hpp
                        DOMEntityReferenceImpl.cpp
                        DOMEntityReferenceImpl.hpp DOMNodeImpl.cpp
                        DOMNotationImpl.cpp DOMNotationImpl.hpp
                        DOMProcessingInstructionImpl.cpp
                        DOMProcessingInstructionImpl.hpp
  Log:
  DOM L3: Support baseURI.
  
  Revision  Changes    Path
  1.23      +10 -4     xml-xerces/c/src/xercesc/dom/impl/DOMDocumentImpl.cpp
  
  Index: DOMDocumentImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMDocumentImpl.cpp,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- DOMDocumentImpl.cpp       17 Sep 2002 12:42:21 -0000      1.22
  +++ DOMDocumentImpl.cpp       23 Sep 2002 19:41:07 -0000      1.23
  @@ -576,6 +576,11 @@
   }
   
   
  +const XMLCh*     DOMDocumentImpl::getBaseURI() const
  +{
  +       return fDocumentURI;
  +};
  +
   
   DOMRange* DOMDocumentImpl::createRange()
   {
  @@ -692,7 +697,6 @@
              void*            DOMDocumentImpl::setUserData(const XMLCh* key, void* 
data, DOMUserDataHandler* handler)
                                                                                       
 {return fNode.setUserData(key, data, handler); };
              void*            DOMDocumentImpl::getUserData(const XMLCh* key) const    
 {return fNode.getUserData(key); };
  -           const XMLCh*     DOMDocumentImpl::getBaseURI() const                     
 {return fNode.getBaseURI(); };
              short            DOMDocumentImpl::compareTreePosition(DOMNode* other)    
 {return fNode.compareTreePosition(other); };
              const XMLCh*     DOMDocumentImpl::getTextContent() const                 
 {return fNode.getTextContent(); };
              void             DOMDocumentImpl::setTextContent(const XMLCh* 
textContent){fNode.setTextContent(textContent); };
  @@ -727,7 +731,8 @@
   
   const XMLCh *  DOMDocumentImpl::getPooledString(const XMLCh *src)
   {
  -    return this->fNamePool->getPooledString(src);
  +    if (!src) return 0;
  +    else return this->fNamePool->getPooledString(src);
   }
   
   static const int kHeapAllocSize = 0x10000;    // The chunk size to allocate from the
  @@ -892,7 +897,8 @@
       fVersion = cloneString(version);
   }
   
  -const XMLCh* DOMDocumentImpl::getDocumentURI() const {
  +const XMLCh* DOMDocumentImpl::getDocumentURI() const
  +{
       return fDocumentURI;
   }
   
  
  
  
  1.10      +5 -5      xml-xerces/c/src/xercesc/dom/impl/DOMDocumentImpl.hpp
  
  Index: DOMDocumentImpl.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMDocumentImpl.hpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DOMDocumentImpl.hpp       16 Aug 2002 16:02:53 -0000      1.9
  +++ DOMDocumentImpl.hpp       23 Sep 2002 19:41:07 -0000      1.10
  @@ -321,11 +321,11 @@
       //  data
       // -----------------------------------------------------------------------
       // New data introduced in DOM Level 3
  -    XMLCh*                fActualEncoding;
  -    XMLCh*                fEncoding;
  +    const XMLCh*          fActualEncoding;
  +    const XMLCh*          fEncoding;
       bool                  fStandalone;
  -    XMLCh*                fVersion;
  -    XMLCh*                fDocumentURI;
  +    const XMLCh*          fVersion;
  +    const XMLCh*          fDocumentURI;
   
       RefHashTableOf<DOMNodeUserDataTable>* fUserDataTable;
   
  
  
  
  1.14      +39 -5     xml-xerces/c/src/xercesc/dom/impl/DOMElementImpl.cpp
  
  Index: DOMElementImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMElementImpl.cpp,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- DOMElementImpl.cpp        16 Sep 2002 20:49:52 -0000      1.13
  +++ DOMElementImpl.cpp        23 Sep 2002 19:41:07 -0000      1.14
  @@ -63,6 +63,8 @@
   #include <xercesc/dom/DOMAttr.hpp>
   #include <xercesc/dom/DOMDocument.hpp>
   #include <xercesc/dom/DOMException.hpp>
  +#include <xercesc/util/XMLUniDefs.hpp>
  +#include <xercesc/util/XMLUri.hpp>
   
   #include "DOMAttrMapImpl.hpp"
   #include "DOMDocumentImpl.hpp"
  @@ -71,12 +73,10 @@
   #include "DOMCasts.hpp"
   #include "DOMElementNSImpl.hpp"
   
  -
   #include "DOMDeepNodeListImpl.hpp"
   #include "DOMDocumentTypeImpl.hpp"
   #include "DOMNamedNodeMapImpl.hpp"
   
  -
   class DOMAttr;
   
   DOMElementImpl::DOMElementImpl(DOMDocument *ownerDoc, const XMLCh *eName)
  @@ -102,6 +102,7 @@
         fDefaultAttributes(0)
   {
       fName = other.fName;
  +
       if (deep)
           fParent.cloneChildren(&other);
   
  @@ -129,6 +130,7 @@
               fAttributes = new (getOwnerDocument()) DOMAttrMapImpl(this, 
fDefaultAttributes);
           }
       }
  +
   };
   
   
  @@ -465,6 +467,35 @@
       }
   }
   
  +const XMLCh* DOMElementImpl::getBaseURI() const
  +{
  +    const XMLCh* baseURI = fNode.fOwnerNode->getBaseURI();
  +    if (fAttributes) {
  +        const XMLCh xmlBaseString[] =
  +        {
  +            chLatin_x, chLatin_m, chLatin_l, chColon, chLatin_b, chLatin_a, 
chLatin_s, chLatin_e, chNull
  +        };
  +        DOMNode* attrNode = fAttributes->getNamedItem(xmlBaseString);
  +        if (attrNode) {
  +            const XMLCh* uri =  attrNode->getNodeValue();
  +            if (XMLString::stringLen(uri) != 0 ) {// attribute value is always 
empty string
  +                try {
  +                    XMLUri temp(baseURI);
  +                    XMLUri temp2(&temp, uri);
  +                    uri = ((DOMDocumentImpl 
*)this->getOwnerDocument())->cloneString(temp2.getUriText());
  +                }
  +                catch (...){
  +                    // REVISIT: what should happen in this case?
  +                    return 0;
  +                }
  +                return uri;
  +            }
  +        }
  +    }
  +    return baseURI;
  +}
  +
  +
   
   //
   //   Functions inherited from Node
  @@ -477,7 +508,7 @@
        const XMLCh*           DOMElementImpl::getNamespaceURI() const                 
{return fNode.getNamespaceURI (); };
              DOMNode*         DOMElementImpl::getNextSibling() const                  
{return fChild.getNextSibling (); };
        const XMLCh*           DOMElementImpl::getNodeValue() const                    
{return fNode.getNodeValue (); };
  -           DOMDocument*     DOMElementImpl::getOwnerDocument() const                
{return fNode.getOwnerDocument (); };
  +           DOMDocument*     DOMElementImpl::getOwnerDocument() const                
{return fParent.fOwnerDocument; };
        const XMLCh*           DOMElementImpl::getPrefix() const                       
{return fNode.getPrefix (); };
              DOMNode*         DOMElementImpl::getParentNode() const                   
{return fChild.getParentNode (this); };
              DOMNode*         DOMElementImpl::getPreviousSibling() const              
{return fChild.getPreviousSibling (this); };
  @@ -495,7 +526,6 @@
              void*            DOMElementImpl::setUserData(const XMLCh* key, void* 
data, DOMUserDataHandler* handler)
                                                                                       
{return fNode.setUserData(key, data, handler); };
              void*            DOMElementImpl::getUserData(const XMLCh* key) const     
{return fNode.getUserData(key); };
  -           const XMLCh*     DOMElementImpl::getBaseURI() const                      
{return fNode.getBaseURI(); };
              short            DOMElementImpl::compareTreePosition(DOMNode* other)     
{return fNode.compareTreePosition(other); };
              const XMLCh*     DOMElementImpl::getTextContent() const                  
{return fNode.getTextContent(); };
              void             DOMElementImpl::setTextContent(const XMLCh* 
textContent){fNode.setTextContent(textContent); };
  @@ -508,6 +538,10 @@
   
   bool DOMElementImpl::isEqualNode(const DOMNode* arg)
   {
  +    if (isSameNode(arg)) {
  +        return true;
  +    }
  +
       if (!fNode.isEqualNode(arg)) {
           return false;
       }
  
  
  
  1.8       +31 -1     xml-xerces/c/src/xercesc/dom/impl/DOMElementNSImpl.cpp
  
  Index: DOMElementNSImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMElementNSImpl.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DOMElementNSImpl.cpp      16 Sep 2002 20:44:47 -0000      1.7
  +++ DOMElementNSImpl.cpp      23 Sep 2002 19:41:07 -0000      1.8
  @@ -62,6 +62,7 @@
   #include "DOMElementNSImpl.hpp"
   #include "DOMDocumentImpl.hpp"
   #include <xercesc/dom/DOMException.hpp>
  +#include <xercesc/util/XMLUri.hpp>
   
   DOMElementNSImpl::DOMElementNSImpl(DOMDocument *ownerDoc, const XMLCh *nam) :
       DOMElementImpl(ownerDoc, nam)
  @@ -109,6 +110,35 @@
   {
       return fLocalName;
   }
  +
  +const XMLCh* DOMElementNSImpl::getBaseURI() const
  +{
  +    const XMLCh* baseURI = (fNode.fOwnerNode)->getBaseURI();
  +    if (fAttributes) {
  +        const XMLCh baseString[] =
  +        {
  +            chLatin_b, chLatin_a, chLatin_s, chLatin_e, chNull
  +        };
  +        DOMNode* attrNode = 
fAttributes->getNamedItemNS(DOMNodeImpl::getXmlURIString(), baseString);
  +        if (attrNode) {
  +            const XMLCh* uri =  attrNode->getNodeValue();
  +            if (XMLString::stringLen(uri) != 0 ) {// attribute value is always 
empty string
  +                try {
  +                    XMLUri temp(baseURI);
  +                    XMLUri temp2(&temp, uri);
  +                    uri = ((DOMDocumentImpl 
*)this->getOwnerDocument())->cloneString(temp2.getUriText());
  +                }
  +                catch (...){
  +                    // REVISIT: what should happen in this case?
  +                    return 0;
  +                }
  +                return uri;
  +            }
  +        }
  +    }
  +    return baseURI;
  +}
  +
   
   void DOMElementNSImpl::setPrefix(const XMLCh *prefix)
   {
  
  
  
  1.4       +4 -1      xml-xerces/c/src/xercesc/dom/impl/DOMElementNSImpl.hpp
  
  Index: DOMElementNSImpl.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMElementNSImpl.hpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DOMElementNSImpl.hpp      4 Jul 2002 15:27:56 -0000       1.3
  +++ DOMElementNSImpl.hpp      23 Sep 2002 19:41:07 -0000      1.4
  @@ -96,6 +96,9 @@
       virtual void         setPrefix(const XMLCh *prefix);
       virtual void         release();
   
  +    //Introduced in DOM Level 3
  +    virtual const XMLCh *getBaseURI() const;
  +
      // helper function for DOM Level 3 renameNode
      virtual DOMNode* rename(const XMLCh* namespaceURI, const XMLCh* name);
      void setName(const XMLCh* namespaceURI, const XMLCh* name);
  
  
  
  1.10      +30 -18    xml-xerces/c/src/xercesc/dom/impl/DOMEntityImpl.cpp
  
  Index: DOMEntityImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMEntityImpl.cpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DOMEntityImpl.cpp 16 Aug 2002 19:20:28 -0000      1.9
  +++ DOMEntityImpl.cpp 23 Sep 2002 19:41:07 -0000      1.10
  @@ -73,7 +73,8 @@
        fActualEncoding(0),
        fEncoding(0),
        fVersion(0),
  -     fEntityRefNodeCloned(false)
  +     fEntityRefNodeCloned(false),
  +     fBaseURI(0)
   {
       fRefEntity  = 0;
       fName        = ((DOMDocumentImpl *)ownerDoc)->getPooledString(eName);
  @@ -95,6 +96,7 @@
       fPublicId        = other.fPublicId;
       fSystemId        = other.fSystemId;
       fNotationName    = other.fNotationName;
  +    fBaseURI         = other.fBaseURI;
   
       fRefEntity       = other.fRefEntity;
       fNode.setReadOnly(true, true);
  @@ -140,6 +142,12 @@
   };
   
   
  +const XMLCh* DOMEntityImpl::getBaseURI() const
  +{
  +    return fBaseURI;
  +}
  +
  +
   void DOMEntityImpl::setNodeValue(const XMLCh *arg)
   {
       fNode.setNodeValue(arg);
  @@ -167,6 +175,11 @@
   }
   
   
  +void DOMEntityImpl::setBaseURI(const XMLCh* baseURI) {
  +    fBaseURI = ((DOMDocumentImpl *)getOwnerDocument())->cloneString(baseURI);
  +}
  +
  +
   void   DOMEntityImpl::setEntityRef(DOMEntityReference* other)
   {
       fRefEntity = other;
  @@ -248,38 +261,37 @@
   //  Functions inherited from Node
   //
   
  -           DOMNode*         DOMEntityImpl::appendChild(DOMNode *newChild)          
{return fParent.appendChild (newChild); };
  +           DOMNode*         DOMEntityImpl::appendChild(DOMNode *newChild)          
{cloneEntityRefTree(); return fParent.appendChild (newChild); };
              DOMNamedNodeMap* DOMEntityImpl::getAttributes() const                   
{return fNode.getAttributes (); };
        const XMLCh*           DOMEntityImpl::getLocalName() const                    
{return fNode.getLocalName (); };
        const XMLCh*           DOMEntityImpl::getNamespaceURI() const                 
{return fNode.getNamespaceURI (); };
  -           DOMNode*         DOMEntityImpl::getNextSibling() const                  
{return fNode.getNextSibling (); };
  -     const XMLCh*           DOMEntityImpl::getNodeValue() const                    
{return fNode.getNodeValue (); };
  -           DOMDocument*     DOMEntityImpl::getOwnerDocument() const                
{return fNode.getOwnerDocument (); };
  +           DOMNode*         DOMEntityImpl::getNextSibling() const                  
{cloneEntityRefTree(); return fNode.getNextSibling (); };
  +     const XMLCh*           DOMEntityImpl::getNodeValue() const                    
{cloneEntityRefTree(); return fNode.getNodeValue (); };
  +           DOMDocument*     DOMEntityImpl::getOwnerDocument() const                
{return fParent.fOwnerDocument; };
        const XMLCh*           DOMEntityImpl::getPrefix() const                       
{return fNode.getPrefix (); };
              DOMNode*         DOMEntityImpl::getParentNode() const                   
{return fNode.getParentNode (); };
              DOMNode*         DOMEntityImpl::getPreviousSibling() const              
{return fNode.getPreviousSibling (); };
              DOMNode*         DOMEntityImpl::insertBefore(DOMNode *newChild, DOMNode 
*refChild)
  -                                                                                   
{return fParent.insertBefore (newChild, refChild); };
  -           void             DOMEntityImpl::normalize()                             
{fParent.normalize (); };
  -           DOMNode*         DOMEntityImpl::removeChild(DOMNode *oldChild)          
{return fParent.removeChild (oldChild); };
  +                                                                                   
{cloneEntityRefTree(); return fParent.insertBefore (newChild, refChild); };
  +           void             DOMEntityImpl::normalize()                             
{cloneEntityRefTree(); fParent.normalize (); };
  +           DOMNode*         DOMEntityImpl::removeChild(DOMNode *oldChild)          
{cloneEntityRefTree(); return fParent.removeChild (oldChild); };
              DOMNode*         DOMEntityImpl::replaceChild(DOMNode *newChild, DOMNode 
*oldChild)
  -                                                                                   
{return fParent.replaceChild (newChild, oldChild); };
  +                                                                                   
{cloneEntityRefTree(); return fParent.replaceChild (newChild, oldChild); };
              bool             DOMEntityImpl::isSupported(const XMLCh *feature, const 
XMLCh *version) const
                                                                                      
{return fNode.isSupported (feature, version); };
              void             DOMEntityImpl::setPrefix(const XMLCh  *prefix)         
{fNode.setPrefix(prefix); };
              bool             DOMEntityImpl::hasAttributes() const                   
{return fNode.hasAttributes(); };
              bool             DOMEntityImpl::isSameNode(const DOMNode* other)        
{return fNode.isSameNode(other); };
  -           bool             DOMEntityImpl::isEqualNode(const DOMNode* arg)         
{return fParent.isEqualNode(arg); };
  +           bool             DOMEntityImpl::isEqualNode(const DOMNode* arg)         
{cloneEntityRefTree(); return fParent.isEqualNode(arg); };
              void*            DOMEntityImpl::setUserData(const XMLCh* key, void* 
data, DOMUserDataHandler* handler)
                                                                                      
{return fNode.setUserData(key, data, handler); };
              void*            DOMEntityImpl::getUserData(const XMLCh* key) const     
{return fNode.getUserData(key); };
  -           const XMLCh*     DOMEntityImpl::getBaseURI() const                      
{return fNode.getBaseURI(); };
  -           short            DOMEntityImpl::compareTreePosition(DOMNode* other)     
{return fNode.compareTreePosition(other); };
  -           const XMLCh*     DOMEntityImpl::getTextContent() const                  
{return fNode.getTextContent(); };
  -           void             DOMEntityImpl::setTextContent(const XMLCh* 
textContent){fNode.setTextContent(textContent); };
  -           const XMLCh*     DOMEntityImpl::lookupNamespacePrefix(const XMLCh* 
namespaceURI, bool useDefault) const  {return 
fNode.lookupNamespacePrefix(namespaceURI, useDefault); };
  -           bool             DOMEntityImpl::isDefaultNamespace(const XMLCh* 
namespaceURI) const {return fNode.isDefaultNamespace(namespaceURI); };
  -           const XMLCh*     DOMEntityImpl::lookupNamespaceURI(const XMLCh* prefix) 
const  {return fNode.lookupNamespaceURI(prefix); };
  +           short            DOMEntityImpl::compareTreePosition(DOMNode* other)     
{cloneEntityRefTree(); return fNode.compareTreePosition(other); };
  +           const XMLCh*     DOMEntityImpl::getTextContent() const                  
{cloneEntityRefTree(); return fNode.getTextContent(); };
  +           void             DOMEntityImpl::setTextContent(const XMLCh* 
textContent){cloneEntityRefTree(); fNode.setTextContent(textContent); };
  +           const XMLCh*     DOMEntityImpl::lookupNamespacePrefix(const XMLCh* 
namespaceURI, bool useDefault) const  {cloneEntityRefTree(); return 
fNode.lookupNamespacePrefix(namespaceURI, useDefault); };
  +           bool             DOMEntityImpl::isDefaultNamespace(const XMLCh* 
namespaceURI) const {cloneEntityRefTree(); return 
fNode.isDefaultNamespace(namespaceURI); };
  +           const XMLCh*     DOMEntityImpl::lookupNamespaceURI(const XMLCh* prefix) 
const  {cloneEntityRefTree(); return fNode.lookupNamespaceURI(prefix); };
              DOMNode*         DOMEntityImpl::getInterface(const XMLCh* feature)      
{return fNode.getInterface(feature); };
   
   
  
  
  
  1.4       +6 -4      xml-xerces/c/src/xercesc/dom/impl/DOMEntityImpl.hpp
  
  Index: DOMEntityImpl.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMEntityImpl.hpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DOMEntityImpl.hpp 30 Jul 2002 13:31:07 -0000      1.3
  +++ DOMEntityImpl.hpp 23 Sep 2002 19:41:07 -0000      1.4
  @@ -89,9 +89,10 @@
       DOMEntityReference*      fRefEntity;
   
       // New data introduced in DOM Level 3
  -    XMLCh*                fActualEncoding;
  -    XMLCh*                fEncoding;
  -    XMLCh*                fVersion;
  +    const XMLCh*          fActualEncoding;
  +    const XMLCh*          fEncoding;
  +    const XMLCh*          fVersion;
  +    const XMLCh*          fBaseURI;
       bool                  fEntityRefNodeCloned;
       // private helper function
       void     cloneEntityRefTree() const;
  @@ -125,6 +126,7 @@
       virtual void                   setEncoding(const XMLCh* encoding);
       virtual const XMLCh*           getVersion() const;
       virtual void                   setVersion(const XMLCh* version);
  +    virtual void                   setBaseURI(const XMLCh *arg);
   };
   
   #endif
  
  
  
  1.8       +13 -5     xml-xerces/c/src/xercesc/dom/impl/DOMEntityReferenceImpl.cpp
  
  Index: DOMEntityReferenceImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMEntityReferenceImpl.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DOMEntityReferenceImpl.cpp        16 Aug 2002 19:20:28 -0000      1.7
  +++ DOMEntityReferenceImpl.cpp        23 Sep 2002 19:41:07 -0000      1.8
  @@ -69,7 +69,7 @@
   
   DOMEntityReferenceImpl::DOMEntityReferenceImpl(DOMDocument *ownerDoc,
                                            const XMLCh *entityName)
  -    : fNode(ownerDoc), fParent(ownerDoc)
  +    : fNode(ownerDoc), fParent(ownerDoc), fBaseURI(0)
   {
       fName = ((DOMDocumentImpl *)getOwnerDocument())->getPooledString(entityName);
       // EntityReference behaves as a read-only node, since its contents
  @@ -81,9 +81,11 @@
               if (ownerDoc->getDoctype()->getEntities()) {
                   DOMEntityImpl* entity = 
(DOMEntityImpl*)ownerDoc->getDoctype()->getEntities()->getNamedItem(entityName);
                   if (entity) {
  +                    fBaseURI = entity->getBaseURI();
                       DOMEntityReference* refEntity = entity->getEntityRef();
  -                    if (refEntity)
  +                    if (refEntity) {
                           fParent.cloneChildren(refEntity);
  +                    }
                   }
               }
           }
  @@ -99,6 +101,7 @@
       : fNode(other.fNode), fParent(other.fParent), fChild(other.fChild)
   {
       fName = other.fName;
  +    fBaseURI = other.fBaseURI;
       if (deep)
           fParent.cloneChildren(&other);
       fNode.setReadOnly(true, true);
  @@ -173,6 +176,12 @@
       }
   }
   
  +const XMLCh* DOMEntityReferenceImpl::getBaseURI() const
  +{
  +    return fBaseURI;
  +}
  +
  +
   
   //
   //   Delegate functions from Node to the appropriate implementation.
  @@ -188,7 +197,7 @@
        const XMLCh*           DOMEntityReferenceImpl::getNamespaceURI() const         
        {return fNode.getNamespaceURI (); };
              DOMNode*         DOMEntityReferenceImpl::getNextSibling() const          
        {return fChild.getNextSibling (); };
        const XMLCh*           DOMEntityReferenceImpl::getNodeValue() const            
        {return fNode.getNodeValue (); };
  -           DOMDocument*     DOMEntityReferenceImpl::getOwnerDocument() const        
        {return fNode.getOwnerDocument (); };
  +           DOMDocument*     DOMEntityReferenceImpl::getOwnerDocument() const        
        {return fParent.fOwnerDocument; };
        const XMLCh*           DOMEntityReferenceImpl::getPrefix() const               
        {return fNode.getPrefix (); };
              DOMNode*         DOMEntityReferenceImpl::getParentNode() const           
        {return fChild.getParentNode (this); };
              DOMNode*         DOMEntityReferenceImpl::getPreviousSibling() const      
        {return fChild.getPreviousSibling (this); };
  @@ -208,7 +217,6 @@
              void*            DOMEntityReferenceImpl::setUserData(const XMLCh* key, 
void* data, DOMUserDataHandler* handler)
                                                                                       
        {return fNode.setUserData(key, data, handler); };
              void*            DOMEntityReferenceImpl::getUserData(const XMLCh* key) 
const     {return fNode.getUserData(key); };
  -           const XMLCh*     DOMEntityReferenceImpl::getBaseURI() const              
        {return fNode.getBaseURI(); };
              short            DOMEntityReferenceImpl::compareTreePosition(DOMNode* 
other)     {return fNode.compareTreePosition(other); };
              const XMLCh*     DOMEntityReferenceImpl::getTextContent() const          
        {return fNode.getTextContent(); };
              void             DOMEntityReferenceImpl::setTextContent(const XMLCh* 
textContent){fNode.setTextContent(textContent); };
  
  
  
  1.2       +2 -1      xml-xerces/c/src/xercesc/dom/impl/DOMEntityReferenceImpl.hpp
  
  Index: DOMEntityReferenceImpl.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMEntityReferenceImpl.hpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DOMEntityReferenceImpl.hpp        21 May 2002 20:29:32 -0000      1.1
  +++ DOMEntityReferenceImpl.hpp        23 Sep 2002 19:41:07 -0000      1.2
  @@ -85,6 +85,7 @@
       DOMChildNode     fChild;
   
       const XMLCh    *fName;
  +    const XMLCh    *fBaseURI;
   
       friend class XercesDOMParser;
   
  
  
  
  1.15      +2 -4      xml-xerces/c/src/xercesc/dom/impl/DOMNodeImpl.cpp
  
  Index: DOMNodeImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMNodeImpl.cpp,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- DOMNodeImpl.cpp   21 Aug 2002 17:58:42 -0000      1.14
  +++ DOMNodeImpl.cpp   23 Sep 2002 19:41:07 -0000      1.15
  @@ -482,11 +482,9 @@
           return false;
       }
   
  -// baseURI not suppported yet
  -/*
       if (XMLString::compareString(thisNode->getBaseURI(), arg->getBaseURI())) {
           return false;
  -    }*/
  +    }
   
       return true;
   }
  
  
  
  1.8       +13 -4     xml-xerces/c/src/xercesc/dom/impl/DOMNotationImpl.cpp
  
  Index: DOMNotationImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMNotationImpl.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DOMNotationImpl.cpp       16 Aug 2002 19:20:28 -0000      1.7
  +++ DOMNotationImpl.cpp       23 Sep 2002 19:41:07 -0000      1.8
  @@ -66,10 +66,10 @@
   
   
   DOMNotationImpl::DOMNotationImpl(DOMDocument *ownerDoc, const XMLCh *nName)
  -    : fNode(ownerDoc), fPublicId(0), fSystemId(0)
  +    : fNode(ownerDoc), fName(0), fPublicId(0), fSystemId(0), fBaseURI(0)
   {
       fNode.setIsLeafNode(true);
  -    fName = ((DOMDocumentImpl *)ownerDoc)->cloneString(nName);
  +    fName = ((DOMDocumentImpl *)ownerDoc)->getPooledString(nName);
   };
   
   DOMNotationImpl::DOMNotationImpl(const DOMNotationImpl &other, bool deep)
  @@ -79,6 +79,7 @@
       fName = other.fName;
       fPublicId = other.fPublicId;
       fSystemId = other.fSystemId;
  +    fBaseURI = other.fBaseURI;
   };
   
   
  @@ -159,6 +160,15 @@
       }
   }
   
  +void DOMNotationImpl::setBaseURI(const XMLCh* baseURI) {
  +    this->fBaseURI = ((DOMDocumentImpl *)getOwnerDocument())->cloneString(baseURI);
  +}
  +
  +const XMLCh* DOMNotationImpl::getBaseURI() const
  +{
  +    return fBaseURI;
  +}
  +
   
              DOMNode*         DOMNotationImpl::appendChild(DOMNode *newChild)         
 {return fNode.appendChild (newChild); };
              DOMNamedNodeMap* DOMNotationImpl::getAttributes() const                  
 {return fNode.getAttributes (); };
  @@ -189,7 +199,6 @@
              void*            DOMNotationImpl::setUserData(const XMLCh* key, void* 
data, DOMUserDataHandler* handler)
                                                                                       
 {return fNode.setUserData(key, data, handler); };
              void*            DOMNotationImpl::getUserData(const XMLCh* key) const    
 {return fNode.getUserData(key); };
  -           const XMLCh*     DOMNotationImpl::getBaseURI() const                     
 {return fNode.getBaseURI(); };
              short            DOMNotationImpl::compareTreePosition(DOMNode* other)    
 {return fNode.compareTreePosition(other); };
              const XMLCh*     DOMNotationImpl::getTextContent() const                 
 {return fNode.getTextContent(); };
              void             DOMNotationImpl::setTextContent(const XMLCh* 
textContent){fNode.setTextContent(textContent); };
  
  
  
  1.2       +7 -4      xml-xerces/c/src/xercesc/dom/impl/DOMNotationImpl.hpp
  
  Index: DOMNotationImpl.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMNotationImpl.hpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DOMNotationImpl.hpp       21 May 2002 20:29:32 -0000      1.1
  +++ DOMNotationImpl.hpp       23 Sep 2002 19:41:07 -0000      1.2
  @@ -83,6 +83,7 @@
       const XMLCh * fName;
       const XMLCh * fPublicId;
       const XMLCh * fSystemId;
  +    const XMLCh * fBaseURI;
   
   public:
       DOMNotationImpl(DOMDocument *ownerDoc, const XMLCh *);
  @@ -102,15 +103,17 @@
       // was specified, this will be null.
       virtual const XMLCh * getSystemId() const;
   
  -
       // NON-DOM: The Public Identifier for this Notation. If no public
  -    // identifier was specified, this will be null.  */
  +    // identifier was specified, this will be null.
       virtual void setPublicId(const XMLCh *arg);
   
   
       // NON-DOM: The System Identifier for this Notation. If no system
  -    // identifier was specified, this will be null.  */
  +    // identifier was specified, this will be null.
       virtual void setSystemId(const XMLCh *arg);
  +
  +    // NON-DOM: set base uri
  +    virtual void setBaseURI(const XMLCh *arg);
   
   };
   
  
  
  
  1.8       +12 -3     
xml-xerces/c/src/xercesc/dom/impl/DOMProcessingInstructionImpl.cpp
  
  Index: DOMProcessingInstructionImpl.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMProcessingInstructionImpl.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DOMProcessingInstructionImpl.cpp  16 Aug 2002 19:20:28 -0000      1.7
  +++ DOMProcessingInstructionImpl.cpp  23 Sep 2002 19:41:07 -0000      1.8
  @@ -68,7 +68,7 @@
   DOMProcessingInstructionImpl::DOMProcessingInstructionImpl(DOMDocument *ownerDoc,
                                                        const XMLCh *targt,
                                                        const XMLCh *dat)
  -    : fNode(ownerDoc)
  +    : fNode(ownerDoc), fBaseURI(0)
   {
       fNode.setIsLeafNode(true);
       this->fTarget = ((DOMDocumentImpl *)ownerDoc)->cloneString(targt);
  @@ -84,6 +84,7 @@
       fNode.setIsLeafNode(true);
       fTarget = other.fTarget;
       fData = other.fData;
  +    fBaseURI = other.fBaseURI;
   };
   
   
  @@ -177,6 +178,15 @@
       }
   }
   
  +void DOMProcessingInstructionImpl::setBaseURI(const XMLCh* baseURI) {
  +    this->fBaseURI = ((DOMDocumentImpl *)getOwnerDocument())->cloneString(baseURI);
  +}
  +
  +const XMLCh* DOMProcessingInstructionImpl::getBaseURI() const
  +{
  +    return fBaseURI? fBaseURI : fNode.fOwnerNode->getBaseURI();
  +}
  +
   //
   //    Delegation stubs for inherited functions
   //
  @@ -208,7 +218,6 @@
              void*            DOMProcessingInstructionImpl::setUserData(const XMLCh* 
key, void* data, DOMUserDataHandler* handler)
                                                                                       
              {return fNode.setUserData(key, data, handler); };
              void*            DOMProcessingInstructionImpl::getUserData(const XMLCh* 
key) const     {return fNode.getUserData(key); };
  -           const XMLCh*     DOMProcessingInstructionImpl::getBaseURI() const        
              {return fNode.getBaseURI(); };
              short            
DOMProcessingInstructionImpl::compareTreePosition(DOMNode* other)     {return 
fNode.compareTreePosition(other); };
              const XMLCh*     DOMProcessingInstructionImpl::getTextContent() const    
              {return fNode.getTextContent(); };
              void             DOMProcessingInstructionImpl::setTextContent(const 
XMLCh* textContent){fNode.setTextContent(textContent); };
  
  
  
  1.2       +5 -1      
xml-xerces/c/src/xercesc/dom/impl/DOMProcessingInstructionImpl.hpp
  
  Index: DOMProcessingInstructionImpl.hpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMProcessingInstructionImpl.hpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DOMProcessingInstructionImpl.hpp  21 May 2002 20:29:32 -0000      1.1
  +++ DOMProcessingInstructionImpl.hpp  23 Sep 2002 19:41:07 -0000      1.2
  @@ -85,6 +85,7 @@
   
       XMLCh       *fTarget;
       XMLCh       *fData;
  +    const XMLCh *fBaseURI;
   
   public:
       DOMProcessingInstructionImpl(DOMDocument *ownerDoc,
  @@ -100,6 +101,9 @@
       virtual const XMLCh *getData() const;
       virtual const XMLCh *getTarget() const;
       virtual void setData(const XMLCh *arg);
  +
  +    // NON-DOM: set base uri
  +    virtual void setBaseURI(const XMLCh* baseURI);
   };
   
   #endif
  
  
  

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

Reply via email to