From f0633b8fec8a01819399238645899eb30849b024 Mon Sep 17 00:00:00 2001
From: Tinny Ng <tng@apache.org>
Date: Thu, 26 Sep 2002 17:26:05 +0000
Subject: [PATCH] DOM L3: Add const to isSameNode, isEqualNode,
 compareTreePosition.  Patch from Gareth Reakes

git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@174246 13f79535-47bb-0310-9956-ffa450edef68
---
 doc/html/ApacheDOMC++BindingL3.html            | 17 +++++++++++++----
 src/xercesc/dom/DOMNode.hpp                    |  6 +++---
 src/xercesc/dom/impl/DOMAttrImpl.cpp           |  6 +++---
 src/xercesc/dom/impl/DOMCDATASectionImpl.cpp   |  6 +++---
 src/xercesc/dom/impl/DOMCommentImpl.cpp        |  6 +++---
 .../dom/impl/DOMDocumentFragmentImpl.cpp       |  6 +++---
 src/xercesc/dom/impl/DOMDocumentImpl.cpp       |  6 +++---
 src/xercesc/dom/impl/DOMDocumentTypeImpl.cpp   |  6 +++---
 src/xercesc/dom/impl/DOMElementImpl.cpp        |  6 +++---
 src/xercesc/dom/impl/DOMEntityImpl.cpp         |  6 +++---
 .../dom/impl/DOMEntityReferenceImpl.cpp        |  6 +++---
 src/xercesc/dom/impl/DOMNodeImpl.cpp           | 14 +++++++-------
 src/xercesc/dom/impl/DOMNodeImpl.hpp           | 18 +++++++++---------
 src/xercesc/dom/impl/DOMNotationImpl.cpp       |  6 +++---
 src/xercesc/dom/impl/DOMParentNode.cpp         |  2 +-
 src/xercesc/dom/impl/DOMParentNode.hpp         |  2 +-
 .../dom/impl/DOMProcessingInstructionImpl.cpp  |  6 +++---
 src/xercesc/dom/impl/DOMTextImpl.cpp           |  6 +++---
 18 files changed, 70 insertions(+), 61 deletions(-)

diff --git a/doc/html/ApacheDOMC++BindingL3.html b/doc/html/ApacheDOMC++BindingL3.html
index ca4018193..62186982e 100644
--- a/doc/html/ApacheDOMC++BindingL3.html
+++ b/doc/html/ApacheDOMC++BindingL3.html
@@ -110,6 +110,15 @@ are owned by implementation</li>
 
 <td ALIGN=LEFT VALIGN=TOP>[Bug 12442] Fix typo: "Mode:" -> "Model" </td>
 </tr>
+
+<tr ALIGN=LEFT VALIGN=TOP>
+<td>Xerces-C++ 2.1: September 26, 2002</td>
+
+<td ALIGN=LEFT VALIGN=TOP>Modified
+<br>- add const modifier to DOMNode::compareTreePosition
+<br>- add const modifier to DOMNode::isSameNode
+<br>- add const modifier to DOMNode::isEqualNode
+</tr>
 </table>
 
 <p>
@@ -1486,7 +1495,7 @@ prefix) = 0;</font></font></td>
 <td><font face="Courier New,Courier"><font size=-1>bool</font></font></td>
 
 <td><font face="Courier New,Courier"><font size=-1>isSameNode(const DOMNode*
-other) = 0;</font></font></td>
+other) const = 0;</font></font></td>
 </tr>
 
 <tr ALIGN=LEFT VALIGN=TOP>
@@ -1497,7 +1506,7 @@ other) = 0;</font></font></td>
 <td><font face="Courier New,Courier"><font size=-1>bool</font></font></td>
 
 <td><font face="Courier New,Courier"><font size=-1>isEqualNode(const DOMNode*
-arg) = 0;</font></font></td>
+arg) const = 0;</font></font></td>
 </tr>
 
 <tr ALIGN=LEFT VALIGN=TOP>
@@ -1542,8 +1551,8 @@ key) const = 0;</font></font></td>
 
 <td><font face="Courier New,Courier"><font size=-1>short</font></font></td>
 
-<td><font face="Courier New,Courier"><font size=-1>compareTreePosition(DOMNode*
-other) 0;</font></font></td>
+<td><font face="Courier New,Courier"><font size=-1>compareTreePosition(const DOMNode*
+other) const = 0;</font></font></td>
 </tr>
 
 <tr ALIGN=LEFT VALIGN=TOP>
diff --git a/src/xercesc/dom/DOMNode.hpp b/src/xercesc/dom/DOMNode.hpp
index c991efb4f..e109b4ddd 100644
--- a/src/xercesc/dom/DOMNode.hpp
+++ b/src/xercesc/dom/DOMNode.hpp
@@ -665,7 +665,7 @@ public:
      *   <code>false</code> otherwise.
      * @since DOM Level 3
      */
-    virtual bool              isSameNode(const DOMNode* other) = 0;
+    virtual bool              isSameNode(const DOMNode* other) const = 0;
 
     /**
      * Tests whether two nodes are equal.
@@ -709,7 +709,7 @@ public:
      *   <code>true</code> otherwise <code>false</code>.
      * @since DOM Level 3
      */
-    virtual bool              isEqualNode(const DOMNode* arg) = 0;
+    virtual bool              isEqualNode(const DOMNode* arg) const = 0;
 
 
     /**
@@ -791,7 +791,7 @@ public:
      *   node.
      * @since DOM Level 3
      */
-    virtual short                  compareTreePosition(DOMNode* other) = 0;
+    virtual short                  compareTreePosition(const DOMNode* other) const = 0;
 
     /**
      * This attribute returns the text content of this node and its
diff --git a/src/xercesc/dom/impl/DOMAttrImpl.cpp b/src/xercesc/dom/impl/DOMAttrImpl.cpp
index ea9fed536..09281cf94 100644
--- a/src/xercesc/dom/impl/DOMAttrImpl.cpp
+++ b/src/xercesc/dom/impl/DOMAttrImpl.cpp
@@ -340,13 +340,13 @@ DOMNode* DOMAttrImpl::rename(const XMLCh* namespaceURI, const XMLCh* name)
                                                                                  {return fNode.isSupported (feature, version); };
            void             DOMAttrImpl::setPrefix(const XMLCh  *prefix)         {fNode.setPrefix(prefix); };
            bool             DOMAttrImpl::hasAttributes() const                   {return fNode.hasAttributes(); };
-           bool             DOMAttrImpl::isSameNode(const DOMNode* other)        {return fNode.isSameNode(other); };
-           bool             DOMAttrImpl::isEqualNode(const DOMNode* arg)         {return fParent.isEqualNode(arg); };
+           bool             DOMAttrImpl::isSameNode(const DOMNode* other) const  {return fNode.isSameNode(other); };
+           bool             DOMAttrImpl::isEqualNode(const DOMNode* arg) const   {return fParent.isEqualNode(arg); };
            void*            DOMAttrImpl::setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler)
                                                                                  {return fNode.setUserData(key, data, handler); };
            void*            DOMAttrImpl::getUserData(const XMLCh* key) const     {return fNode.getUserData(key); };
            const XMLCh*     DOMAttrImpl::getBaseURI() const                      {return fNode.getBaseURI(); };
-           short            DOMAttrImpl::compareTreePosition(DOMNode* other)     {return fNode.compareTreePosition(other); };
+           short            DOMAttrImpl::compareTreePosition(const DOMNode* other) const {return fNode.compareTreePosition(other); };
            const XMLCh*     DOMAttrImpl::getTextContent() const                  {return fNode.getTextContent(); };
            void             DOMAttrImpl::setTextContent(const XMLCh* textContent){fNode.setTextContent(textContent); };
            const XMLCh*     DOMAttrImpl::lookupNamespacePrefix(const XMLCh* namespaceURI, bool useDefault) const  {return fNode.lookupNamespacePrefix(namespaceURI, useDefault); };
diff --git a/src/xercesc/dom/impl/DOMCDATASectionImpl.cpp b/src/xercesc/dom/impl/DOMCDATASectionImpl.cpp
index 460f07b2b..cbc82f87c 100644
--- a/src/xercesc/dom/impl/DOMCDATASectionImpl.cpp
+++ b/src/xercesc/dom/impl/DOMCDATASectionImpl.cpp
@@ -219,13 +219,13 @@ void DOMCDATASectionImpl::release()
                                                                                          {return fNode.isSupported (feature, version); };
            void             DOMCDATASectionImpl::setPrefix(const XMLCh  *prefix)         {fNode.setPrefix(prefix); };
            bool             DOMCDATASectionImpl::hasAttributes() const                   {return fNode.hasAttributes(); };
-           bool             DOMCDATASectionImpl::isSameNode(const DOMNode* other)        {return fNode.isSameNode(other); };
-           bool             DOMCDATASectionImpl::isEqualNode(const DOMNode* arg)         {return fParent.isEqualNode(arg); };
+           bool             DOMCDATASectionImpl::isSameNode(const DOMNode* other) const  {return fNode.isSameNode(other); };
+           bool             DOMCDATASectionImpl::isEqualNode(const DOMNode* arg) const   {return fParent.isEqualNode(arg); };
            void*            DOMCDATASectionImpl::setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler)
                                                                                          {return fNode.setUserData(key, data, handler); };
            void*            DOMCDATASectionImpl::getUserData(const XMLCh* key) const     {return fNode.getUserData(key); };
            const XMLCh*     DOMCDATASectionImpl::getBaseURI() const                      {return fNode.getBaseURI(); };
-           short            DOMCDATASectionImpl::compareTreePosition(DOMNode* other)     {return fNode.compareTreePosition(other); };
+           short            DOMCDATASectionImpl::compareTreePosition(const DOMNode* other) const {return fNode.compareTreePosition(other); };
            const XMLCh*     DOMCDATASectionImpl::getTextContent() const                  {return fNode.getTextContent(); };
            void             DOMCDATASectionImpl::setTextContent(const XMLCh* textContent){fNode.setTextContent(textContent); };
            const XMLCh*     DOMCDATASectionImpl::lookupNamespacePrefix(const XMLCh* namespaceURI, bool useDefault) const  {return fNode.lookupNamespacePrefix(namespaceURI, useDefault); };
diff --git a/src/xercesc/dom/impl/DOMCommentImpl.cpp b/src/xercesc/dom/impl/DOMCommentImpl.cpp
index ca7d2bd12..660780e10 100644
--- a/src/xercesc/dom/impl/DOMCommentImpl.cpp
+++ b/src/xercesc/dom/impl/DOMCommentImpl.cpp
@@ -148,13 +148,13 @@ void DOMCommentImpl::release()
                                                                                     {return fNode.isSupported (feature, version); };
            void             DOMCommentImpl::setPrefix(const XMLCh  *prefix)         {fNode.setPrefix(prefix); };
            bool             DOMCommentImpl::hasAttributes() const                   {return fNode.hasAttributes(); };
-           bool             DOMCommentImpl::isSameNode(const DOMNode* other)        {return fNode.isSameNode(other); };
-           bool             DOMCommentImpl::isEqualNode(const DOMNode* arg)         {return fNode.isEqualNode(arg); };
+           bool             DOMCommentImpl::isSameNode(const DOMNode* other) const  {return fNode.isSameNode(other); };
+           bool             DOMCommentImpl::isEqualNode(const DOMNode* arg) const   {return fNode.isEqualNode(arg); };
            void*            DOMCommentImpl::setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler)
                                                                                     {return fNode.setUserData(key, data, handler); };
            void*            DOMCommentImpl::getUserData(const XMLCh* key) const     {return fNode.getUserData(key); };
            const XMLCh*     DOMCommentImpl::getBaseURI() const                      {return fNode.getBaseURI(); };
-           short            DOMCommentImpl::compareTreePosition(DOMNode* other)     {return fNode.compareTreePosition(other); };
+           short            DOMCommentImpl::compareTreePosition(const DOMNode* other) const {return fNode.compareTreePosition(other); };
            const XMLCh*     DOMCommentImpl::getTextContent() const                  {return fNode.getTextContent(); };
            void             DOMCommentImpl::setTextContent(const XMLCh* textContent){fNode.setTextContent(textContent); };
            const XMLCh*     DOMCommentImpl::lookupNamespacePrefix(const XMLCh* namespaceURI, bool useDefault) const  {return fNode.lookupNamespacePrefix(namespaceURI, useDefault); };
diff --git a/src/xercesc/dom/impl/DOMDocumentFragmentImpl.cpp b/src/xercesc/dom/impl/DOMDocumentFragmentImpl.cpp
index 5d05a7787..99adf8956 100644
--- a/src/xercesc/dom/impl/DOMDocumentFragmentImpl.cpp
+++ b/src/xercesc/dom/impl/DOMDocumentFragmentImpl.cpp
@@ -160,13 +160,13 @@ void DOMDocumentFragmentImpl::release()
                                                                                              {return fNode.isSupported (feature, version); };
            void             DOMDocumentFragmentImpl::setPrefix(const XMLCh  *prefix)         {fNode.setPrefix(prefix); };
            bool             DOMDocumentFragmentImpl::hasAttributes() const                   {return fNode.hasAttributes(); };
-           bool             DOMDocumentFragmentImpl::isSameNode(const DOMNode* other)        {return fNode.isSameNode(other); };
-           bool             DOMDocumentFragmentImpl::isEqualNode(const DOMNode* arg)         {return fParent.isEqualNode(arg); };
+           bool             DOMDocumentFragmentImpl::isSameNode(const DOMNode* other) const  {return fNode.isSameNode(other); };
+           bool             DOMDocumentFragmentImpl::isEqualNode(const DOMNode* arg) const   {return fParent.isEqualNode(arg); };
            void*            DOMDocumentFragmentImpl::setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler)
                                                                                              {return fNode.setUserData(key, data, handler); };
            void*            DOMDocumentFragmentImpl::getUserData(const XMLCh* key) const     {return fNode.getUserData(key); };
            const XMLCh*     DOMDocumentFragmentImpl::getBaseURI() const                      {return fNode.getBaseURI(); };
-           short            DOMDocumentFragmentImpl::compareTreePosition(DOMNode* other)     {return fNode.compareTreePosition(other); };
+           short            DOMDocumentFragmentImpl::compareTreePosition(const DOMNode* other) const {return fNode.compareTreePosition(other); };
            const XMLCh*     DOMDocumentFragmentImpl::getTextContent() const                  {return fNode.getTextContent(); };
            void             DOMDocumentFragmentImpl::setTextContent(const XMLCh* textContent){fNode.setTextContent(textContent); };
            const XMLCh*     DOMDocumentFragmentImpl::lookupNamespacePrefix(const XMLCh* namespaceURI, bool useDefault) const  {return fNode.lookupNamespacePrefix(namespaceURI, useDefault); };
diff --git a/src/xercesc/dom/impl/DOMDocumentImpl.cpp b/src/xercesc/dom/impl/DOMDocumentImpl.cpp
index 1b7f75498..7bb87e5bd 100644
--- a/src/xercesc/dom/impl/DOMDocumentImpl.cpp
+++ b/src/xercesc/dom/impl/DOMDocumentImpl.cpp
@@ -692,12 +692,12 @@ int             DOMDocumentImpl::changes() const{
                                                                                      {return fNode.isSupported (feature, version); };
            void             DOMDocumentImpl::setPrefix(const XMLCh  *prefix)         {fNode.setPrefix(prefix); };
            bool             DOMDocumentImpl::hasAttributes() const                   {return fNode.hasAttributes(); };
-           bool             DOMDocumentImpl::isSameNode(const DOMNode* other)        {return fNode.isSameNode(other);};
-           bool             DOMDocumentImpl::isEqualNode(const DOMNode* arg)         {return fParent.isEqualNode(arg);};
+           bool             DOMDocumentImpl::isSameNode(const DOMNode* other) const  {return fNode.isSameNode(other);};
+           bool             DOMDocumentImpl::isEqualNode(const DOMNode* arg) const   {return fParent.isEqualNode(arg);};
            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); };
-           short            DOMDocumentImpl::compareTreePosition(DOMNode* other)     {return fNode.compareTreePosition(other); };
+           short            DOMDocumentImpl::compareTreePosition(const DOMNode* other) const {return fNode.compareTreePosition(other); };
            const XMLCh*     DOMDocumentImpl::getTextContent() const                  {return fNode.getTextContent(); };
            void             DOMDocumentImpl::setTextContent(const XMLCh* textContent){fNode.setTextContent(textContent); };
            const XMLCh*     DOMDocumentImpl::lookupNamespacePrefix(const XMLCh* namespaceURI, bool useDefault) const  {return fNode.lookupNamespacePrefix(namespaceURI, useDefault); };
diff --git a/src/xercesc/dom/impl/DOMDocumentTypeImpl.cpp b/src/xercesc/dom/impl/DOMDocumentTypeImpl.cpp
index 97280e2d2..943b95e72 100644
--- a/src/xercesc/dom/impl/DOMDocumentTypeImpl.cpp
+++ b/src/xercesc/dom/impl/DOMDocumentTypeImpl.cpp
@@ -464,12 +464,12 @@ void DOMDocumentTypeImpl::release()
                                                                                          {return fNode.isSupported (feature, version); };
            void             DOMDocumentTypeImpl::setPrefix(const XMLCh  *prefix)         {fNode.setPrefix(prefix); };
            bool             DOMDocumentTypeImpl::hasAttributes() const                   {return fNode.hasAttributes(); };
-           bool             DOMDocumentTypeImpl::isSameNode(const DOMNode* other)        {return fNode.isSameNode(other); };
+           bool             DOMDocumentTypeImpl::isSameNode(const DOMNode* other) const  {return fNode.isSameNode(other); };
            void*            DOMDocumentTypeImpl::setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler)
                                                                                          {return fNode.setUserData(key, data, handler); };
            void*            DOMDocumentTypeImpl::getUserData(const XMLCh* key) const     {return fNode.getUserData(key); };
            const XMLCh*     DOMDocumentTypeImpl::getBaseURI() const                      {return fNode.getBaseURI(); };
-           short            DOMDocumentTypeImpl::compareTreePosition(DOMNode* other)     {return fNode.compareTreePosition(other); };
+           short            DOMDocumentTypeImpl::compareTreePosition(const DOMNode* other) const {return fNode.compareTreePosition(other); };
            const XMLCh*     DOMDocumentTypeImpl::getTextContent() const                  {return fNode.getTextContent(); };
            void             DOMDocumentTypeImpl::setTextContent(const XMLCh* textContent){fNode.setTextContent(textContent); };
            const XMLCh*     DOMDocumentTypeImpl::lookupNamespacePrefix(const XMLCh* namespaceURI, bool useDefault) const  {return fNode.lookupNamespacePrefix(namespaceURI, useDefault); };
@@ -478,7 +478,7 @@ void DOMDocumentTypeImpl::release()
            DOMNode*         DOMDocumentTypeImpl::getInterface(const XMLCh* feature)      {return fNode.getInterface(feature); };
 
 
-bool DOMDocumentTypeImpl::isEqualNode(const DOMNode* arg)
+bool DOMDocumentTypeImpl::isEqualNode(const DOMNode* arg) const
 {
     if (isSameNode(arg)) {
         return true;
diff --git a/src/xercesc/dom/impl/DOMElementImpl.cpp b/src/xercesc/dom/impl/DOMElementImpl.cpp
index f5bb3eb13..00d6f03c9 100644
--- a/src/xercesc/dom/impl/DOMElementImpl.cpp
+++ b/src/xercesc/dom/impl/DOMElementImpl.cpp
@@ -522,11 +522,11 @@ const XMLCh* DOMElementImpl::getBaseURI() const
            bool             DOMElementImpl::isSupported(const XMLCh *feature, const XMLCh *version) const
                                                                                     {return fNode.isSupported (feature, version); };
            void             DOMElementImpl::setPrefix(const XMLCh  *prefix)         {fNode.setPrefix(prefix); };
-           bool             DOMElementImpl::isSameNode(const DOMNode* other)        {return fNode.isSameNode(other); };
+           bool             DOMElementImpl::isSameNode(const DOMNode* other) const  {return fNode.isSameNode(other); };
            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); };
-           short            DOMElementImpl::compareTreePosition(DOMNode* other)     {return fNode.compareTreePosition(other); };
+           short            DOMElementImpl::compareTreePosition(const DOMNode* other) const {return fNode.compareTreePosition(other); };
            const XMLCh*     DOMElementImpl::getTextContent() const                  {return fNode.getTextContent(); };
            void             DOMElementImpl::setTextContent(const XMLCh* textContent){fNode.setTextContent(textContent); };
            const XMLCh*     DOMElementImpl::lookupNamespacePrefix(const XMLCh* namespaceURI, bool useDefault) const  {return fNode.lookupNamespacePrefix(namespaceURI, useDefault); };
@@ -536,7 +536,7 @@ const XMLCh* DOMElementImpl::getBaseURI() const
 
 
 
-bool DOMElementImpl::isEqualNode(const DOMNode* arg)
+bool DOMElementImpl::isEqualNode(const DOMNode* arg) const
 {
     if (isSameNode(arg)) {
         return true;
diff --git a/src/xercesc/dom/impl/DOMEntityImpl.cpp b/src/xercesc/dom/impl/DOMEntityImpl.cpp
index b41772158..53780306d 100644
--- a/src/xercesc/dom/impl/DOMEntityImpl.cpp
+++ b/src/xercesc/dom/impl/DOMEntityImpl.cpp
@@ -283,12 +283,12 @@ void DOMEntityImpl::release()
                                                                                    {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)         {cloneEntityRefTree(); return fParent.isEqualNode(arg); };
+           bool             DOMEntityImpl::isSameNode(const DOMNode* other) const  {return fNode.isSameNode(other); };
+           bool             DOMEntityImpl::isEqualNode(const DOMNode* arg) const   {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); };
-           short            DOMEntityImpl::compareTreePosition(DOMNode* other)     {return fNode.compareTreePosition(other); };
+           short            DOMEntityImpl::compareTreePosition(const DOMNode* other) const {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); };
diff --git a/src/xercesc/dom/impl/DOMEntityReferenceImpl.cpp b/src/xercesc/dom/impl/DOMEntityReferenceImpl.cpp
index 65748414c..f7b8083aa 100644
--- a/src/xercesc/dom/impl/DOMEntityReferenceImpl.cpp
+++ b/src/xercesc/dom/impl/DOMEntityReferenceImpl.cpp
@@ -212,12 +212,12 @@ const XMLCh* DOMEntityReferenceImpl::getBaseURI() const
                                                                                             {return fNode.isSupported (feature, version); };
            void             DOMEntityReferenceImpl::setPrefix(const XMLCh  *prefix)         {fNode.setPrefix(prefix); };
            bool             DOMEntityReferenceImpl::hasAttributes() const                   {return fNode.hasAttributes(); };
-           bool             DOMEntityReferenceImpl::isSameNode(const DOMNode* other)        {return fNode.isSameNode(other); };
-           bool             DOMEntityReferenceImpl::isEqualNode(const DOMNode* arg)         {return fParent.isEqualNode(arg); };
+           bool             DOMEntityReferenceImpl::isSameNode(const DOMNode* other) const  {return fNode.isSameNode(other); };
+           bool             DOMEntityReferenceImpl::isEqualNode(const DOMNode* arg) const   {return fParent.isEqualNode(arg); };
            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); };
-           short            DOMEntityReferenceImpl::compareTreePosition(DOMNode* other)     {return fNode.compareTreePosition(other); };
+           short            DOMEntityReferenceImpl::compareTreePosition(const DOMNode* other) const {return fNode.compareTreePosition(other); };
            const XMLCh*     DOMEntityReferenceImpl::getTextContent() const                  {return fNode.getTextContent(); };
            void             DOMEntityReferenceImpl::setTextContent(const XMLCh* textContent){fNode.setTextContent(textContent); };
            const XMLCh*     DOMEntityReferenceImpl::lookupNamespacePrefix(const XMLCh* namespaceURI, bool useDefault) const  {return fNode.lookupNamespacePrefix(namespaceURI, useDefault); };
diff --git a/src/xercesc/dom/impl/DOMNodeImpl.cpp b/src/xercesc/dom/impl/DOMNodeImpl.cpp
index 8005968c8..b3404d221 100644
--- a/src/xercesc/dom/impl/DOMNodeImpl.cpp
+++ b/src/xercesc/dom/impl/DOMNodeImpl.cpp
@@ -441,12 +441,12 @@ void DOMNodeImpl::callUserDataHandlers(DOMUserDataHandler::DOMOperationType oper
         ((DOMDocumentImpl*)getOwnerDocument())->callUserDataHandlers(this, operation, src, dst);
 }
 
-bool DOMNodeImpl::isSameNode(const DOMNode* other)
+bool DOMNodeImpl::isSameNode(const DOMNode* other) const
 {
     return (castToNode(this) == other);
 }
 
-bool DOMNodeImpl::isEqualNode(const DOMNode* arg)
+bool DOMNodeImpl::isEqualNode(const DOMNode* arg) const
 {
     if (!arg)
         return false;
@@ -676,7 +676,7 @@ const XMLCh*     DOMNodeImpl::getBaseURI() const{
     return 0;
 }
 
-short            DOMNodeImpl::compareTreePosition(DOMNode* other){
+short            DOMNodeImpl::compareTreePosition(const DOMNode* other) const {
     // Questions of clarification for this method - to be answered by the
     // DOM WG.   Current assumptions listed - LM
     //
@@ -750,9 +750,9 @@ short            DOMNodeImpl::compareTreePosition(DOMNode* other){
     // We do this now, so that we get this info correct for attribute nodes
     // and their children.
 
-    DOMNode *node;
-    DOMNode *thisAncestor = castToNode(this);
-    DOMNode *otherAncestor = other;
+    const DOMNode *node;
+    const DOMNode *thisAncestor = castToNode(this);
+    const DOMNode *otherAncestor = other;
     int thisDepth=0;
     int otherDepth=0;
     for (node = castToNode(this); node != 0; node = node->getParentNode()) {
@@ -772,7 +772,7 @@ short            DOMNodeImpl::compareTreePosition(DOMNode* other){
     }
 
 
-    DOMNode *otherNode = other;
+    const DOMNode *otherNode = other;
 
     short thisAncestorType = thisAncestor->getNodeType();
     short otherAncestorType = otherAncestor->getNodeType();
diff --git a/src/xercesc/dom/impl/DOMNodeImpl.hpp b/src/xercesc/dom/impl/DOMNodeImpl.hpp
index 99cb20b06..5da8abac2 100644
--- a/src/xercesc/dom/impl/DOMNodeImpl.hpp
+++ b/src/xercesc/dom/impl/DOMNodeImpl.hpp
@@ -152,10 +152,10 @@ public:
     // Introduced in DOM Level 3
     void*             setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler);
     void*             getUserData(const XMLCh* key) const;
-    bool              isSameNode(const DOMNode* other);
-    bool              isEqualNode(const DOMNode* arg);
+    bool              isSameNode(const DOMNode* other) const;
+    bool              isEqualNode(const DOMNode* arg) const;
     const XMLCh*      getBaseURI() const ;
-    short             compareTreePosition(DOMNode* other) ;
+    short             compareTreePosition(const DOMNode* other) const;
     const XMLCh*      getTextContent() const ;
     void              setTextContent(const XMLCh* textContent) ;
     const XMLCh*      lookupNamespacePrefix(const XMLCh* namespaceURI, bool useDefault) const ;
@@ -348,10 +348,10 @@ public: // should really be protected - ALH
     virtual       void             setPrefix(const XMLCh * prefix) ;\
     virtual       void*            setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler) ;\
     virtual       void*            getUserData(const XMLCh* key) const ;\
-    virtual       bool             isSameNode(const DOMNode* other);\
-    virtual       bool             isEqualNode(const DOMNode* arg);\
+    virtual       bool             isSameNode(const DOMNode* other) const;\
+    virtual       bool             isEqualNode(const DOMNode* arg) const;\
     virtual const XMLCh*           getBaseURI() const ;\
-    virtual short                  compareTreePosition(DOMNode* other) ;\
+    virtual short                  compareTreePosition(const DOMNode* other) const ;\
     virtual const XMLCh*           getTextContent() const ;\
     virtual void                   setTextContent(const XMLCh* textContent) ;\
     virtual const XMLCh*           lookupNamespacePrefix(const XMLCh* namespaceURI, bool useDefault) const  ;\
@@ -391,13 +391,13 @@ public: // should really be protected - ALH
                                                                          {return fNode.isSupported (feature, version); };
            void             xxx::setPrefix(const XMLCh  *prefix)         {fNode.setPrefix(prefix); };
            bool             xxx::hasAttributes() const                   {return fNode.hasAttributes(); };
-           bool             xxx::isSameNode(const DOMNode* other)        {return fNode.isSameNode(other); };
-           bool             xxx::isEqualNode(const DOMNode* arg)         {return fNode.isEqualNode(arg); };
+           bool             xxx::isSameNode(const DOMNode* other) const  {return fNode.isSameNode(other); };
+           bool             xxx::isEqualNode(const DOMNode* arg) const   {return fNode.isEqualNode(arg); };
            void*            xxx::setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler)
                                                                          {return fNode.setUserData(key, data, handler); };
            void*            xxx::getUserData(const XMLCh* key) const     {return fNode.getUserData(key); };
            const XMLCh*     xxx::getBaseURI() const                      {return fNode.getBaseURI(); };
-           short            xxx::compareTreePosition(DOMNode* other)     {return fNode.compareTreePosition(other); };
+           short            xxx::compareTreePosition(const DOMNode* other) const {return fNode.compareTreePosition(other); };
            const XMLCh*     xxx::getTextContent() const                  {return fNode.getTextContent(); };
            void             xxx::setTextContent(const XMLCh* textContent){fNode.setTextContent(textContent); };
            const XMLCh*     xxx::lookupNamespacePrefix(const XMLCh* namespaceURI, bool useDefault) const {return fNode.lookupNamespacePrefix(namespaceURI, useDefault); };
diff --git a/src/xercesc/dom/impl/DOMNotationImpl.cpp b/src/xercesc/dom/impl/DOMNotationImpl.cpp
index 31e555820..e42943b2d 100644
--- a/src/xercesc/dom/impl/DOMNotationImpl.cpp
+++ b/src/xercesc/dom/impl/DOMNotationImpl.cpp
@@ -196,12 +196,12 @@ const XMLCh* DOMNotationImpl::getBaseURI() const
                                                                                      {return fNode.isSupported (feature, version); };
            void             DOMNotationImpl::setPrefix(const XMLCh  *prefix)         {fNode.setPrefix(prefix); };
            bool             DOMNotationImpl::hasAttributes() const                   {return fNode.hasAttributes(); };
-           bool             DOMNotationImpl::isSameNode(const DOMNode* other)        {return fNode.isSameNode(other); };
-           bool             DOMNotationImpl::isEqualNode(const DOMNode* arg)         {return fNode.isEqualNode(arg); };
+           bool             DOMNotationImpl::isSameNode(const DOMNode* other) const  {return fNode.isSameNode(other); };
+           bool             DOMNotationImpl::isEqualNode(const DOMNode* arg) const   {return fNode.isEqualNode(arg); };
            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); };
-           short            DOMNotationImpl::compareTreePosition(DOMNode* other)     {return fNode.compareTreePosition(other); };
+           short            DOMNotationImpl::compareTreePosition(const DOMNode* other) const {return fNode.compareTreePosition(other); };
            const XMLCh*     DOMNotationImpl::getTextContent() const                  {return fNode.getTextContent(); };
            void             DOMNotationImpl::setTextContent(const XMLCh* textContent){fNode.setTextContent(textContent); };
            const XMLCh*     DOMNotationImpl::lookupNamespacePrefix(const XMLCh* namespaceURI, bool useDefault) const  {return fNode.lookupNamespacePrefix(namespaceURI, useDefault); };
diff --git a/src/xercesc/dom/impl/DOMParentNode.cpp b/src/xercesc/dom/impl/DOMParentNode.cpp
index db7a2bfed..18b7a2631 100644
--- a/src/xercesc/dom/impl/DOMParentNode.cpp
+++ b/src/xercesc/dom/impl/DOMParentNode.cpp
@@ -402,7 +402,7 @@ void DOMParentNode::normalize()
 
 //Introduced in DOM Level 3
 
-bool DOMParentNode::isEqualNode(const DOMNode* arg)
+bool DOMParentNode::isEqualNode(const DOMNode* arg) const
 {
     if (arg && castToNodeImpl(this)->isSameNode(arg))
         return true;
diff --git a/src/xercesc/dom/impl/DOMParentNode.hpp b/src/xercesc/dom/impl/DOMParentNode.hpp
index 709e118ef..3002e1449 100644
--- a/src/xercesc/dom/impl/DOMParentNode.hpp
+++ b/src/xercesc/dom/impl/DOMParentNode.hpp
@@ -123,7 +123,7 @@ public:
     void	normalize();
 
     //Introduced in DOM Level 3
-    bool isEqualNode(const DOMNode* arg);
+    bool isEqualNode(const DOMNode* arg) const;
 
     // NON-DOM
     // unlike getOwnerDocument this never returns null, even for Document nodes
diff --git a/src/xercesc/dom/impl/DOMProcessingInstructionImpl.cpp b/src/xercesc/dom/impl/DOMProcessingInstructionImpl.cpp
index b879868ea..16c38a087 100644
--- a/src/xercesc/dom/impl/DOMProcessingInstructionImpl.cpp
+++ b/src/xercesc/dom/impl/DOMProcessingInstructionImpl.cpp
@@ -213,12 +213,12 @@ const XMLCh* DOMProcessingInstructionImpl::getBaseURI() const
                                                                                                   {return fNode.isSupported (feature, version); };
            void             DOMProcessingInstructionImpl::setPrefix(const XMLCh  *prefix)         {fNode.setPrefix(prefix); };
            bool             DOMProcessingInstructionImpl::hasAttributes() const                   {return fNode.hasAttributes(); };
-           bool             DOMProcessingInstructionImpl::isSameNode(const DOMNode* other)        {return fNode.isSameNode(other); };
-           bool             DOMProcessingInstructionImpl::isEqualNode(const DOMNode* arg)         {return fNode.isEqualNode(arg); };
+           bool             DOMProcessingInstructionImpl::isSameNode(const DOMNode* other) const  {return fNode.isSameNode(other); };
+           bool             DOMProcessingInstructionImpl::isEqualNode(const DOMNode* arg) const   {return fNode.isEqualNode(arg); };
            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); };
-           short            DOMProcessingInstructionImpl::compareTreePosition(DOMNode* other)     {return fNode.compareTreePosition(other); };
+           short            DOMProcessingInstructionImpl::compareTreePosition(const DOMNode* other) const {return fNode.compareTreePosition(other); };
            const XMLCh*     DOMProcessingInstructionImpl::getTextContent() const                  {return fNode.getTextContent(); };
            void             DOMProcessingInstructionImpl::setTextContent(const XMLCh* textContent){fNode.setTextContent(textContent); };
            const XMLCh*     DOMProcessingInstructionImpl::lookupNamespacePrefix(const XMLCh* namespaceURI, bool useDefault) const  {return fNode.lookupNamespacePrefix(namespaceURI, useDefault); };
diff --git a/src/xercesc/dom/impl/DOMTextImpl.cpp b/src/xercesc/dom/impl/DOMTextImpl.cpp
index 043686d86..ef9d4d492 100644
--- a/src/xercesc/dom/impl/DOMTextImpl.cpp
+++ b/src/xercesc/dom/impl/DOMTextImpl.cpp
@@ -221,13 +221,13 @@ void DOMTextImpl::release()
                                                                                  {return fNode.isSupported (feature, version); };
            void             DOMTextImpl::setPrefix(const XMLCh  *prefix)         {fNode.setPrefix(prefix); };
            bool             DOMTextImpl::hasAttributes() const                   {return fNode.hasAttributes(); };
-           bool             DOMTextImpl::isSameNode(const DOMNode* other)        {return fNode.isSameNode(other); };
-           bool             DOMTextImpl::isEqualNode(const DOMNode* arg)         {return fNode.isEqualNode(arg); };
+           bool             DOMTextImpl::isSameNode(const DOMNode* other) const  {return fNode.isSameNode(other); };
+           bool             DOMTextImpl::isEqualNode(const DOMNode* arg) const   {return fNode.isEqualNode(arg); };
            void*            DOMTextImpl::setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler)
                                                                                  {return fNode.setUserData(key, data, handler); };
            void*            DOMTextImpl::getUserData(const XMLCh* key) const     {return fNode.getUserData(key); };
            const XMLCh*     DOMTextImpl::getBaseURI() const                      {return fNode.getBaseURI(); };
-           short            DOMTextImpl::compareTreePosition(DOMNode* other)     {return fNode.compareTreePosition(other); };
+           short            DOMTextImpl::compareTreePosition(const DOMNode* other) const {return fNode.compareTreePosition(other); };
            const XMLCh*     DOMTextImpl::getTextContent() const                  {return fNode.getTextContent(); };
            void             DOMTextImpl::setTextContent(const XMLCh* textContent){fNode.setTextContent(textContent); };
            const XMLCh*     DOMTextImpl::lookupNamespacePrefix(const XMLCh* namespaceURI, bool useDefault) const  {return fNode.lookupNamespacePrefix(namespaceURI, useDefault); };
-- 
GitLab