diff --git a/src/xercesc/dom/DOMDocument.hpp b/src/xercesc/dom/DOMDocument.hpp
index 6536a4560363f41bb4e0d8541369f1fb86bde30a..cf196b6c8c33197218979bcede019f252bdc853e 100644
--- a/src/xercesc/dom/DOMDocument.hpp
+++ b/src/xercesc/dom/DOMDocument.hpp
@@ -818,7 +818,13 @@ public:
      * normalizes attribute values, etc.
      * <br>Mutation events, when supported, are generated to reflect the
      * changes occuring on the document.
-     * @since DOM Level 3
+     * Note that this is a partial implementation. Not all the required features are implemented.
+     * Currently <code>DOMAttr</code> and <code>DOMText</code> nodes are normalized. 
+     * Features to remove <code>DOMComment</code> and <code>DOMCDATASection</code> work.
+     * The feature to normalize namespaces is implemented. This feature is called 
+     * "namespaces" and is incorectly documented in the current WD.
+     * @since DOM Level 3 
+     *
      */
     virtual void                   normalizeDocument() = 0;
 
@@ -828,6 +834,13 @@ public:
      * 
      * @return The <code>DOMConfiguration</code> from this <code>DOMDocument</code>
      *
+     * Note that this is a partial implementation. Not all the required features are 
+     * implemented and this is only used by normalizeDocument.
+     * Currently <code>DOMAttr</code> and <code>DOMText</code> nodes are normalized. 
+     * Features to remove <code>DOMComment</code> and <code>DOMCDATASection</code> work.
+     * The feature to normalize namespaces is implemented. This feature is called 
+     * "namespaces" and is incorectly documented in the current WD.
+     *
      * <p><b>"Experimental - subject to change"</b></p>
      * @since DOM Level 3
      */
diff --git a/src/xercesc/dom/impl/DOMDocumentImpl.cpp b/src/xercesc/dom/impl/DOMDocumentImpl.cpp
index 3d6adb5ef2f8068cfa10eec329587f160e920b7e..c023cb442cfb63d10b6818de44f6637aebe6ec30 100644
--- a/src/xercesc/dom/impl/DOMDocumentImpl.cpp
+++ b/src/xercesc/dom/impl/DOMDocumentImpl.cpp
@@ -83,6 +83,7 @@
 #include "DOMEntityImpl.hpp"
 #include "DOMEntityReferenceImpl.hpp"
 #include "DOMNamedNodeMapImpl.hpp"
+#include "DOMNormalizer.hpp"
 #include "DOMNotationImpl.hpp"
 #include "DOMProcessingInstructionImpl.hpp"
 #include "DOMTextImpl.hpp"
@@ -119,6 +120,7 @@ DOMDocumentImpl::DOMDocumentImpl()
       fDocType(0),
       fDocElement(0),
       fNamePool(0),
+      fNormalizer(0),
       fNodeIDMap(0),
       fRanges(0),
       fNodeIterators(0),
@@ -151,6 +153,7 @@ DOMDocumentImpl::DOMDocumentImpl(const XMLCh *fNamespaceURI,
       fDocType(0),
       fDocElement(0),
       fNamePool(0),
+      fNormalizer(0),
       fNodeIDMap(0),
       fRanges(0),
       fNodeIterators(0),
@@ -228,6 +231,8 @@ DOMDocumentImpl::~DOMDocumentImpl()
         delete fRecycleBufferPtr;
     }
 
+    delete fNormalizer;
+
     //  Delete the heap for this document.  This uncerimoniously yanks the storage
     //      out from under all of the nodes in the document.  Destructors are NOT called.
     this->deleteHeap();
@@ -989,7 +994,11 @@ DOMNode* DOMDocumentImpl::adoptNode(DOMNode* source) {
 }
 
 void DOMDocumentImpl::normalizeDocument() {
-    throw DOMException(DOMException::NOT_SUPPORTED_ERR, 0);
+
+    if(!fNormalizer) 
+        fNormalizer = new DOMNormalizer();
+
+    fNormalizer->normalizeDocument(this);
 }
 
 DOMConfiguration* DOMDocumentImpl::getDOMConfiguration() const {
@@ -999,6 +1008,10 @@ DOMConfiguration* DOMDocumentImpl::getDOMConfiguration() const {
     return fDOMConfiguration;
 }
 
+void DOMDocumentImpl::setDOMConfiguration(DOMConfiguration *config) {
+    fDOMConfiguration = config;
+}
+
 DOMNode *DOMDocumentImpl::importNode(DOMNode *source, bool deep, bool cloningDoc)
 {
     DOMNode *newnode=0;
diff --git a/src/xercesc/dom/impl/DOMDocumentImpl.hpp b/src/xercesc/dom/impl/DOMDocumentImpl.hpp
index ecdcc11c83360984b5bfe58be822a7f39909a03f..130e347c43507009a34a89cee62a08fa82908dfe 100644
--- a/src/xercesc/dom/impl/DOMDocumentImpl.hpp
+++ b/src/xercesc/dom/impl/DOMDocumentImpl.hpp
@@ -102,6 +102,7 @@ class DOMNotationImpl;
 class DOMProcessingInstructionImpl;
 class DOMTextImpl;
 class DOMNodeIteratorImpl;
+class DOMNormalizer;
 class DOMTreeWalkerImpl;
 class DOMNodeFilter;
 class DOMNodeFilterImpl;
@@ -267,6 +268,7 @@ public:
     virtual DOMNode*             adoptNode(DOMNode* source);
     virtual void                 normalizeDocument();
     virtual DOMConfiguration*    getDOMConfiguration() const;
+    virtual void                 setDOMConfiguration(DOMConfiguration *config);
 
     // helper functions to prevent storing userdata pointers on every node.
     void*                        setUserData(DOMNodeImpl* n,
@@ -369,7 +371,7 @@ private:
     DOMDocumentType*      fDocType;
     DOMElement*           fDocElement;
     DOMStringPool*        fNamePool;
-
+    DOMNormalizer*        fNormalizer;
     Ranges*               fRanges;
     NodeIterators*        fNodeIterators;