diff --git a/samples/MemParse/MemParseHandlers.hpp b/samples/MemParse/MemParseHandlers.hpp
index 15a161a74c5d3c9883be4b787b43ff7e60290b90..0733288204f5f403c15138ad7bad782ed15cc7a7 100644
--- a/samples/MemParse/MemParseHandlers.hpp
+++ b/samples/MemParse/MemParseHandlers.hpp
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.5  2002/11/04 15:23:03  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.4  2002/02/01 22:37:14  peiyongz
  * sane_include
  *
@@ -80,7 +83,10 @@
 //  Includes
 // ---------------------------------------------------------------------------
 #include <xercesc/sax/HandlerBase.hpp>
+
+XERCES_CPP_NAMESPACE_BEGIN
 class AttributeList;
+XERCES_CPP_NAMESPACE_END
 
 
 class MemParseHandlers : public HandlerBase
diff --git a/samples/Redirect/RedirectHandlers.hpp b/samples/Redirect/RedirectHandlers.hpp
index ae2e76b6e35c0dd6d3953d3f423dac6e18eeb82c..0e04c9796c55ad8a29be1086365a9b0a25b778d4 100644
--- a/samples/Redirect/RedirectHandlers.hpp
+++ b/samples/Redirect/RedirectHandlers.hpp
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.5  2002/11/04 15:23:03  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.4  2002/02/01 22:38:26  peiyongz
  * sane_include
  *
@@ -80,7 +83,10 @@
 //  Includes
 // ---------------------------------------------------------------------------
 #include <xercesc/sax/HandlerBase.hpp>
+
+XERCES_CPP_NAMESPACE_BEGIN
 class AttributeList;
+XERCES_CPP_NAMESPACE_END
 
 
 class RedirectHandlers : public HandlerBase
diff --git a/samples/SAXCount/SAXCountHandlers.hpp b/samples/SAXCount/SAXCountHandlers.hpp
index 78b3ea585f9a422c5484511bb8fe5c221c8cedfb..42933695eb1a002029ca1da47e135873e9d91787 100644
--- a/samples/SAXCount/SAXCountHandlers.hpp
+++ b/samples/SAXCount/SAXCountHandlers.hpp
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.6  2002/11/04 15:23:03  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.5  2002/02/01 22:41:07  peiyongz
  * sane_include
  *
@@ -84,7 +87,9 @@
 // ---------------------------------------------------------------------------
 #include <xercesc/sax/HandlerBase.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 class AttributeList;
+XERCES_CPP_NAMESPACE_END
 
 class SAXCountHandlers : public HandlerBase
 {
diff --git a/samples/StdInParse/StdInParseHandlers.hpp b/samples/StdInParse/StdInParseHandlers.hpp
index be844ef68bdffc89087df29b656bd3a965a7a531..ace9102cf600097afad13ab2e1d17fcb09a63cbb 100644
--- a/samples/StdInParse/StdInParseHandlers.hpp
+++ b/samples/StdInParse/StdInParseHandlers.hpp
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.5  2002/11/04 15:23:03  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.4  2002/02/01 22:41:37  peiyongz
  * sane_include
  *
@@ -80,8 +83,10 @@
 //  Includes
 // ---------------------------------------------------------------------------
 #include <xercesc/sax/HandlerBase.hpp>
-class AttributeList;
 
+XERCES_CPP_NAMESPACE_BEGIN
+class AttributeList;
+XERCES_CPP_NAMESPACE_END
 
 class StdInParseHandlers : public HandlerBase
 {
diff --git a/src/xercesc/util/ArrayIndexOutOfBoundsException.hpp b/src/xercesc/util/ArrayIndexOutOfBoundsException.hpp
index d6406e4a9a5a43b5d3b5c51b23dcdda648eb0c5d..0b0db3f46d4fa40fa8977438952e86bea01e1303 100644
--- a/src/xercesc/util/ArrayIndexOutOfBoundsException.hpp
+++ b/src/xercesc/util/ArrayIndexOutOfBoundsException.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -64,7 +64,10 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/XMLException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 MakeXMLException(ArrayIndexOutOfBoundsException, XMLUTIL_EXPORT)
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/Base64.cpp b/src/xercesc/util/Base64.cpp
index 464f5c6e3a93f47ee302e46abdc65904e2b7bfb6..d56df24af1cec101e6b120d58a71191da5cbb7fa 100644
--- a/src/xercesc/util/Base64.cpp
+++ b/src/xercesc/util/Base64.cpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 2001 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 2001, International
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.5  2002/11/04 15:22:03  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.4  2002/03/19 17:01:20  peiyongz
  * Fix to Bug#7243 Base64 encoding is not working.
  *
@@ -97,10 +100,12 @@
 #include <xercesc/util/PlatformUtils.hpp>
 #include <xercesc/util/TransService.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 // ---------------------------------------------------------------------------
 //  constants
 // ---------------------------------------------------------------------------
-static const int BASELENGTH = 255;       
+static const int BASELENGTH = 255;
 static const int FOURBYTE   = 4;
 
 // ---------------------------------------------------------------------------
@@ -113,14 +118,14 @@ const XMLByte Base64::base64Alphabet[] = {
     chLatin_F, chLatin_G, chLatin_H, chLatin_I, chLatin_J,
     chLatin_K, chLatin_L, chLatin_M, chLatin_N, chLatin_O,
     chLatin_P, chLatin_Q, chLatin_R, chLatin_S, chLatin_T,
-    chLatin_U, chLatin_V, chLatin_W, chLatin_X, chLatin_Y, chLatin_Z, 
-	chLatin_a, chLatin_b, chLatin_c, chLatin_d, chLatin_e, 
-	chLatin_f, chLatin_g, chLatin_h, chLatin_i, chLatin_j, 
-	chLatin_k, chLatin_l, chLatin_m, chLatin_n, chLatin_o, 
-	chLatin_p, chLatin_q, chLatin_r, chLatin_s, chLatin_t, 
-	chLatin_u, chLatin_v, chLatin_w, chLatin_x, chLatin_y, chLatin_z, 
-	chDigit_0, chDigit_1, chDigit_2, chDigit_3, chDigit_4, 
-	chDigit_5, chDigit_6, chDigit_7, chDigit_8, chDigit_9, 
+    chLatin_U, chLatin_V, chLatin_W, chLatin_X, chLatin_Y, chLatin_Z,
+	chLatin_a, chLatin_b, chLatin_c, chLatin_d, chLatin_e,
+	chLatin_f, chLatin_g, chLatin_h, chLatin_i, chLatin_j,
+	chLatin_k, chLatin_l, chLatin_m, chLatin_n, chLatin_o,
+	chLatin_p, chLatin_q, chLatin_r, chLatin_s, chLatin_t,
+	chLatin_u, chLatin_v, chLatin_w, chLatin_x, chLatin_y, chLatin_z,
+	chDigit_0, chDigit_1, chDigit_2, chDigit_3, chDigit_4,
+	chDigit_5, chDigit_6, chDigit_7, chDigit_8, chDigit_9,
 	chPlus, chForwardSlash, chNull
 };
 
@@ -235,7 +240,7 @@ XMLByte* Base64::encode(const XMLByte* const inputData,
 //
 // In previous version, we use XMLString::strLen(decodedData)
 // to get the length, this will fail for test case containing
-// consequtive "A", such "AAFF", or "ab56AA56". Instead of 
+// consequtive "A", such "AAFF", or "ab56AA56". Instead of
 // returning 3/6, we have 0 and 3, indicating that "AA", after
 // decoded, is interpreted as <null> by the strLen().
 //
@@ -260,7 +265,7 @@ int Base64::getDataLength( const XMLCh* const inputData )
 // return 0(null) if invalid data found.
 // return the buffer containning decoded data otherwise
 // the caller is responsible for the de-allocation of the
-// buffer returned. 
+// buffer returned.
 //
 // temporary data, rawInputData, is ALWAYS released by this function.
 //
@@ -294,8 +299,8 @@ XMLByte* Base64::decode(const XMLByte* const inputData,
     rawInputData[ rawInputLength ] = 0;
 
     // the length of raw data should be divisible by four
-    if (( rawInputLength % FOURBYTE ) != 0 ) 
-        return 0;  
+    if (( rawInputLength % FOURBYTE ) != 0 )
+        return 0;
 
     int quadrupletCount = rawInputLength / FOURBYTE;
     if ( quadrupletCount == 0 )
@@ -351,17 +356,17 @@ XMLByte* Base64::decode(const XMLByte* const inputData,
         return 0;
     }
 
-    b1 = base64Inverse[ d1 ]; 
+    b1 = base64Inverse[ d1 ];
     b2 = base64Inverse[ d2 ];
 
     // try to process last two octets
     d3 = rawInputData[ rawInputIndex++ ];
     d4 = rawInputData[ rawInputIndex++ ];
 
-    if (!isData( d3 ) || !isData( d4 )) 
+    if (!isData( d3 ) || !isData( d4 ))
     {
         // check if last two are PAD characters
-        if (isPad( d3 ) && isPad( d4 )) 
+        if (isPad( d3 ) && isPad( d4 ))
         {
             // two PAD e.g. 3c==
             if ((b2 & 0xf) != 0) // last 4 bits should be zero
@@ -372,8 +377,8 @@ XMLByte* Base64::decode(const XMLByte* const inputData,
 
             decodedData[ outputIndex++ ] = set1stOctet(b1, b2);
         }
-        else if (!isPad( d3 ) && isPad( d4 )) 
-        {               
+        else if (!isPad( d3 ) && isPad( d4 ))
+        {
             // one PAD e.g. 3cQ=
             b3 = base64Inverse[ d3 ];
             if (( b3 & 0x3 ) != 0 ) // last 2 bits should be zero
@@ -384,16 +389,16 @@ XMLByte* Base64::decode(const XMLByte* const inputData,
 
             decodedData[ outputIndex++ ] = set1stOctet( b1, b2 );
             decodedData[ outputIndex++ ] = set2ndOctet( b2, b3 );
-        } 
-        else 
+        }
+        else
         {
-            // an error like "3c[Pad]r", "3cdX", "3cXd", "3cXX" where X is non data 
+            // an error like "3c[Pad]r", "3cdX", "3cXd", "3cXX" where X is non data
             delete[] decodedData;
             return 0;
-        }       
-    } 
-    else 
-    { 
+        }
+    }
+    else
+    {
         // no PAD e.g 3cQl
         b3 = base64Inverse[ d3 ];
         b4 = base64Inverse[ d4 ];
@@ -403,7 +408,7 @@ XMLByte* Base64::decode(const XMLByte* const inputData,
     }
 
     // write out the end of string
-    decodedData[ outputIndex ] = 0; 
+    decodedData[ outputIndex ] = 0;
     *outputLength = outputIndex;
 
     return decodedData;
@@ -460,15 +465,17 @@ void Base64::init()
 
     int i;
     // set all fields to -1
-    for ( i = 0; i < BASELENGTH; i++ ) 
-        base64Inverse[i] = (XMLByte)-1; 
+    for ( i = 0; i < BASELENGTH; i++ )
+        base64Inverse[i] = (XMLByte)-1;
 
     // compute inverse table
-    for ( i = 0; i < 64; i++ ) 
+    for ( i = 0; i < 64; i++ )
         base64Inverse[ base64Alphabet[i] ] = (XMLByte)i;
 }
 
-bool Base64::isData(const XMLByte& octet) 
+bool Base64::isData(const XMLByte& octet)
 {
     return (base64Inverse[octet]!=(XMLByte)-1);
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/Base64.hpp b/src/xercesc/util/Base64.hpp
index c7809c56e04e9cd5be200122dc7159f8df30530a..ea2ae7611dd5a9d4fd0d17bdcfff275b2df202f3 100644
--- a/src/xercesc/util/Base64.hpp
+++ b/src/xercesc/util/Base64.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 2001 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 2001, International
@@ -64,6 +64,8 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/XMLUniDefs.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 //
 // This class provides encode/decode for RFC 2045 Base64 as
 // defined by RFC 2045, N. Freed and N. Borenstein.
@@ -71,7 +73,7 @@
 // Part One: Format of Internet Message Bodies. Reference
 // 1996 Available at: http://www.ietf.org/rfc/rfc2045.txt
 // This class is used by XML Schema binary format validation
-//  
+//
 //
 class XMLUTIL_EXPORT Base64
 {
@@ -81,7 +83,7 @@ public :
 
     /**
      * Encodes octets into Base64 data
-     * 
+     *
      * @param inputData Binary data in XMLByte stream.
      * @param inputLength Length of the XMLByte stream.
      * @param outputLength Length of the encoded Base64 byte stream.
@@ -94,10 +96,10 @@ public :
 
     /**
      * Decodes Base64 data into octets
-     * 
+     *
      * @param inputData Base64 data in XMLByte stream.
-     * @param outputLength Length of decoded XMLByte stream. 
-     * @return Decoded binary data in XMLByte stream, 
+     * @param outputLength Length of decoded XMLByte stream.
+     * @return Decoded binary data in XMLByte stream,
 	 *      or NULL if input data can not be decoded.
      */
     static XMLByte* decode(const XMLByte* const inputData,
@@ -105,10 +107,10 @@ public :
 
     /**
      * Decodes Base64 data into XMLCh
-     * 
+     *
      * @param inputData Base64 data in XMLCh stream.
      * @param outputLength Length of decoded XMLCh stream
-     * @return Decoded binary data in XMLCh stream,  
+     * @return Decoded binary data in XMLCh stream,
      *      or NULL if input data can not be decoded.
      */
     static XMLCh* decode(const XMLCh* const inputData,
@@ -117,11 +119,11 @@ public :
     /**
      * Get data length
 	 *
-     * Returns length of decoded data given an array 
+     * Returns length of decoded data given an array
      * containing encoded data.
      *
      * @param inputData Base64 data in XMLCh stream.
-     * @return Length of decoded data, 
+     * @return Length of decoded data,
 	 *      or -1 if input data can not be decoded.
      */
     static int getDataLength(const XMLCh* const inputData );
@@ -170,7 +172,7 @@ private :
     //
     //  quadsPerLine
     //     Number of quadruplets per one line. The encoded output
-    //     stream must be represented in lines of no more 
+    //     stream must be represented in lines of no more
     //     than 19 quadruplets each.
     //
     // -----------------------------------------------------------------------
@@ -187,7 +189,7 @@ private :
 // -----------------------------------------------------------------------
 //  Helper methods
 // -----------------------------------------------------------------------
-inline bool Base64::isPad(const XMLByte& octet) 
+inline bool Base64::isPad(const XMLByte& octet)
 {
     return ( octet == base64Padding );
 }
@@ -213,13 +215,15 @@ inline void Base64::split1stOctet(const XMLByte& ch, XMLByte& b1, XMLByte& b2) {
 }
 
 inline void Base64::split2ndOctet(const XMLByte& ch, XMLByte& b2, XMLByte& b3) {
-    b2 |= ch >> 4;  // combine with previous value  
+    b2 |= ch >> 4;  // combine with previous value
     b3 = ( ch & 0xf ) << 2;
 }
 
 inline void Base64::split3rdOctet(const XMLByte& ch, XMLByte& b3, XMLByte& b4) {
-    b3 |= ch >> 6;  // combine with previous value 
+    b3 |= ch >> 6;  // combine with previous value
     b4 = ( ch & 0x3f );
 }
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/BinFileInputStream.cpp b/src/xercesc/util/BinFileInputStream.cpp
index e98d8a0c8f4c7b2b19ce4d6ff7a49b41284bd14b..225a9e2d876946181c412abdc8e63d82f02f893d 100644
--- a/src/xercesc/util/BinFileInputStream.cpp
+++ b/src/xercesc/util/BinFileInputStream.cpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:09  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:03  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:09  peiyongz
+ * sane_include
  *
  * Revision 1.3  2000/03/02 19:54:38  roddey
  * This checkin includes many changes done while waiting for the
@@ -91,6 +94,7 @@
 #include <xercesc/util/XMLExceptMsgs.hpp>
 #include <xercesc/util/XMLString.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  BinFileInputStream: Constructors and Destructor
@@ -164,3 +168,5 @@ BinFileInputStream::readBytes(          XMLByte* const  toFill
     //
     return XMLPlatformUtils::readFileBuffer(fSource, maxToRead, toFill);
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/BinFileInputStream.hpp b/src/xercesc/util/BinFileInputStream.hpp
index cd29ba3b3895cb83f7560efade38d5386af13d1e..6f80bf471926958466e9bf1b55cb600e48b1fc30 100644
--- a/src/xercesc/util/BinFileInputStream.hpp
+++ b/src/xercesc/util/BinFileInputStream.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:09  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:03  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:09  peiyongz
+ * sane_include
  *
  * Revision 1.3  2000/02/24 20:05:23  abagchi
  * Swat for removing Log from API docs
@@ -78,6 +81,7 @@
 
 #include <xercesc/util/BinInputStream.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 class XMLUTIL_EXPORT BinFileInputStream : public BinInputStream
 {
@@ -143,4 +147,6 @@ inline bool BinFileInputStream::getIsOpen() const
     return (fSource != 0);
 }
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/BinInputStream.cpp b/src/xercesc/util/BinInputStream.cpp
index a444b7500e3e990993231d9c0e0dfe6b1223312d..8a715c887df1e6e8f649fbc334599006f7e76e6e 100644
--- a/src/xercesc/util/BinInputStream.cpp
+++ b/src/xercesc/util/BinInputStream.cpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:10  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:03  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:10  peiyongz
+ * sane_include
  *
  * Revision 1.3  2000/03/02 19:54:38  roddey
  * This checkin includes many changes done while waiting for the
@@ -81,6 +84,7 @@
 // ---------------------------------------------------------------------------
 #include <xercesc/util/BinInputStream.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  BinInputStream: Virtual destructor!
@@ -96,3 +100,5 @@ BinInputStream::~BinInputStream()
 BinInputStream::BinInputStream()
 {
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/BinInputStream.hpp b/src/xercesc/util/BinInputStream.hpp
index 377400312ebc7e713bc1f4a938f7b23a60e56071..3c5f500bb05620ea98e13e8e772bd994a42b5ba2 100644
--- a/src/xercesc/util/BinInputStream.hpp
+++ b/src/xercesc/util/BinInputStream.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:10  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:03  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:10  peiyongz
+ * sane_include
  *
  * Revision 1.4  2000/03/02 19:54:38  roddey
  * This checkin includes many changes done while waiting for the
@@ -83,6 +86,8 @@
 
 #include <xercesc/util/XercesDefs.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 class XMLUTIL_EXPORT BinInputStream
 {
 public :
@@ -119,4 +124,6 @@ private :
     void operator=(const BinInputStream&);
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/BinMemInputStream.cpp b/src/xercesc/util/BinMemInputStream.cpp
index c812b08e0a295180ea63488a96e39cdbc9398034..de561ab12f393b69df16c3647f4e371bc95d88f7 100644
--- a/src/xercesc/util/BinMemInputStream.cpp
+++ b/src/xercesc/util/BinMemInputStream.cpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:10  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:03  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:10  peiyongz
+ * sane_include
  *
  * Revision 1.5  2001/11/28 19:05:29  knoaman
  * Bug 4442: fix by mlovett@uk.ibm.com
@@ -88,6 +91,7 @@
 #include <xercesc/util/BinMemInputStream.hpp>
 #include <string.h>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  BinMemInputStream: Constructors and Destructor
@@ -145,3 +149,5 @@ unsigned int BinMemInputStream::readBytes(          XMLByte* const  toFill
     fCurIndex += actualToRead;
     return actualToRead;
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/BinMemInputStream.hpp b/src/xercesc/util/BinMemInputStream.hpp
index 50b8afea249c26fbe23ac4e261c84f142717cd92..a728cae6e2f9b99f0d2f5b2d54bd79c7e071d349 100644
--- a/src/xercesc/util/BinMemInputStream.hpp
+++ b/src/xercesc/util/BinMemInputStream.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:10  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:03  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:10  peiyongz
+ * sane_include
  *
  * Revision 1.3  2000/02/24 20:05:24  abagchi
  * Swat for removing Log from API docs
@@ -78,6 +81,7 @@
 
 #include <xercesc/util/BinInputStream.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 class XMLUTIL_EXPORT BinMemInputStream : public BinInputStream
 {
@@ -165,4 +169,6 @@ inline unsigned int BinMemInputStream::curPos() const
     return fCurIndex;
 }
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/BitOps.hpp b/src/xercesc/util/BitOps.hpp
index db432af73f480c7bb32ca4210e84a4f997677250..bfbe4d0b8ea4846e9c131f03bba436d8c866f2a5 100644
--- a/src/xercesc/util/BitOps.hpp
+++ b/src/xercesc/util/BitOps.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:10  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:03  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:10  peiyongz
+ * sane_include
  *
  * Revision 1.7  2000/09/06 00:24:15  andyh
  * Clean up misc compiler warnings
@@ -92,6 +95,7 @@
 
 #include <xercesc/util/XercesDefs.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 class XMLUTIL_EXPORT BitOps
 {
@@ -101,7 +105,7 @@ public:
     // -----------------------------------------------------------------------
     static inline XMLCh swapBytes(const XMLUInt16 toSwap)
     {
-        //The mask is required to overcome a compiler error on solaris 
+        //The mask is required to overcome a compiler error on solaris
         return XMLCh(((toSwap >> 8) | (toSwap << 8)) & 0xFFFF);
     }
 
@@ -129,4 +133,6 @@ protected :
     void operator=(const BitOps);
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/BitSet.cpp b/src/xercesc/util/BitSet.cpp
index 2e6c739399a7c6e6e98eddfde719a209a8ebe5b0..d117ea9beb12aa8ef3a80c754521fb4360fb52be 100644
--- a/src/xercesc/util/BitSet.cpp
+++ b/src/xercesc/util/BitSet.cpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:10  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:03  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:10  peiyongz
+ * sane_include
  *
  * Revision 1.4  2000/03/02 19:54:38  roddey
  * This checkin includes many changes done while waiting for the
@@ -86,6 +89,7 @@
 #include <xercesc/util/ArrayIndexOutOfBoundsException.hpp>
 #include <xercesc/util/BitSet.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  Local const data
@@ -316,3 +320,5 @@ void BitSet::ensureCapacity(const unsigned int size)
         fUnitLen = unitsNeeded;
     }
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/BitSet.hpp b/src/xercesc/util/BitSet.hpp
index 79213fdc192c4232b6683cf6baa7e0ac3c3fead4..b5a309e8f68cb07879231f253d366885692d4af5 100644
--- a/src/xercesc/util/BitSet.hpp
+++ b/src/xercesc/util/BitSet.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:10  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:03  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:10  peiyongz
+ * sane_include
  *
  * Revision 1.4  2000/03/02 19:54:38  roddey
  * This checkin includes many changes done while waiting for the
@@ -83,6 +86,8 @@
 
 #include <xercesc/util/XercesDefs.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 class XMLUTIL_EXPORT BitSet
 {
 public:
@@ -157,4 +162,6 @@ private :
     unsigned int    fUnitLen;
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/CountedPointer.c b/src/xercesc/util/CountedPointer.c
index 8e4e854f619e4d5dc59a04ecd87ee1c1bb750a12..58be17071c15ffbe879b915574aeeaeece96252b 100644
--- a/src/xercesc/util/CountedPointer.c
+++ b/src/xercesc/util/CountedPointer.c
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /**
  * $Log$
- * Revision 1.1  2002/02/01 22:22:10  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:03  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:10  peiyongz
+ * sane_include
  *
  * Revision 1.3  2000/03/02 19:54:38  roddey
  * This checkin includes many changes done while waiting for the
@@ -83,7 +86,7 @@
 #include <xercesc/util/CountedPointer.hpp>
 #endif
 
-
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  CountedPointerTo: Constructors and Destructor
@@ -159,3 +162,5 @@ template <class T> T& CountedPointerTo<T>::operator*()
         ThrowXML(NullPointerException, XMLExcepts::CPtr_PointerIsZero);
     return *fPtr;
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/CountedPointer.hpp b/src/xercesc/util/CountedPointer.hpp
index e484b46643aa3a382fcb4d9599d882a1fe840902..27646d082e219486ba33c0bc80b2a419c25ada3a 100644
--- a/src/xercesc/util/CountedPointer.hpp
+++ b/src/xercesc/util/CountedPointer.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:10  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:03  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:10  peiyongz
+ * sane_include
  *
  * Revision 1.4  2000/03/02 19:54:39  roddey
  * This checkin includes many changes done while waiting for the
@@ -85,6 +88,7 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/NullPointerException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 template <class T> class CountedPointerTo
 {
@@ -120,6 +124,7 @@ private:
     T*  fPtr;
 };
 
+XERCES_CPP_NAMESPACE_END
 
 #if !defined(XERCES_TMPLSINC)
 #include <xercesc/util/CountedPointer.c>
diff --git a/src/xercesc/util/EmptyStackException.hpp b/src/xercesc/util/EmptyStackException.hpp
index 0aacf62386545e90c6c02583b4c6b53641851732..711415adb3c2ef2e14cce22497cdb9a0b872cd46 100644
--- a/src/xercesc/util/EmptyStackException.hpp
+++ b/src/xercesc/util/EmptyStackException.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -64,6 +64,10 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/XMLException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 MakeXMLException(EmptyStackException, XMLUTIL_EXPORT)
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/EncodingValidator.cpp b/src/xercesc/util/EncodingValidator.cpp
index 6b9e52617c922703e9b0c7d84f112d7fc5960749..0f2208610b6d028ee1a2fdcbc6163bfd7e5f06e3 100644
--- a/src/xercesc/util/EncodingValidator.cpp
+++ b/src/xercesc/util/EncodingValidator.cpp
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.2  2002/11/04 15:22:03  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.1  2002/07/18 20:08:16  knoaman
  * Initial checkin: feature to control strict IANA encoding name.
  *
@@ -69,6 +72,8 @@
 #include <xercesc/util/PlatformUtils.hpp>
 #include <xercesc/util/XMLRegisterCleanup.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 // ---------------------------------------------------------------------------
 //  Static member data initialization
 // ---------------------------------------------------------------------------
@@ -147,6 +152,8 @@ void EncodingValidator::reinitInstance() {
 	fInstance = 0;
 }
 
+XERCES_CPP_NAMESPACE_END
+
 /**
   * End of file EncodingValidator.cpp
   */
diff --git a/src/xercesc/util/EncodingValidator.hpp b/src/xercesc/util/EncodingValidator.hpp
index aef4e4db91d23d885e757d8ac2fcb9273a2fa8d2..475aa1e41cb96d00134696b8c57a9950f5aafa45 100644
--- a/src/xercesc/util/EncodingValidator.hpp
+++ b/src/xercesc/util/EncodingValidator.hpp
@@ -66,6 +66,7 @@
 // ---------------------------------------------------------------------------
 #include <xercesc/util/ValueHashTableOf.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 /**
   * A singleton class that checks whether an encoding name is a valid IANA
@@ -122,6 +123,7 @@ private:
     static EncodingValidator* fInstance;
 };
 
+XERCES_CPP_NAMESPACE_END
 
 #endif
 
diff --git a/src/xercesc/util/FlagJanitor.c b/src/xercesc/util/FlagJanitor.c
index 9f2eaf30b6c217319ee8611a301151f3ee957e5a..7c4391a3c02f64e50001440ac2f9efe39195618b 100644
--- a/src/xercesc/util/FlagJanitor.c
+++ b/src/xercesc/util/FlagJanitor.c
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /**
  * $Log$
- * Revision 1.1  2002/02/01 22:22:10  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:03  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:10  peiyongz
+ * sane_include
  *
  * Revision 1.3  2000/03/02 19:54:39  roddey
  * This checkin includes many changes done while waiting for the
@@ -83,6 +86,7 @@
 #include <xercesc/util/FlagJanitor.hpp>
 #endif
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  Constructors and Destructor
@@ -113,3 +117,5 @@ template <class T> void FlagJanitor<T>::release()
 {
     fValPtr = 0;
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/FlagJanitor.hpp b/src/xercesc/util/FlagJanitor.hpp
index 5e2727594c54714f8beee8b0f1fa02c74eff5e1a..c58e8937e2bc3427def554fac1e2d220ee7da900 100644
--- a/src/xercesc/util/FlagJanitor.hpp
+++ b/src/xercesc/util/FlagJanitor.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:10  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:03  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:10  peiyongz
+ * sane_include
  *
  * Revision 1.4  2000/03/02 19:54:39  roddey
  * This checkin includes many changes done while waiting for the
@@ -84,7 +87,7 @@
 
 #include <xercesc/util/XercesDefs.hpp>
 
-
+XERCES_CPP_NAMESPACE_BEGIN
 
 template <class T> class FlagJanitor
 {
@@ -124,6 +127,7 @@ private :
     T*  fValPtr;
 };
 
+XERCES_CPP_NAMESPACE_END
 
 #if !defined(XERCES_TMPLSINC)
 #include <xercesc/util/FlagJanitor.c>
diff --git a/src/xercesc/util/HashBase.hpp b/src/xercesc/util/HashBase.hpp
index 46e89525b004ab0cc3c4a1c08184a7c80736e62a..7a4355cb1f55edc10ec8374e50dcc65cbd9113cd 100644
--- a/src/xercesc/util/HashBase.hpp
+++ b/src/xercesc/util/HashBase.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -59,6 +59,8 @@
 
 #include <xercesc/util/XercesDefs.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 /**
  * The <code>HashBase</code> interface is the general outline of a hasher.
  * Hashers are used in <code>RefHashTableOf</code> hashtables to hash any
@@ -91,4 +93,6 @@ public:
 
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/HashCMStateSet.hpp b/src/xercesc/util/HashCMStateSet.hpp
index d55950a86b76fd1d5b87013c3023a8be64d92af3..ea73ddcef059e86271ca3dc24310e7d52d27f9f3 100644
--- a/src/xercesc/util/HashCMStateSet.hpp
+++ b/src/xercesc/util/HashCMStateSet.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 2001 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -57,8 +57,11 @@
 /*
  * $Id$
  * $Log$
- * Revision 1.1  2002/02/01 22:22:10  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:03  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:10  peiyongz
+ * sane_include
  *
  * Revision 1.2  2001/11/22 20:23:00  peiyongz
  * _declspec(dllimport) and inline warning C4273
@@ -74,10 +77,12 @@
 #include <xercesc/util/HashBase.hpp>
 #include <xercesc/validators/common/CMStateSet.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 /**
  * The <code>HashCMStateSet</code> class inherits from <code>HashBase</code>.
  * This is a CMStateSet specific hasher class designed to hash the values
- * of CMStateSet.  
+ * of CMStateSet.
  *
  * See <code>HashBase</code> for more information.
  */
@@ -114,4 +119,6 @@ inline bool HashCMStateSet::equals(const void *const key1, const void *const key
 	return (*pkey1==*pkey2);
 }
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/HashPtr.cpp b/src/xercesc/util/HashPtr.cpp
index f976e8bc57bce6d034cfaffd1acdf0f7f91fefff..f0b27f4aa5116af56f7c3d38405ada56e0bfeccc 100644
--- a/src/xercesc/util/HashPtr.cpp
+++ b/src/xercesc/util/HashPtr.cpp
@@ -57,6 +57,8 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include "HashPtr.hpp"
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 HashPtr::HashPtr()
 {
 }
@@ -74,3 +76,5 @@ bool HashPtr::equals(const void *const key1, const void *const key2)
 {
 	return (key1 == key2);
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/HashPtr.hpp b/src/xercesc/util/HashPtr.hpp
index 026ffb1ce6c8ec6828432f08461fdb41a0852a28..7b7cece94e50c95e3501b3bee27e83a860c1229b 100644
--- a/src/xercesc/util/HashPtr.hpp
+++ b/src/xercesc/util/HashPtr.hpp
@@ -60,6 +60,8 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/HashBase.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 /**
  * The <code>HashPtr</code> class inherits from <code>HashBase</code>.
  * This is a generic hasher class designed to hash the pointers of the
@@ -78,4 +80,6 @@ public:
 
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/HashXMLCh.cpp b/src/xercesc/util/HashXMLCh.cpp
index 19ea2fb2c998f106a2deda6876b45d5dde513142..d7002b95dee2b216f316a4860f91335a0c05714f 100644
--- a/src/xercesc/util/HashXMLCh.cpp
+++ b/src/xercesc/util/HashXMLCh.cpp
@@ -57,6 +57,8 @@
 #include "HashXMLCh.hpp"
 #include <xercesc/util/XMLString.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 HashXMLCh::HashXMLCh()
 {
 }
@@ -74,3 +76,5 @@ bool HashXMLCh::equals(const void *const key1, const void *const key2)
 {
 	return (XMLString::equals((XMLCh*)key1, (XMLCh*)key2)) ? true : false;
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/HashXMLCh.hpp b/src/xercesc/util/HashXMLCh.hpp
index 9c43920144cbe7da394bf03c7b8565aec28bc887..66801ccfcf694af0cad47e610b1644a4160cf0e1 100644
--- a/src/xercesc/util/HashXMLCh.hpp
+++ b/src/xercesc/util/HashXMLCh.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -60,11 +60,13 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/HashBase.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 /**
  * The <code>HashXMLCh</code> class inherits from <code>HashBase</code>.
  * This is a XMLCh* string specific hasher class designed to hash the values
  * of XMLCh* strings with a given modulo.  References the XMLString hash
- * function.  
+ * function.
  * See <code>HashBase</code> for more information.
  */
 
@@ -78,4 +80,6 @@ public:
 
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/HeaderDummy.cpp b/src/xercesc/util/HeaderDummy.cpp
index 23183f1ffbe7a6689592b46d5f25e81b1a96892d..c9302a9780793bd84cc83dbd03e6bdc95903852e 100644
--- a/src/xercesc/util/HeaderDummy.cpp
+++ b/src/xercesc/util/HeaderDummy.cpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:10  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:03  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:10  peiyongz
+ * sane_include
  *
  * Revision 1.4  2000/03/02 19:54:40  roddey
  * This checkin includes many changes done while waiting for the
@@ -95,3 +98,6 @@
 #include <xercesc/util/UnexpectedEOFException.hpp>
 #include <xercesc/util/UnsupportedEncodingException.hpp>
 #include <xercesc/util/UTFDataFormatException.hpp>
+
+XERCES_CPP_NAMESPACE_BEGIN
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/HexBin.cpp b/src/xercesc/util/HexBin.cpp
index 0640f2410b5655c06935966bb4ec14253a79e78f..99f435fe4666884aa234027abd499500b991bfe3 100644
--- a/src/xercesc/util/HexBin.cpp
+++ b/src/xercesc/util/HexBin.cpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 2001 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 2001, International
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.3  2002/11/04 15:22:03  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.2  2002/04/18 14:55:38  peiyongz
  * Bug#7301: Redundant range-check in HexBin.cpp, patch from Martin Kalen
  *
@@ -74,15 +77,17 @@
 #include <xercesc/util/XMLUniDefs.hpp>
 #include <xercesc/util/XMLString.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 // ---------------------------------------------------------------------------
 //  constants
 // ---------------------------------------------------------------------------
-static const int BASELENGTH = 255;       
+static const int BASELENGTH = 255;
 
 // ---------------------------------------------------------------------------
 //  class data member
 // ---------------------------------------------------------------------------
-bool HexBin::hexNumberTable[BASELENGTH]; 
+bool HexBin::hexNumberTable[BASELENGTH];
 bool HexBin::isInitialized = false;
 
 int HexBin::getDataLength(const XMLCh* const hexData)
@@ -106,7 +111,7 @@ bool HexBin::isArrayByteHex(const XMLCh* const hexData)
         return false;
 
     for ( int i = 0; i < strLen; i++ )
-        if( !isHex(hexData[i]) ) 
+        if( !isHex(hexData[i]) )
             return false;
 
     return true;
@@ -115,7 +120,7 @@ bool HexBin::isArrayByteHex(const XMLCh* const hexData)
 // -----------------------------------------------------------------------
 //  Helper methods
 // -----------------------------------------------------------------------
-bool HexBin::isHex(const XMLCh& octet) 
+bool HexBin::isHex(const XMLCh& octet)
 {
     // sanity check to avoid out-of-bound index
     if ( octet >= BASELENGTH )
@@ -130,17 +135,19 @@ void HexBin::init()
         return;
 
     int i;
-    for ( i = 0; i < BASELENGTH; i++ ) 
-        hexNumberTable[i] = false; 
+    for ( i = 0; i < BASELENGTH; i++ )
+        hexNumberTable[i] = false;
 
     for ( i = chDigit_9; i >= chDigit_0; i-- )
         hexNumberTable[i] = true;
 
-    for ( i = chLatin_F; i >= chLatin_A; i-- ) 
+    for ( i = chLatin_F; i >= chLatin_A; i-- )
         hexNumberTable[i] = true;
 
-    for ( i = chLatin_f; i >= chLatin_a; i-- ) 
+    for ( i = chLatin_f; i >= chLatin_a; i-- )
         hexNumberTable[i] = true;
 
     isInitialized = true;
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/HexBin.hpp b/src/xercesc/util/HexBin.hpp
index d28f15c4351c335de9fdff50a3c3e845e12abc77..4d1db90cab599b6f27c7dd55653432ec55a4178c 100644
--- a/src/xercesc/util/HexBin.hpp
+++ b/src/xercesc/util/HexBin.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 2001 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 2001, International
@@ -63,6 +63,8 @@
 
 #include <xercesc/util/XercesDefs.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 class XMLUTIL_EXPORT HexBin
 {
 public :
@@ -121,7 +123,9 @@ private :
     //
     // -----------------------------------------------------------------------
     static bool       isInitialized;
-    static bool       hexNumberTable[]; 
+    static bool       hexNumberTable[];
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/IOException.hpp b/src/xercesc/util/IOException.hpp
index fc638655afe61db9e635c810f6a8521dbe9e95e0..974693c0c70d5d56ef6ecb33df01b7b0dfe364e7 100644
--- a/src/xercesc/util/IOException.hpp
+++ b/src/xercesc/util/IOException.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -65,7 +65,10 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/XMLException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 MakeXMLException(IOException, XMLUTIL_EXPORT)
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/IllegalArgumentException.hpp b/src/xercesc/util/IllegalArgumentException.hpp
index bac4a3b2fcf24172f5c819b70c9c01a8b843202d..950a37d8c623e7f2802bafbb9c3621f871ca1c56 100644
--- a/src/xercesc/util/IllegalArgumentException.hpp
+++ b/src/xercesc/util/IllegalArgumentException.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -65,7 +65,10 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/XMLException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 MakeXMLException(IllegalArgumentException, XMLUTIL_EXPORT)
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/InvalidCastException.hpp b/src/xercesc/util/InvalidCastException.hpp
index d797665ece06ca0c8ccf5c18413cabdcf8b645b4..cfd9c5a76525f45cff41f27e26e86749de3969d9 100644
--- a/src/xercesc/util/InvalidCastException.hpp
+++ b/src/xercesc/util/InvalidCastException.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -65,6 +65,10 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/XMLException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 MakeXMLException(InvalidCastException, XMLUTIL_EXPORT)
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/Janitor.c b/src/xercesc/util/Janitor.c
index 555817aa5be39667f7cac095ceceefb08db8b7e9..1868fee6bb16b9f0cdb7069f0012e345ee0a8138 100644
--- a/src/xercesc/util/Janitor.c
+++ b/src/xercesc/util/Janitor.c
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /**
  * $Log$
- * Revision 1.1  2002/02/01 22:22:10  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:10  peiyongz
+ * sane_include
  *
  * Revision 1.6  2000/10/13 22:45:11  andyh
  * Complete removal of ArrayJanitory::operator->().  Was just commented out earlier.
@@ -93,7 +96,7 @@
 #include <xercesc/util/Janitor.hpp>
 #endif
 
-
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  Janitor: Constructors and Destructor
@@ -214,4 +217,5 @@ ArrayJanitor<T>::reset(T* p)
 	fData = p;
 }
 
+XERCES_CPP_NAMESPACE_END
 
diff --git a/src/xercesc/util/Janitor.hpp b/src/xercesc/util/Janitor.hpp
index 8f0c1dbf0da1f60112090f0cf05b6d3c68a31ea5..b570207bbf76d30f2788d8a7cdb963254c813d7e 100644
--- a/src/xercesc/util/Janitor.hpp
+++ b/src/xercesc/util/Janitor.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:10  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:10  peiyongz
+ * sane_include
  *
  * Revision 1.7  2000/10/13 22:45:12  andyh
  * Complete removal of ArrayJanitory::operator->().  Was just commented out earlier.
@@ -94,6 +97,7 @@
 
 #include <xercesc/util/XercesDefs.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 template <class T> class Janitor
 {
@@ -173,6 +177,7 @@ private :
     T*  fData;
 };
 
+XERCES_CPP_NAMESPACE_END
 
 #if !defined(XERCES_TMPLSINC)
 #include <xercesc/util/Janitor.c>
diff --git a/src/xercesc/util/KVStringPair.cpp b/src/xercesc/util/KVStringPair.cpp
index 0ae75552521dc37ef5de4a9e33bfc7d49ac622e6..5ecc893aca11644f8ee385a8dce79ebec9afbfd6 100644
--- a/src/xercesc/util/KVStringPair.cpp
+++ b/src/xercesc/util/KVStringPair.cpp
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:10  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:10  peiyongz
+ * sane_include
  *
  * Revision 1.5  2001/05/11 13:26:27  tng
  * Copyright update.
@@ -114,6 +117,7 @@
 #include <xercesc/util/KVStringPair.hpp>
 #include <xercesc/util/XMLString.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  KVStringPair: Constructors and Destructor
@@ -215,3 +219,5 @@ void KVStringPair::set(  const   XMLCh* const    newKey
     setKey(newKey);
     setValue(newValue);
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/KVStringPair.hpp b/src/xercesc/util/KVStringPair.hpp
index 7e3b4bdc1ee8ab5466627f67bae45e92f675dcd9..8f3497c9f21d49bc6926d8dec68ed39f3d66d57c 100644
--- a/src/xercesc/util/KVStringPair.hpp
+++ b/src/xercesc/util/KVStringPair.hpp
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:11  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:11  peiyongz
+ * sane_include
  *
  * Revision 1.6  2001/05/11 13:26:27  tng
  * Copyright update.
@@ -115,6 +118,7 @@
 
 #include <xercesc/util/XercesDefs.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 //
 //  This class provides a commonly used data structure, which is that of
@@ -179,4 +183,6 @@ private :
     unsigned long  fValueAllocSize;
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/KeyRefPair.c b/src/xercesc/util/KeyRefPair.c
index fc08b7bb915fe2546f2a63b10d22602c2b9e1b0c..d646d959fb552871d30b9e1179471ad6101cd2d2 100644
--- a/src/xercesc/util/KeyRefPair.c
+++ b/src/xercesc/util/KeyRefPair.c
@@ -66,7 +66,7 @@
 #include <xercesc/util/KeyRefPair.hpp>
 #endif
 
-
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  KeyRefPair: Constructors and Destructor
@@ -139,3 +139,5 @@ KeyRefPair<TKey,TValue>::setValue(TValue* newValue)
     fValue = newValue;
     return fValue;
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/KeyRefPair.hpp b/src/xercesc/util/KeyRefPair.hpp
index f6922d4655e6660a8bde3a52096550c62bcabfc6..e5268078220918d865f495bc4715044ac329e385 100644
--- a/src/xercesc/util/KeyRefPair.hpp
+++ b/src/xercesc/util/KeyRefPair.hpp
@@ -64,6 +64,7 @@
 
 #include <xercesc/util/XercesDefs.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 template <class TKey, class TValue> class KeyRefPair
 {
@@ -107,6 +108,7 @@ template <class TKey, class TValue> class KeyRefPair
         TValue*  fValue;
 };
 
+XERCES_CPP_NAMESPACE_END
 
 #if !defined(XERCES_TMPLSINC)
 #include <xercesc/util/KeyRefPair.c>
diff --git a/src/xercesc/util/KeyValuePair.c b/src/xercesc/util/KeyValuePair.c
index 1a507f7abcb38b5515011d39ef9d70279fd4f17d..4fcb27f538f7aab6b7e7216feedadfb94df3a49d 100644
--- a/src/xercesc/util/KeyValuePair.c
+++ b/src/xercesc/util/KeyValuePair.c
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /**
  * $Log$
- * Revision 1.1  2002/02/01 22:22:10  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:10  peiyongz
+ * sane_include
  *
  * Revision 1.3  2000/03/02 19:54:41  roddey
  * This checkin includes many changes done while waiting for the
@@ -83,7 +86,7 @@
 #include <xercesc/util/KeyValuePair.hpp>
 #endif
 
-
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  KeyValuePair: Constructors and Destructor
@@ -156,3 +159,5 @@ KeyValuePair<TKey,TValue>::setValue(const TValue& newValue)
     fValue = newValue;
     return fValue;
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/KeyValuePair.hpp b/src/xercesc/util/KeyValuePair.hpp
index 82f3af7b05e11ed7ef6b1500b6ae517f36025170..4e25da51c026fc4992914f698730025394378acd 100644
--- a/src/xercesc/util/KeyValuePair.hpp
+++ b/src/xercesc/util/KeyValuePair.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:10  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:10  peiyongz
+ * sane_include
  *
  * Revision 1.4  2000/03/02 19:54:41  roddey
  * This checkin includes many changes done while waiting for the
@@ -84,6 +87,7 @@
 
 #include <xercesc/util/XercesDefs.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 template <class TKey, class TValue> class KeyValuePair
 {
@@ -127,6 +131,7 @@ template <class TKey, class TValue> class KeyValuePair
         TValue  fValue;
 };
 
+XERCES_CPP_NAMESPACE_END
 
 #if !defined(XERCES_TMPLSINC)
 #include <xercesc/util/KeyValuePair.c>
diff --git a/src/xercesc/util/Mutexes.cpp b/src/xercesc/util/Mutexes.cpp
index 67694715268bf4a8f3df6d8d046b086363af3391..18eb434b06210515d2c576ce2278b3a25d75a556 100644
--- a/src/xercesc/util/Mutexes.cpp
+++ b/src/xercesc/util/Mutexes.cpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:11  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:11  peiyongz
+ * sane_include
  *
  * Revision 1.4  2000/03/02 19:54:41  roddey
  * This checkin includes many changes done while waiting for the
@@ -88,7 +91,7 @@
 #include <xercesc/util/PlatformUtils.hpp>
 #include <xercesc/util/Mutexes.hpp>
 
-
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  XMLMutex: Constructors and Destructor
@@ -142,3 +145,5 @@ XMLMutexLock::~XMLMutexLock()
 {
     fToLock->unlock();
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/Mutexes.hpp b/src/xercesc/util/Mutexes.hpp
index 57aeea8577882bf672c75ecd9e2c6835a3bb3b8d..b39efd89459d269e9de0e09cf2eee42e54b7dc99 100644
--- a/src/xercesc/util/Mutexes.hpp
+++ b/src/xercesc/util/Mutexes.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:11  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:11  peiyongz
+ * sane_include
  *
  * Revision 1.4  2000/03/02 19:54:42  roddey
  * This checkin includes many changes done while waiting for the
@@ -84,6 +87,8 @@
 
 #include <xercesc/util/XercesDefs.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 class XMLUTIL_EXPORT XMLMutex
 {
 public :
@@ -119,7 +124,7 @@ private :
     //      platform utilities methods which knows what's really in it.
     // -----------------------------------------------------------------------
     void*   fHandle;
-    
+
 
     // -----------------------------------------------------------------------
     //  Sun PlatformUtils needs acess to fHandle to initialize the
@@ -157,4 +162,6 @@ private :
     XMLMutex*   fToLock;
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/NameIdPool.c b/src/xercesc/util/NameIdPool.c
index 76aa15fb0a3f157fb541889c2fafe32ead1e3b1f..e4230dd1c85c036d987700479ce7d001b964c7f8 100644
--- a/src/xercesc/util/NameIdPool.c
+++ b/src/xercesc/util/NameIdPool.c
@@ -56,6 +56,9 @@
 
 /**
  * $Log$
+ * Revision 1.4  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.3  2002/09/24 19:51:24  tng
  * Performance: use XMLString::equals instead of XMLString::compareString
  *
@@ -93,7 +96,7 @@
 #include <xercesc/util/NoSuchElementException.hpp>
 #include <xercesc/util/RuntimeException.hpp>
 
-
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  NameIdPoolBucketElem: Constructors and Destructor
@@ -420,3 +423,5 @@ template <class TElem> void NameIdPoolEnumerator<TElem>::Reset()
 {
     fCurIndex = 0;
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/NameIdPool.hpp b/src/xercesc/util/NameIdPool.hpp
index b2085dcd6349edfe6f29d5b761b00ecde0af60f8..619012dbc8f5354819e3a37a3ceac4d797036276 100644
--- a/src/xercesc/util/NameIdPool.hpp
+++ b/src/xercesc/util/NameIdPool.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:11  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:11  peiyongz
+ * sane_include
  *
  * Revision 1.6  2000/09/09 00:11:48  andyh
  * Virtual Destructor Patch, submitted by Kirk Wylie
@@ -93,6 +96,7 @@
 #include <xercesc/util/XMLEnumerator.hpp>
 #include <xercesc/util/XMLString.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 //
 //  Forward declare the enumerator so he can be our friend. Can you say
@@ -115,7 +119,7 @@ template <class TElem> class NameIdPoolEnumerator;
 //  This provides very fast access by id.
 //
 //  The way these pools are used, elements are never removed except when the
-//  whole thing is flushed. This makes it very easy to maintain the two 
+//  whole thing is flushed. This makes it very easy to maintain the two
 //  access methods in sync.
 //
 //  For efficiency reasons, the id refererence array is never flushed until
@@ -284,7 +288,7 @@ public :
     void Reset();
 
 
-private :    
+private :
     // -----------------------------------------------------------------------
     //  Data Members
     //
@@ -299,6 +303,7 @@ private :
     NameIdPool<TElem>*  fToEnum;
 };
 
+XERCES_CPP_NAMESPACE_END
 
 #if !defined(XERCES_TMPLSINC)
 #include <xercesc/util/NameIdPool.c>
diff --git a/src/xercesc/util/NoDefTranscoderException.hpp b/src/xercesc/util/NoDefTranscoderException.hpp
index 81d677c1a9504d4d2e0644dd1993f012e5dd4cfc..e8e96daf50425848d4aae3ad064921f7da2191b3 100644
--- a/src/xercesc/util/NoDefTranscoderException.hpp
+++ b/src/xercesc/util/NoDefTranscoderException.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:11  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:11  peiyongz
+ * sane_include
  *
  * Revision 1.4  2000/03/02 19:54:43  roddey
  * This checkin includes many changes done while waiting for the
@@ -85,6 +88,7 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/XMLException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 class XMLUTIL_EXPORT NoDefTranscoderException : public XMLException
 {
@@ -142,4 +146,6 @@ public:
     }
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/NoSuchElementException.hpp b/src/xercesc/util/NoSuchElementException.hpp
index 9b52ee2bb2a6211f640f32a733b4e4fb1d8d43d2..8734bec3aada335805cc1595d8ff88664041ae4d 100644
--- a/src/xercesc/util/NoSuchElementException.hpp
+++ b/src/xercesc/util/NoSuchElementException.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -65,7 +65,10 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/XMLException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 MakeXMLException(NoSuchElementException, XMLUTIL_EXPORT)
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/NullPointerException.hpp b/src/xercesc/util/NullPointerException.hpp
index e502e415f570da4a1b8335280e790fe61fb52482..04794dff4ace792a879724c0f24ceb7071d2f234 100644
--- a/src/xercesc/util/NullPointerException.hpp
+++ b/src/xercesc/util/NullPointerException.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -65,6 +65,10 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/XMLException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 MakeXMLException(NullPointerException, XMLUTIL_EXPORT)
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/NumberFormatException.hpp b/src/xercesc/util/NumberFormatException.hpp
index e226cadc00a8623cc464345025a778d19dfa0b4b..69872171ac2e441f55382cd909bf760908940f74 100644
--- a/src/xercesc/util/NumberFormatException.hpp
+++ b/src/xercesc/util/NumberFormatException.hpp
@@ -65,7 +65,10 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/XMLException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 MakeXMLException(NumberFormatException, XMLUTIL_EXPORT)
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/ParseException.hpp b/src/xercesc/util/ParseException.hpp
index d3bc16eff8c69a21666d2a6807fd98a57fdccd5b..a9b62f29ac7bded2f118dc3dfe9830f276548015 100644
--- a/src/xercesc/util/ParseException.hpp
+++ b/src/xercesc/util/ParseException.hpp
@@ -65,7 +65,10 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/XMLException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 MakeXMLException(ParseException, XMLUTIL_EXPORT)
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/PlatformUtils.cpp b/src/xercesc/util/PlatformUtils.cpp
index c8e9e972df93af2389ad1a82e42066df536301bd..191ce81a2369101f2fef0468b0d2e162eba19fe0 100644
--- a/src/xercesc/util/PlatformUtils.cpp
+++ b/src/xercesc/util/PlatformUtils.cpp
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.3  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.2  2002/07/18 20:05:31  knoaman
  * Add a new feature to control strict IANA encoding name.
  *
@@ -145,6 +148,7 @@
 #include <xercesc/util/XMLRegisterCleanup.hpp>
 #include <limits.h>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  Local data members
@@ -160,7 +164,7 @@ static long                     gInitFlag = 0;
 //  Global data
 //
 //	gXMLCleanupList
-//		This is a list of cleanup functions to be called on 
+//		This is a list of cleanup functions to be called on
 //		XMLPlatformUtils::Terminate.  Their function is to reset static
 //		data in classes that use it.
 //
@@ -193,7 +197,7 @@ void XMLPlatformUtils::Initialize()
     //
     //  We got to prevent overflow from happening.
     //  no error or exception
-    //  
+    //
     if (gInitFlag == LONG_MAX)
         return;
 
@@ -267,7 +271,7 @@ void XMLPlatformUtils::Terminate()
     // otherwise we come to delete non-existing resources.
     //
     //  no error or exception
-    //  
+    //
     if (gInitFlag == 0)
         return;
 
@@ -383,3 +387,4 @@ bool XMLPlatformUtils::isStrictIANAEncoding() {
     return false;
 }
 
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/PlatformUtils.hpp b/src/xercesc/util/PlatformUtils.hpp
index a089aea770c10fb09ad6a0857d48e63cfe25e008..a18765a12400257f4ba38b809e63bf8dbd03f4c1 100644
--- a/src/xercesc/util/PlatformUtils.hpp
+++ b/src/xercesc/util/PlatformUtils.hpp
@@ -65,6 +65,8 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/XMLException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 class XMLMsgLoader;
 class XMLNetAccessor;
 class XMLTransService;
@@ -671,4 +673,6 @@ inline XMLDeleter::XMLDeleter()
 {
 }
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/QName.cpp b/src/xercesc/util/QName.cpp
index c0dee384ee8809c4827f251141442348591a0a97..1248fc13904c65534dc54bb0d6f0b6885e106aa4 100644
--- a/src/xercesc/util/QName.cpp
+++ b/src/xercesc/util/QName.cpp
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.6  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.5  2002/10/30 21:52:00  tng
  * [Bug 13641] compiler-generated copy-constructor for QName doesn't do the right thing.
  *
@@ -103,6 +106,8 @@
 #include <xercesc/util/QName.hpp>
 #include <xercesc/util/Janitor.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 // ---------------------------------------------------------------------------
 //  QName: Constructors and Destructor
 // ---------------------------------------------------------------------------
@@ -443,3 +448,4 @@ void QName::cleanUp()
     delete [] fRawName;
 }
 
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/QName.hpp b/src/xercesc/util/QName.hpp
index e8e065bd4ba2607cbb60a3bf3ebcc933a0392e97..69975c04730d21e452f46cf6571423fdcc5e8a65 100644
--- a/src/xercesc/util/QName.hpp
+++ b/src/xercesc/util/QName.hpp
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.5  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.4  2002/10/30 21:52:00  tng
  * [Bug 13641] compiler-generated copy-constructor for QName doesn't do the right thing.
  *
@@ -104,6 +107,8 @@
 #include <xercesc/util/XMLUniDefs.hpp>
 #include <xercesc/util/XMLUni.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 class XMLUTIL_EXPORT QName
 {
 public :
@@ -254,4 +259,7 @@ inline void QName::setURI(const unsigned int uriId)
 {
     fURIId = uriId;
 }
+
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/RefArrayOf.c b/src/xercesc/util/RefArrayOf.c
index 34f3b9ddb4af0b43b480d5974a27e92bd16a7d29..950e592290beec68afe8c6373417d65062fb48c0 100644
--- a/src/xercesc/util/RefArrayOf.c
+++ b/src/xercesc/util/RefArrayOf.c
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /**
  * $Log$
- * Revision 1.1  2002/02/01 22:22:11  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:11  peiyongz
+ * sane_include
  *
  * Revision 1.3  2000/03/02 19:54:44  roddey
  * This checkin includes many changes done while waiting for the
@@ -83,6 +86,7 @@
 #include <xercesc/util/RefArrayOf.hpp>
 #endif
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  RefArrayOf: Contructors and Destructor
@@ -310,3 +314,5 @@ template <class TElem> void RefArrayEnumerator<TElem>::Reset()
 {
     fCurIndex = 0;
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/RefArrayOf.hpp b/src/xercesc/util/RefArrayOf.hpp
index ec73972c38f08d6f253f86ec575dec34abf134fe..19120e6693a811b677775c09673b0a1d401b0cb7 100644
--- a/src/xercesc/util/RefArrayOf.hpp
+++ b/src/xercesc/util/RefArrayOf.hpp
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.3  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.2  2002/08/21 17:44:59  tng
  * [Bug 7087] compiler warnings when using gcc.
  *
@@ -90,6 +93,7 @@
 #include <xercesc/util/IllegalArgumentException.hpp>
 #include <xercesc/util/XMLEnumerator.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 template <class TElem> class RefArrayOf
 {
@@ -188,6 +192,7 @@ private :
     RefArrayOf<TElem>*  fToEnum;
 };
 
+XERCES_CPP_NAMESPACE_END
 
 #if !defined(XERCES_TMPLSINC)
 #include <xercesc/util/RefArrayOf.c>
diff --git a/src/xercesc/util/RefHash2KeysTableOf.c b/src/xercesc/util/RefHash2KeysTableOf.c
index 7b9877815edf0a811947944e6a0c88ae5851bee8..eb5e4d13729fddcdd4dda089475c828914732471 100644
--- a/src/xercesc/util/RefHash2KeysTableOf.c
+++ b/src/xercesc/util/RefHash2KeysTableOf.c
@@ -56,8 +56,11 @@
 
 /**
  * $Log$
- * Revision 1.1  2002/02/01 22:22:12  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:12  peiyongz
+ * sane_include
  *
  * Revision 1.5  2001/07/19 18:43:18  peiyongz
  * fix: detect null poiniter in enumerator's ctor.
@@ -86,6 +89,8 @@
 
 #include <xercesc/util/NullPointerException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 // ---------------------------------------------------------------------------
 //  RefHash2KeysTableOf: Constructors and Destructor
 // ---------------------------------------------------------------------------
@@ -352,8 +357,8 @@ template <class TVal> RefHash2KeysTableOfEnumerator<TVal>::
 RefHash2KeysTableOfEnumerator(RefHash2KeysTableOf<TVal>* const toEnum, const bool adopt)
 	: fAdopted(adopt), fCurElem(0), fCurHash((unsigned int)-1), fToEnum(toEnum)
 {
-    if (!toEnum)  
-        ThrowXML(NullPointerException, XMLExcepts::CPtr_PointerIsZero);        
+    if (!toEnum)
+        ThrowXML(NullPointerException, XMLExcepts::CPtr_PointerIsZero);
 
     //
     //  Find the next available bucket element in the hash table. If it
@@ -449,3 +454,5 @@ template <class TVal> void RefHash2KeysTableOfEnumerator<TVal>::findNext()
         fCurElem = fToEnum->fBucketList[fCurHash];
     }
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/RefHash2KeysTableOf.hpp b/src/xercesc/util/RefHash2KeysTableOf.hpp
index deafea5e60a20f61f883156ca0a4770d3b2bae53..4837fa4fed5869ecf1b41328114b6218f62cfbcf 100644
--- a/src/xercesc/util/RefHash2KeysTableOf.hpp
+++ b/src/xercesc/util/RefHash2KeysTableOf.hpp
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.3  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.2  2002/06/12 17:15:12  tng
  * Remove redundant include header file.
  *
@@ -97,6 +100,8 @@
 #include <xercesc/util/HashBase.hpp>
 #include <xercesc/util/HashXMLCh.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 // This hash table is similar to RefHashTableOf with an additional integer as key2
 
 //
@@ -261,6 +266,8 @@ private :
     RefHash2KeysTableOf<TVal>*                 fToEnum;
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #if !defined(XERCES_TMPLSINC)
 #include <xercesc/util/RefHash2KeysTableOf.c>
 #endif
diff --git a/src/xercesc/util/RefHash3KeysIdPool.c b/src/xercesc/util/RefHash3KeysIdPool.c
index 49101923d7ab238437e3619ab7c70aa12c6c0665..bb629a7816cc889963fff86249af67e3706925a9 100644
--- a/src/xercesc/util/RefHash3KeysIdPool.c
+++ b/src/xercesc/util/RefHash3KeysIdPool.c
@@ -56,8 +56,11 @@
 
 /**
  * $Log$
- * Revision 1.1  2002/02/01 22:22:12  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:12  peiyongz
+ * sane_include
  *
  * Revision 1.4  2001/07/19 18:43:18  peiyongz
  * fix: detect null poiniter in enumerator's ctor.
@@ -83,6 +86,8 @@
 
 #include <xercesc/util/NullPointerException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 // ---------------------------------------------------------------------------
 //  RefHash3KeysIdPool: Constructors and Destructor
 // ---------------------------------------------------------------------------
@@ -395,8 +400,8 @@ template <class TVal> RefHash3KeysIdPoolEnumerator<TVal>::
 RefHash3KeysIdPoolEnumerator(RefHash3KeysIdPool<TVal>* const toEnum, const bool adopt)
 	: fAdoptedElems(adopt), fCurIndex(0), fToEnum(toEnum)
 {
-    if (!toEnum)  
-        ThrowXML(NullPointerException, XMLExcepts::CPtr_PointerIsZero);        
+    if (!toEnum)
+        ThrowXML(NullPointerException, XMLExcepts::CPtr_PointerIsZero);
 
     //
     //  Find the next available bucket element in the pool. We use the id
@@ -441,3 +446,4 @@ template <class TVal> void RefHash3KeysIdPoolEnumerator<TVal>::Reset()
     fCurIndex = 0;
 }
 
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/RefHash3KeysIdPool.hpp b/src/xercesc/util/RefHash3KeysIdPool.hpp
index b4de9ef81349a56a25d23a91152309d63f684a5d..752603fbd88953909121610d1e7c4ed4d77b78a0 100644
--- a/src/xercesc/util/RefHash3KeysIdPool.hpp
+++ b/src/xercesc/util/RefHash3KeysIdPool.hpp
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.3  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.2  2002/06/12 17:15:12  tng
  * Remove redundant include header file.
  *
@@ -97,6 +100,8 @@
 #include <xercesc/util/HashBase.hpp>
 #include <xercesc/util/HashXMLCh.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 // This hash table is a combination of RefHash2KeyTableOf (with an additional integer as key3)
 // and NameIdPool with an id as index
 
@@ -294,6 +299,8 @@ private :
     RefHash3KeysIdPool<TVal>*  fToEnum;
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #if !defined(XERCES_TMPLSINC)
 #include <xercesc/util/RefHash3KeysIdPool.c>
 #endif
diff --git a/src/xercesc/util/RefHashTableOf.c b/src/xercesc/util/RefHashTableOf.c
index 9b0f3103427f4a2b2c186826ea4a4b674712ab66..f3166765fa4655cb6fcb6f18de5b2041c7803f47 100644
--- a/src/xercesc/util/RefHashTableOf.c
+++ b/src/xercesc/util/RefHashTableOf.c
@@ -56,6 +56,9 @@
 
 /**
  * $Log$
+ * Revision 1.6  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.5  2002/07/11 18:49:53  knoaman
  * Add setAdoptElements method.
  * Rename removeBucketElemSafe to orphanKey.
@@ -121,6 +124,8 @@
 
 #include <xercesc/util/NullPointerException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 // ---------------------------------------------------------------------------
 //  RefHashTableOf: Constructors and Destructor
 // ---------------------------------------------------------------------------
@@ -607,3 +612,5 @@ template <class TVal> void RefHashTableOfEnumerator<TVal>::findNext()
         fCurElem = fToEnum->fBucketList[fCurHash];
     }
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/RefHashTableOf.hpp b/src/xercesc/util/RefHashTableOf.hpp
index 7fa0b4a9541229ce86b6804fb2bda8b8f5785259..a1ad5d0ffd99c6f5fff28ae27d2bbf93cdcab725 100644
--- a/src/xercesc/util/RefHashTableOf.hpp
+++ b/src/xercesc/util/RefHashTableOf.hpp
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.6  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.5  2002/08/21 17:45:00  tng
  * [Bug 7087] compiler warnings when using gcc.
  *
@@ -128,6 +131,7 @@
 #include <xercesc/util/HashBase.hpp>
 #include <xercesc/util/HashXMLCh.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 //
 //  Forward declare the enumerator so he can be our friend. Can you say
@@ -302,6 +306,8 @@ private :
     RefHashTableOf<TVal>*                 fToEnum;
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #if !defined(XERCES_TMPLSINC)
 #include <xercesc/util/RefHashTableOf.c>
 #endif
diff --git a/src/xercesc/util/RefStackOf.c b/src/xercesc/util/RefStackOf.c
index c22874236e2e6bd60fd6b07ef3dc58e20c90bc5a..10f8aec1941608a688a417b9c0331d27ef949eb2 100644
--- a/src/xercesc/util/RefStackOf.c
+++ b/src/xercesc/util/RefStackOf.c
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /**
  * $Log$
- * Revision 1.1  2002/02/01 22:22:12  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:12  peiyongz
+ * sane_include
  *
  * Revision 1.3  2000/03/02 19:54:44  roddey
  * This checkin includes many changes done while waiting for the
@@ -83,7 +86,7 @@
 #include <xercesc/util/RefStackOf.hpp>
 #endif
 
-
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  RefStackOf: Constructors and Destructor
@@ -201,3 +204,5 @@ template <class TElem> void RefStackEnumerator<TElem>::Reset()
 {
     fCurIndex = 0;
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/RefStackOf.hpp b/src/xercesc/util/RefStackOf.hpp
index 773c796a2abbda877e2d7050b625181a99ae068c..59b63ac9348812f2d6cc46ec3c78394373e64607 100644
--- a/src/xercesc/util/RefStackOf.hpp
+++ b/src/xercesc/util/RefStackOf.hpp
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.3  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.2  2002/08/21 17:45:00  tng
  * [Bug 7087] compiler warnings when using gcc.
  *
@@ -91,6 +94,7 @@
 #include <xercesc/util/RefVectorOf.hpp>
 #include <xercesc/util/XMLEnumerator.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 //
 //  Forward declare the enumerator so he can be our friend. Can you say
@@ -195,6 +199,7 @@ private :
     RefStackOf<TElem>*  fToEnum;
 };
 
+XERCES_CPP_NAMESPACE_END
 
 #if !defined(XERCES_TMPLSINC)
 #include <xercesc/util/RefStackOf.c>
diff --git a/src/xercesc/util/RefVectorOf.c b/src/xercesc/util/RefVectorOf.c
index dc666a68722f2ec7c9cdef58683be0b74c865d2f..7426ee7b11a4f066480cb524385814688c0f2fd6 100644
--- a/src/xercesc/util/RefVectorOf.c
+++ b/src/xercesc/util/RefVectorOf.c
@@ -56,6 +56,9 @@
 
 /**
  * $Log$
+ * Revision 1.4  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.3  2002/02/05 15:38:14  tng
  * [Bug 6114] Memory leaks on iDOM getElementsByTagName().
  *
@@ -96,6 +99,7 @@
 #include <xercesc/util/RefVectorOf.hpp>
 #endif
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  RefVectorOf: Constructors and Destructor
@@ -397,3 +401,5 @@ template <class TElem> void RefVectorEnumerator<TElem>::Reset()
 {
     fCurIndex = 0;
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/RefVectorOf.hpp b/src/xercesc/util/RefVectorOf.hpp
index 1843a85d2bf5543f33b390fb05910dd0a0072a0f..f01f6e8b711c329cdd27a7c8087ee27918bb15c3 100644
--- a/src/xercesc/util/RefVectorOf.hpp
+++ b/src/xercesc/util/RefVectorOf.hpp
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.4  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.3  2002/08/21 17:45:00  tng
  * [Bug 7087] compiler warnings when using gcc.
  *
@@ -95,6 +98,7 @@
 #include <xercesc/util/ArrayIndexOutOfBoundsException.hpp>
 #include <xercesc/util/XMLEnumerator.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 template <class TElem> class RefVectorOf
 {
@@ -192,6 +196,8 @@ private :
     RefVectorOf<TElem>* fToEnum;
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #if !defined(XERCES_TMPLSINC)
 #include <xercesc/util/RefVectorOf.c>
 #endif
diff --git a/src/xercesc/util/RuntimeException.hpp b/src/xercesc/util/RuntimeException.hpp
index 2b49b623340f9f8cfd9c71797726da64de8f5a14..b4a21cd7805c060a57531ecc89c194e8be7a9a0b 100644
--- a/src/xercesc/util/RuntimeException.hpp
+++ b/src/xercesc/util/RuntimeException.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -65,6 +65,10 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/XMLException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 MakeXMLException(RuntimeException, XMLUTIL_EXPORT)
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/SchemaDateTimeException.hpp b/src/xercesc/util/SchemaDateTimeException.hpp
index b595b9bc58a73f16878fdfadd92ab723964962e6..78fd9df191429cc9b156b69c87bfc9ab69edb0be 100644
--- a/src/xercesc/util/SchemaDateTimeException.hpp
+++ b/src/xercesc/util/SchemaDateTimeException.hpp
@@ -57,8 +57,11 @@
 /*
  * $Id$
  * $Log$
- * Revision 1.1  2002/02/01 22:22:12  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:12  peiyongz
+ * sane_include
  *
  * Revision 1.1  2001/11/12 20:36:54  peiyongz
  * SchemaDateTimeException defined
@@ -73,7 +76,10 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/XMLException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 MakeXMLException(SchemaDateTimeException, XMLUTIL_EXPORT)
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/StringPool.cpp b/src/xercesc/util/StringPool.cpp
index 39c24758e9d27a3c420205f2977e0ed6eec04b52..5d507781bc1e033e186912ac929c33a070d8b8f6 100644
--- a/src/xercesc/util/StringPool.cpp
+++ b/src/xercesc/util/StringPool.cpp
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:12  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:12  peiyongz
+ * sane_include
  *
  * Revision 1.6  2001/10/22 15:43:35  tng
  * [Bug 3361] "String pool id was not legal" error in Attributes::getURI().
@@ -94,6 +97,7 @@
 #include <xercesc/util/XMLString.hpp>
 #include <string.h>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  StringPool::PoolElem: Constructors and Destructor
@@ -242,3 +246,5 @@ unsigned int XMLStringPool::addNewEntry(const XMLCh* const newString)
     fCurId++;
     return newElem->fId;
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/StringPool.hpp b/src/xercesc/util/StringPool.hpp
index aa38cdeb759afec4e83b9c27471b16bb369a0a06..4694b43db5158bc24dadc1bfc8c8e6e9466434dd 100644
--- a/src/xercesc/util/StringPool.hpp
+++ b/src/xercesc/util/StringPool.hpp
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:12  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:12  peiyongz
+ * sane_include
  *
  * Revision 1.5  2001/10/22 15:43:35  tng
  * [Bug 3361] "String pool id was not legal" error in Attributes::getURI().
@@ -84,6 +87,8 @@
 
 #include <xercesc/util/RefHashTableOf.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 //
 //  This class implements a string pool, in which strings can be added and
 //  given a unique id by which they can be refered. It has to provide fast
@@ -179,4 +184,6 @@ private :
     unsigned int                fCurId;
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/TransENameMap.c b/src/xercesc/util/TransENameMap.c
index 9d53b48a53eb5b3c05c7c3e6daf33858b6001373..a75211c69b29aff636166c8355075b9b0fad8e9b 100644
--- a/src/xercesc/util/TransENameMap.c
+++ b/src/xercesc/util/TransENameMap.c
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -62,7 +62,7 @@
 #include <xercesc/util/TransENameMap.hpp>
 #endif
 
-
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  ENameMapFor: Constructors and Destructor
@@ -114,3 +114,5 @@ EEndianNameMapFor<TType>::makeNew(const unsigned int blockSize) const
 {
     return new TType(getKey(), blockSize, fSwapped);
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/TransENameMap.hpp b/src/xercesc/util/TransENameMap.hpp
index 9ec69d4950b3b06cba9418fe534a4dfe9b59a6dc..3e2d63d479886c1696b127a9591cb8bbe4fe1bd1 100644
--- a/src/xercesc/util/TransENameMap.hpp
+++ b/src/xercesc/util/TransENameMap.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -61,6 +61,8 @@
 #include <xercesc/util/TransService.hpp>
 #include <xercesc/util/XMLString.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 //
 //  This class is really private to the TransService class. However, some
 //  compilers are too dumb to allow us to hide this class there in the Cpp
@@ -188,6 +190,7 @@ private :
     bool    fSwapped;
 };
 
+XERCES_CPP_NAMESPACE_END
 
 #if !defined(XERCES_TMPLSINC)
 #include <xercesc/util/TransENameMap.c>
diff --git a/src/xercesc/util/TransService.cpp b/src/xercesc/util/TransService.cpp
index ebec98af1fa84ff0508718547b4c4931a1db9912..d731ce81b8931e058bc3450fb52cf5febbb81092 100644
--- a/src/xercesc/util/TransService.cpp
+++ b/src/xercesc/util/TransService.cpp
@@ -76,7 +76,7 @@
 #include <xercesc/util/TransENameMap.hpp>
 #include <xercesc/util/EncodingValidator.hpp>
 
-
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  Local, static data
@@ -154,7 +154,7 @@ XMLTransService::makeNewTranscoderFor(  const   XMLCh* const            encoding
     {
         if (!EncodingValidator::instance()->isValidEncoding(encodingName))
         {
-            resValue = XMLTransService::UnsupportedEncoding;               
+            resValue = XMLTransService::UnsupportedEncoding;
             return 0;
         }
     }
@@ -190,9 +190,9 @@ XMLTransService::makeNewTranscoderFor(  const   XMLCh* const            encoding
 
     XMLTranscoder* temp =  makeNewXMLTranscoder(encodingName, resValue, blockSize);
 
-    // if successful, set resValue to OK  
+    // if successful, set resValue to OK
     // if failed, the makeNewXMLTranscoder has already set the proper failing resValue
-    if (temp) resValue =  XMLTransService::Ok;    
+    if (temp) resValue =  XMLTransService::Ok;
 
     return temp;
 
@@ -490,3 +490,5 @@ bool XMLTransService::isStrictIANAEncoding()
 {
     return gStrictIANAEncoding;
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/TransService.hpp b/src/xercesc/util/TransService.hpp
index cee2973cf07f3538b995429dd60f99835477647c..0e7edff6562ec30ed7f5423edb7827df23b8f55a 100644
--- a/src/xercesc/util/TransService.hpp
+++ b/src/xercesc/util/TransService.hpp
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.4  2002/11/04 15:22:04  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.3  2002/07/18 20:05:31  knoaman
  * Add a new feature to control strict IANA encoding name.
  *
@@ -128,6 +131,7 @@
 
 #include <xercesc/util/XercesDefs.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 // Forward references
 class XMLPlatformUtils;
@@ -280,7 +284,7 @@ private :
   * strings, it is not meant to be a comphrehensive string class.
   */
 
-/** 
+/**
   *   <code>XMLTranscoder</code> is for transcoding non-local code
   *   page encodings, i.e.  named encodings. These are used internally
   *   by the scanner to internalize raw XML into the internal Unicode
@@ -292,7 +296,7 @@ class XMLUTIL_EXPORT XMLTranscoder
 {
 public :
 
-	/** 
+	/**
 	 * This enum is used by the <code>transcodeTo()</code> method
 	 * to indicate how to react to unrepresentable characters. The
 	 * <code>transcodeFrom()</code> method always works the
@@ -358,7 +362,7 @@ public :
       * @param maxBytes   the max number of bytes in the destination buffer
       * @param charsEaten after transcoding, this will hold the number of chars
       *    that were processed from the source buffer
-      * @param options    options to pass to the transcoder that explain how to 
+      * @param options    options to pass to the transcoder that explain how to
       *    respond to an unrepresentable character
       * @return Returns the number of chars put into the target buffer
       */
@@ -526,4 +530,6 @@ inline const XMLCh* XMLTranscoder::getEncodingName() const
     return fEncodingName;
 }
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/TranscodingException.hpp b/src/xercesc/util/TranscodingException.hpp
index 3b84820130f53dede7e227e7f6189b8ff9da66a2..6b7d9f3c2beb07043d1ec223b1ccb58910bcc783 100644
--- a/src/xercesc/util/TranscodingException.hpp
+++ b/src/xercesc/util/TranscodingException.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -64,6 +64,10 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/XMLException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 MakeXMLException(TranscodingException, XMLUTIL_EXPORT)
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/UTFDataFormatException.hpp b/src/xercesc/util/UTFDataFormatException.hpp
index d085e69600f046b0d35cb7708cbe1bc1c9babcea..77015fdb69a965e17b9c406196392f261e017447 100644
--- a/src/xercesc/util/UTFDataFormatException.hpp
+++ b/src/xercesc/util/UTFDataFormatException.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -65,6 +65,10 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/XMLException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 MakeXMLException(UTFDataFormatException, XMLUTIL_EXPORT)
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/UnexpectedEOFException.hpp b/src/xercesc/util/UnexpectedEOFException.hpp
index 87e30c0bc382be908764e3d5123ad4757f6bbd06..236b35fd782c1bac7fc66b42d31887ced26b0fce 100644
--- a/src/xercesc/util/UnexpectedEOFException.hpp
+++ b/src/xercesc/util/UnexpectedEOFException.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -64,6 +64,10 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/XMLException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 MakeXMLException(UnexpectedEOFException, XMLUTIL_EXPORT)
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/UnsupportedEncodingException.hpp b/src/xercesc/util/UnsupportedEncodingException.hpp
index a338d9902e08cd6d7a06164e4470f6a337b605bf..d4718dc32b82f1b0fd2e0ae1b78775355dce024b 100644
--- a/src/xercesc/util/UnsupportedEncodingException.hpp
+++ b/src/xercesc/util/UnsupportedEncodingException.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -64,6 +64,10 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/XMLException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 MakeXMLException(UnsupportedEncodingException, XMLUTIL_EXPORT)
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/ValueArrayOf.c b/src/xercesc/util/ValueArrayOf.c
index e363ffd427545c3aeda5b82a1c831417ba164c67..7f180f71f28e9e4900360806ade21e9ca00bc7f5 100644
--- a/src/xercesc/util/ValueArrayOf.c
+++ b/src/xercesc/util/ValueArrayOf.c
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /**
  * $Log$
- * Revision 1.1  2002/02/01 22:22:13  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:13  peiyongz
+ * sane_include
  *
  * Revision 1.3  2000/03/02 19:54:47  roddey
  * This checkin includes many changes done while waiting for the
@@ -84,6 +87,8 @@
 #endif
 
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 // ---------------------------------------------------------------------------
 //  ValueArrayOf: Contructors and Destructor
 // ---------------------------------------------------------------------------
@@ -293,3 +298,5 @@ template <class TElem> void ValueArrayEnumerator<TElem>::Reset()
 {
     fCurIndex = 0;
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/ValueArrayOf.hpp b/src/xercesc/util/ValueArrayOf.hpp
index ec65069905ef947d1782994d9d61f25b53d7d8c9..9dcc3a7ce82a3cbcbc14c5d414b97ef8714187b2 100644
--- a/src/xercesc/util/ValueArrayOf.hpp
+++ b/src/xercesc/util/ValueArrayOf.hpp
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.3  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.2  2002/08/21 17:45:00  tng
  * [Bug 7087] compiler warnings when using gcc.
  *
@@ -90,6 +93,8 @@
 #include <xercesc/util/ArrayIndexOutOfBoundsException.hpp>
 #include <xercesc/util/IllegalArgumentException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 template <class TElem> class ValueArrayOf
 {
 public :
@@ -185,6 +190,7 @@ private :
     ValueArrayOf<TElem>*    fToEnum;
 };
 
+XERCES_CPP_NAMESPACE_END
 
 #if !defined(XERCES_TMPLSINC)
 #include <xercesc/util/ValueArrayOf.c>
diff --git a/src/xercesc/util/ValueHashTableOf.c b/src/xercesc/util/ValueHashTableOf.c
index 8beda4fc468a9b77afeb3e363fb569f56fe0f6e5..e98d19d8d325d5037f1b222fb158d53ca30031df 100644
--- a/src/xercesc/util/ValueHashTableOf.c
+++ b/src/xercesc/util/ValueHashTableOf.c
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 2002 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,6 +56,9 @@
 
 /**
  * $Log$
+ * Revision 1.4  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.3  2002/05/24 19:46:40  knoaman
  * Initial checkin.
  *
@@ -71,6 +74,8 @@
 
 #include <xercesc/util/NullPointerException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 // ---------------------------------------------------------------------------
 //  ValueHashTableOf: Constructors and Destructor
 // ---------------------------------------------------------------------------
@@ -316,8 +321,8 @@ template <class TVal> ValueHashTableOfEnumerator<TVal>::
 ValueHashTableOfEnumerator(ValueHashTableOf<TVal>* const toEnum, const bool adopt)
 	: fAdopted(adopt), fCurElem(0), fCurHash((unsigned int)-1), fToEnum(toEnum)
 {
-    if (!toEnum)  
-        ThrowXML(NullPointerException, XMLExcepts::CPtr_PointerIsZero);        
+    if (!toEnum)
+        ThrowXML(NullPointerException, XMLExcepts::CPtr_PointerIsZero);
 
     //
     //  Find the next available bucket element in the hash table. If it
@@ -413,3 +418,5 @@ template <class TVal> void ValueHashTableOfEnumerator<TVal>::findNext()
         fCurElem = fToEnum->fBucketList[fCurHash];
     }
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/ValueHashTableOf.hpp b/src/xercesc/util/ValueHashTableOf.hpp
index b166b797eb4424e7e94e6c201f2a13f522099918..095d571d21c850df6c578606b06623a0e8b68e14 100644
--- a/src/xercesc/util/ValueHashTableOf.hpp
+++ b/src/xercesc/util/ValueHashTableOf.hpp
@@ -74,6 +74,7 @@
 #include <xercesc/util/HashBase.hpp>
 #include <xercesc/util/HashXMLCh.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 //
 //  Forward declare the enumerator so he can be our friend. Can you say
@@ -228,6 +229,8 @@ private :
     ValueHashTableOf<TVal>*         fToEnum;
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #if !defined(XERCES_TMPLSINC)
 #include <xercesc/util/ValueHashTableOf.c>
 #endif
diff --git a/src/xercesc/util/ValueStackOf.c b/src/xercesc/util/ValueStackOf.c
index fcf9f4022d494e2fdc189c20297d838d0d0747f2..c469a989f4c987a5d7325abbcf2c011412cf7911 100644
--- a/src/xercesc/util/ValueStackOf.c
+++ b/src/xercesc/util/ValueStackOf.c
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /**
  * $Log$
- * Revision 1.1  2002/02/01 22:22:13  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:13  peiyongz
+ * sane_include
  *
  * Revision 1.3  2000/03/02 19:54:47  roddey
  * This checkin includes many changes done while waiting for the
@@ -83,6 +86,8 @@
 #include <xercesc/util/ValueStackOf.hpp>
 #endif
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 
 // ---------------------------------------------------------------------------
 //  ValueStackOf: Constructors and Destructor
@@ -194,3 +199,5 @@ template <class TElem> void ValueStackEnumerator<TElem>::Reset()
 {
     fCurIndex = 0;
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/ValueStackOf.hpp b/src/xercesc/util/ValueStackOf.hpp
index b18b3ceedbd5e8f0fe7434473f8ddce6f973905f..8ffb2ed76f72d6738166583972d2de909f770d70 100644
--- a/src/xercesc/util/ValueStackOf.hpp
+++ b/src/xercesc/util/ValueStackOf.hpp
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.3  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.2  2002/08/21 17:45:00  tng
  * [Bug 7087] compiler warnings when using gcc.
  *
@@ -89,6 +92,7 @@
 #include <xercesc/util/EmptyStackException.hpp>
 #include <xercesc/util/ValueVectorOf.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 //
 //  Forward declare the enumerator so he can be our friend. Can you say
@@ -192,6 +196,7 @@ private :
     ValueStackOf<TElem>*    fToEnum;
 };
 
+XERCES_CPP_NAMESPACE_END
 
 #if !defined(XERCES_TMPLSINC)
 #include <xercesc/util/ValueStackOf.c>
diff --git a/src/xercesc/util/ValueVectorOf.c b/src/xercesc/util/ValueVectorOf.c
index d06f28e2080f9b4c004f3d55b4d197d50d2cbcff..74dd096fabb4592b854df65cfb1e17a8628711e2 100644
--- a/src/xercesc/util/ValueVectorOf.c
+++ b/src/xercesc/util/ValueVectorOf.c
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /**
  * $Log$
- * Revision 1.1  2002/02/01 22:22:13  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:13  peiyongz
+ * sane_include
  *
  * Revision 1.5  2002/01/10 17:44:49  knoaman
  * Fix for bug 5786.
@@ -89,7 +92,7 @@
 #include <xercesc/util/ValueVectorOf.hpp>
 #endif
 
-
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  ValueVectorOf: Constructors and Destructor
@@ -212,7 +215,7 @@ template <class TElem> void ValueVectorOf<TElem>::removeAllElements()
     fCurCount = 0;
 }
 
-template <class TElem> 
+template <class TElem>
 bool ValueVectorOf<TElem>::containsElement(const TElem& toCheck,
                                            const unsigned int startIndex) {
 
@@ -328,3 +331,5 @@ template <class TElem> void ValueVectorEnumerator<TElem>::Reset()
 {
     fCurIndex = 0;
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/ValueVectorOf.hpp b/src/xercesc/util/ValueVectorOf.hpp
index 97fc8b51578e8e3347cdb8e7622bebd9749c0bcf..16a88a2748b38b9ba65be073a581ce4445756cb4 100644
--- a/src/xercesc/util/ValueVectorOf.hpp
+++ b/src/xercesc/util/ValueVectorOf.hpp
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.3  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.2  2002/08/21 17:45:00  tng
  * [Bug 7087] compiler warnings when using gcc.
  *
@@ -95,6 +98,7 @@
 #include <xercesc/util/ArrayIndexOutOfBoundsException.hpp>
 #include <xercesc/util/XMLEnumerator.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 template <class TElem> class ValueVectorOf
 {
@@ -206,6 +210,7 @@ private :
     ValueVectorOf<TElem>*   fToEnum;
 };
 
+XERCES_CPP_NAMESPACE_END
 
 #if !defined(XERCES_TMPLSINC)
 #include <xercesc/util/ValueVectorOf.c>
diff --git a/src/xercesc/util/XML256TableTranscoder.cpp b/src/xercesc/util/XML256TableTranscoder.cpp
index cdbfbc6fa13a6c9e61e8dd13945a3ea66729bb4a..adad1d79a4efec7e0c74a58ec6d24c7b43f36936 100644
--- a/src/xercesc/util/XML256TableTranscoder.cpp
+++ b/src/xercesc/util/XML256TableTranscoder.cpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -64,7 +64,7 @@
 #include <xercesc/util/XMLString.hpp>
 #include <string.h>
 
-
+XERCES_CPP_NAMESPACE_BEGIN
 
 
 // ---------------------------------------------------------------------------
@@ -262,3 +262,5 @@ XMLByte XML256TableTranscoder::xlatOneTo(const XMLCh toXlat) const
 
     return 0;
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/XML256TableTranscoder.hpp b/src/xercesc/util/XML256TableTranscoder.hpp
index d4347a6b147b8de81fbc4857de17dd8cefb3c51a..07c5c789350f042a4040bb1d9a66e22104d55dfa 100644
--- a/src/xercesc/util/XML256TableTranscoder.hpp
+++ b/src/xercesc/util/XML256TableTranscoder.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:13  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:13  peiyongz
+ * sane_include
  *
  * Revision 1.1  2000/03/18 00:00:32  roddey
  * Initial updates for two way transcoding support
@@ -70,6 +73,8 @@
 
 #include <xercesc/util/TransService.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 //
 //  This class implements the functionality of a common type of transcoder
 //  for an 8 bit, single byte encoding based on a set of 'to' and 'from'
@@ -184,4 +189,6 @@ private :
     const XMLTransService::TransRec*    fToTable;
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/XML88591Transcoder.cpp b/src/xercesc/util/XML88591Transcoder.cpp
index c20b06c5c39d3d4cf7cf376d6c5149a0be448cc0..a022060f6e27b2f6aaa5e8167fec5326e54504ba 100644
--- a/src/xercesc/util/XML88591Transcoder.cpp
+++ b/src/xercesc/util/XML88591Transcoder.cpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -63,7 +63,7 @@
 #include <xercesc/util/XMLString.hpp>
 #include <string.h>
 
-
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  XML88591Transcoder: Constructors and Destructor
@@ -151,7 +151,7 @@ XML88591Transcoder::transcodeTo(const   XMLCh* const    srcData
     while (srcPtr < srcEnd)
     {
         // If its legal, take it and jump back to top
-        if (*srcPtr < 256)  
+        if (*srcPtr < 256)
         {
             *destPtr++ = XMLByte(*srcPtr++);
             continue;
@@ -189,3 +189,5 @@ bool XML88591Transcoder::canTranscodeTo(const unsigned int toCheck) const
 {
     return (toCheck < 256);
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/XML88591Transcoder.hpp b/src/xercesc/util/XML88591Transcoder.hpp
index 3ae99221ddc8a844490598c10b63ab98c8e6f73b..a2ba6d50f0f6c0b20f4dbd2800ae11e26082d3ab 100644
--- a/src/xercesc/util/XML88591Transcoder.hpp
+++ b/src/xercesc/util/XML88591Transcoder.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -60,6 +60,7 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/TransService.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 //
 //  This class provides an implementation of the XMLTranscoder interface
@@ -121,4 +122,6 @@ private :
     void operator=(const XML88591Transcoder&);
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/XMLASCIITranscoder.cpp b/src/xercesc/util/XMLASCIITranscoder.cpp
index 00b1273c55adbf10cd90a3bc6df7ffd73820cfed..348c6bc706daa4490b511ec4495cb99918d91c61 100644
--- a/src/xercesc/util/XMLASCIITranscoder.cpp
+++ b/src/xercesc/util/XMLASCIITranscoder.cpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -63,7 +63,7 @@
 #include <xercesc/util/TranscodingException.hpp>
 #include <string.h>
 
-
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  XMLASCIITranscoder: Constructors and Destructor
@@ -214,3 +214,5 @@ bool XMLASCIITranscoder::canTranscodeTo(const unsigned int toCheck) const
 {
     return (toCheck < 0x80);
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/XMLASCIITranscoder.hpp b/src/xercesc/util/XMLASCIITranscoder.hpp
index aba1618f0ca90e9aab3be5bc874809d076c1982a..b67bb3aa6780509cc84802fac2c41720d8f46d0f 100644
--- a/src/xercesc/util/XMLASCIITranscoder.hpp
+++ b/src/xercesc/util/XMLASCIITranscoder.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -60,6 +60,7 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/TransService.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 //
 //  This class provides an implementation of the XMLTranscoder interface
@@ -121,4 +122,6 @@ private :
     void operator=(const XMLASCIITranscoder&);
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/XMLAbstractDoubleFloat.cpp b/src/xercesc/util/XMLAbstractDoubleFloat.cpp
index 4284d03dfc8f15ff89d796edfc2966a72ac7c393..24d9c83f4cd0c1d39560bc6e3560e3d7fe0e824b 100644
--- a/src/xercesc/util/XMLAbstractDoubleFloat.cpp
+++ b/src/xercesc/util/XMLAbstractDoubleFloat.cpp
@@ -57,6 +57,9 @@
 /*
  * $Id$
  * $Log$
+ * Revision 1.6  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.5  2002/09/24 19:51:24  tng
  * Performance: use XMLString::equals instead of XMLString::compareString
  *
@@ -90,6 +93,8 @@
 #include <xercesc/util/NumberFormatException.hpp>
 #include <xercesc/util/Janitor.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 // ---------------------------------------------------------------------------
 //  local data member
 // ---------------------------------------------------------------------------
@@ -410,3 +415,5 @@ void XMLAbstractDoubleFloat::normalizeZero(XMLCh* const inData)
 
 	return;
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/XMLAbstractDoubleFloat.hpp b/src/xercesc/util/XMLAbstractDoubleFloat.hpp
index 4ffe6035c6c94f6c3047215f32f5451a057b45c6..7eae2e087943773713d9888af901a41ce8ed86d7 100644
--- a/src/xercesc/util/XMLAbstractDoubleFloat.hpp
+++ b/src/xercesc/util/XMLAbstractDoubleFloat.hpp
@@ -57,6 +57,9 @@
 /*
  * $Id$
  * $Log$
+ * Revision 1.5  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.4  2002/03/06 19:13:12  peiyongz
  * Patch: more valid lexcial representation for positive/negative zero
  *
@@ -91,6 +94,8 @@
 #include <xercesc/util/XMLNumber.hpp>
 #include <xercesc/util/XMLBigDecimal.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 /***
  * 3.2.5.1 Lexical representation
  *
@@ -212,4 +217,6 @@ inline bool XMLAbstractDoubleFloat::isSpecialValue() const
     return (fType < SpecialTypeNum);
 }
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/XMLBigDecimal.cpp b/src/xercesc/util/XMLBigDecimal.cpp
index 49696270add54b1460f5fbff07a86e8cba66c968..20b720d1df121ee047b76f7b81df0c7e26669212 100644
--- a/src/xercesc/util/XMLBigDecimal.cpp
+++ b/src/xercesc/util/XMLBigDecimal.cpp
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.3  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.2  2002/08/13 22:11:23  peiyongz
  * Fix to Bug#9442
  *
@@ -99,6 +102,8 @@
 #include <xercesc/util/TransService.hpp>
 #include <xercesc/util/Janitor.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 /**
  * Constructs a BigDecimal from a string containing an optional (plus | minus)
  * sign followed by a sequence of zero or more decimal digits, optionally
@@ -110,7 +115,7 @@
  * Any extraneous characters (including whitespace) will result in
  * a NumberFormatException.
 
- * since parseBigDecimal and XMLBigInteger() may throw exception, 
+ * since parseBigDecimal and XMLBigInteger() may throw exception,
  * caller of XMLBigDecimal need to catch it.
 //
 **/
@@ -148,7 +153,7 @@ XMLBigDecimal::XMLBigDecimal(const XMLBigDecimal& toCopy, const int addExponent)
 {
     //invoke XMLBigInteger' copy ctor
     fIntVal = new XMLBigInteger(*(toCopy.getValue()));
- 
+
     if ( addExponent > 0 )
     {
         if (fScale >= (unsigned int)addExponent)
@@ -239,7 +244,7 @@ void XMLBigDecimal::parseBigDecimal(const XMLCh* const toConvert
     // '+' or '-' is allowed only at the first position
     //
     if (*startPtr == chDash)
-    {       
+    {
         *retPtr = chDash;  // copy the '-'
         startPtr++;
         retPtr++;
@@ -359,3 +364,5 @@ XMLCh*  XMLBigDecimal::toString() const
     return XMLString::replicate(fRawData);
 }
 
+XERCES_CPP_NAMESPACE_END
+
diff --git a/src/xercesc/util/XMLBigDecimal.hpp b/src/xercesc/util/XMLBigDecimal.hpp
index 0e0d75dc84e90c592c56361a53a2189be52612e9..a3c7dadbe7ea9f9079b2643968fbe44ffbdcd0d5 100644
--- a/src/xercesc/util/XMLBigDecimal.hpp
+++ b/src/xercesc/util/XMLBigDecimal.hpp
@@ -65,6 +65,8 @@
 #include <xercesc/util/XMLNumber.hpp>
 #include <xercesc/util/XMLBigInteger.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 class XMLUTIL_EXPORT XMLBigDecimal : public XMLNumber
 {
 public:
@@ -140,7 +142,7 @@ private:
     //     the number of digits to the right of the decimal point
     //
 	//  fRawData
-	//     to preserve the original string used to construct this object, 
+	//     to preserve the original string used to construct this object,
 	//     needed for pattern matching.
 	//
     // -----------------------------------------------------------------------
@@ -182,4 +184,6 @@ inline bool XMLBigDecimal::operator==(const XMLBigDecimal& toCompare) const
     return ( XMLBigInteger::compareValues(this->fIntVal, toCompare.fIntVal) == 0 ? true : false);
 }
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/XMLBigInteger.cpp b/src/xercesc/util/XMLBigInteger.cpp
index fcfc79a9ba761606faaec5c293f2b8c35073c0de..35b7aadad89254c488462d3c33ab413940a59383 100644
--- a/src/xercesc/util/XMLBigInteger.cpp
+++ b/src/xercesc/util/XMLBigInteger.cpp
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.3  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.2  2002/08/13 22:11:23  peiyongz
  * Fix to Bug#9442
  *
@@ -96,6 +99,8 @@
 #include <xercesc/util/XMLUniDefs.hpp>
 #include <xercesc/util/Janitor.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 /***
    *
    *  Leading and trailing whitespaces are allowed, and trimmed
@@ -221,7 +226,7 @@ XMLBigInteger::XMLBigInteger(const XMLCh* const strValue)
         fMagnitude = XMLString::replicate(XMLUni::fgZeroLenString);
     else
         fMagnitude = XMLString::replicate(ret_value);
-   
+
 	fRawData = XMLString::replicate(strValue);
 
 }
@@ -350,3 +355,4 @@ int XMLBigInteger::intValue() const
     return retVal * getSign();
 }
 
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/XMLBigInteger.hpp b/src/xercesc/util/XMLBigInteger.hpp
index 8d66bc1807d24cbc08c57526d4e100637f523f2a..9967c73d22da67a6d3a13f4f115348ff9ab6460c 100644
--- a/src/xercesc/util/XMLBigInteger.hpp
+++ b/src/xercesc/util/XMLBigInteger.hpp
@@ -64,6 +64,8 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/XMLString.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 class XMLUTIL_EXPORT XMLBigInteger
 {
 public:
@@ -146,7 +148,7 @@ private:
     //     the buffer holding the number.
     //
 	//  fRawData
-	//     to preserve the original string used to construct this object, 
+	//     to preserve the original string used to construct this object,
 	//     needed for pattern matching.
 	//
     // -----------------------------------------------------------------------
@@ -185,4 +187,6 @@ inline XMLCh*  XMLBigInteger::toString() const
     return XMLString::replicate(fRawData);
 }
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/XMLChTranscoder.cpp b/src/xercesc/util/XMLChTranscoder.cpp
index 8f3ca3b97ac5b71ef4a794d77252ecd76276a080..864e1c68e790a2f5810a3f9f6356be60bc4b04eb 100644
--- a/src/xercesc/util/XMLChTranscoder.cpp
+++ b/src/xercesc/util/XMLChTranscoder.cpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -62,7 +62,7 @@
 #include <xercesc/util/XMLChTranscoder.hpp>
 #include <string.h>
 
-
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  XMLChTranscoder: Constructors and Destructor
@@ -133,7 +133,7 @@ XMLChTranscoder::transcodeTo(const  XMLCh* const    srcData
     checkBlockSize(maxBytes);
     #endif
 
-    
+
     //
     //  Calculate the max chars we can do here. Its the lesser of the
     //  max chars we can store in the output byte buffer, and the number
@@ -159,6 +159,8 @@ XMLChTranscoder::transcodeTo(const  XMLCh* const    srcData
 
 bool XMLChTranscoder::canTranscodeTo(const unsigned int toCheck) const
 {
-    // We can handle anything 
+    // We can handle anything
     return true;
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/XMLChTranscoder.hpp b/src/xercesc/util/XMLChTranscoder.hpp
index bb8c4a4c0235896bb3fcf4e032204fd7b2d84517..e4a7f8240a394edf4c2a2978765ac8e1ef607b90 100644
--- a/src/xercesc/util/XMLChTranscoder.hpp
+++ b/src/xercesc/util/XMLChTranscoder.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -60,6 +60,7 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/TransService.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 //
 //  This class provides an implementation of the XMLTranscoder interface
@@ -118,4 +119,6 @@ private :
     void operator=(const XMLChTranscoder&);
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/XMLDateTime.cpp b/src/xercesc/util/XMLDateTime.cpp
index c5d493c2ed91f744d02b7991cd05a17ae09b8ea4..489ee420bce9a8c2afd93ca6a8572243b44b1693 100644
--- a/src/xercesc/util/XMLDateTime.cpp
+++ b/src/xercesc/util/XMLDateTime.cpp
@@ -57,8 +57,11 @@
 /*
  * $Id$
  * $Log$
- * Revision 1.1  2002/02/01 22:22:14  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:14  peiyongz
+ * sane_include
  *
  * Revision 1.4  2001/11/14 22:04:03  peiyongz
  * Patch to apply check on Year and more rigorous on other fields as well.
@@ -84,12 +87,14 @@
 #include <xercesc/util/XMLUni.hpp>
 #include <xercesc/util/Janitor.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 //
 // constants used to process raw data (fBuffer)
 //
 // [-]{CCYY-MM-DD}'T'{HH:MM:SS.MS}['Z']
 //                                [{+|-}hh:mm']
-//                                  
+//
 
 static const XMLCh DURATION_STARTER     = chLatin_P;              // 'P'
 static const XMLCh DURATION_Y           = chLatin_Y;              // 'Y'
@@ -120,23 +125,23 @@ static const int TIMEZONE_SIZE   = 5;    // hh:mm
 static const int DAY_SIZE        = 5;    // ---DD
 static const int MONTH_SIZE      = 6;    // --MM--
 static const int MONTHDAY_SIZE   = 7;    // --MM-DD
-static const int NOT_FOUND       = -1;   
+static const int NOT_FOUND       = -1;
 
-//define constants to be used in assigning default values for 
+//define constants to be used in assigning default values for
 //all date/time excluding duration
 static const int YEAR_DEFAULT  = 2000;
 static const int MONTH_DEFAULT = 01;
 static const int DAY_DEFAULT   = 15;
 
-// order-relation on duration is a partial order. The dates below are used to 
+// order-relation on duration is a partial order. The dates below are used to
 // for comparison of 2 durations, based on the fact that
 // duration x and y is x<=y iff s+x<=s+y
 // see 3.2.6 duration W3C schema datatype specs
 //
-// the dates are in format: {CCYY,MM,DD, H, S, M, MS, timezone}  
-static const int DATETIMES[][XMLDateTime::TOTAL_SIZE] = 
+// the dates are in format: {CCYY,MM,DD, H, S, M, MS, timezone}
+static const int DATETIMES[][XMLDateTime::TOTAL_SIZE] =
 {
-    {1696, 9, 1, 0, 0, 0, 0, XMLDateTime::UTC_STD},     
+    {1696, 9, 1, 0, 0, 0, 0, XMLDateTime::UTC_STD},
 	{1697, 2, 1, 0, 0, 0, 0, XMLDateTime::UTC_STD},
 	{1903, 3, 1, 0, 0, 0, 0, XMLDateTime::UTC_STD},
 	{1903, 7, 1, 0, 0, 0, 0, XMLDateTime::UTC_STD}
@@ -151,19 +156,19 @@ static inline int fQuotient(int a, int b)
     return div_result.quot;
 }
 
-static inline int fQuotient(int temp, int low, int high) 
+static inline int fQuotient(int temp, int low, int high)
 {
     return fQuotient(temp - low, high - low);
 }
 
-static inline int mod(int a, int b, int quotient) 
+static inline int mod(int a, int b, int quotient)
 {
 	return (a - quotient*b) ;
 }
 
-static inline int modulo (int temp, int low, int high) 
+static inline int modulo (int temp, int low, int high)
 {
-    //modulo(a - low, high - low) + low 
+    //modulo(a - low, high - low) + low
     int a = temp - low;
     int b = high - low;
     return (mod (a, b, fQuotient(a, b)) + low) ;
@@ -171,21 +176,21 @@ static inline int modulo (int temp, int low, int high)
 
 static inline bool isLeapYear(int year)
 {
-    return((year%4 == 0) && ((year%100 != 0) || (year%400 == 0))); 
+    return((year%4 == 0) && ((year%100 != 0) || (year%400 == 0)));
 }
 
-static int maxDayInMonthFor(int year, int month) 
+static int maxDayInMonthFor(int year, int month)
 {
 
-    if ( month == 4 || month == 6 || month == 9 || month == 11 ) 
+    if ( month == 4 || month == 6 || month == 9 || month == 11 )
     {
         return 30;
     }
-    else if ( month==2 ) 
+    else if ( month==2 )
     {
-        if ( isLeapYear(year) ) 
+        if ( isLeapYear(year) )
             return 29;
-        else 
+        else
             return 28;
     }
     else
@@ -203,13 +208,13 @@ static int maxDayInMonthFor(int year, int month)
  *
  * 3.2.6.2 Order relation on duration
  *
- *     In general, the order-relation on duration is a partial order since there is no 
- *  determinate relationship between certain durations such as one month (P1M) and 30 days (P30D). 
- *  The order-relation of two duration values x and y is x < y iff s+x < s+y for each qualified 
- *  dateTime s in the list below. 
+ *     In general, the order-relation on duration is a partial order since there is no
+ *  determinate relationship between certain durations such as one month (P1M) and 30 days (P30D).
+ *  The order-relation of two duration values x and y is x < y iff s+x < s+y for each qualified
+ *  dateTime s in the list below.
  *
  *     These values for s cause the greatest deviations in the addition of dateTimes and durations
- * 
+ *
  **/
 int XMLDateTime::compare(const XMLDateTime* const pDate1
                        , const XMLDateTime* const pDate2
@@ -232,14 +237,14 @@ int XMLDateTime::compare(const XMLDateTime* const pDate1
     addDuration(pTempA, pDate1, 0);
     addDuration(pTempB, pDate2, 0);
     resultA = compareOrder(pTempA, pTempB);
-    if ( resultA == INDETERMINATE )  
+    if ( resultA == INDETERMINATE )
         return INDETERMINATE;
 
     addDuration(pTempA, pDate1, 1);
     addDuration(pTempB, pDate2, 1);
     resultB = compareOrder(pTempA, pTempB);
     resultA = compareResult(resultA, resultB, strict);
-    if ( resultA == INDETERMINATE ) 
+    if ( resultA == INDETERMINATE )
         return INDETERMINATE;
 
     addDuration(pTempA, pDate1, 2);
@@ -265,7 +270,7 @@ int XMLDateTime::compare(const XMLDateTime* const pDate1
 //       fDuration  date
 //
 
-void XMLDateTime::addDuration(XMLDateTime*             fNewDate 
+void XMLDateTime::addDuration(XMLDateTime*             fNewDate
                             , const XMLDateTime* const fDuration
                             , int index)
 
@@ -289,10 +294,10 @@ void XMLDateTime::addDuration(XMLDateTime*             fNewDate
     carry = fQuotient (temp, 60);
     fNewDate->fValue[Second] =  mod(temp, 60, carry);
 		
-    //add minutes 
-    temp = DATETIMES[index][Minute] + fDuration->fValue[Minute] + carry; 
-    carry = fQuotient(temp, 60); 
-    fNewDate->fValue[Minute] = mod(temp, 60, carry);         
+    //add minutes
+    temp = DATETIMES[index][Minute] + fDuration->fValue[Minute] + carry;
+    carry = fQuotient(temp, 60);
+    fNewDate->fValue[Minute] = mod(temp, 60, carry);
 
     //add hours
     temp = DATETIMES[index][Hour] + fDuration->fValue[Hour] + carry;
@@ -301,20 +306,20 @@ void XMLDateTime::addDuration(XMLDateTime*             fNewDate
 		
     fNewDate->fValue[Day] = DATETIMES[index][Day] + fDuration->fValue[Day] + carry;
 
-    while ( true ) 
+    while ( true )
     {
         temp = maxDayInMonthFor(fNewDate->fValue[CentYear], fNewDate->fValue[Month]);
-        if ( fNewDate->fValue[Day] < 1 ) 
+        if ( fNewDate->fValue[Day] < 1 )
         { //original fNewDate was negative
             fNewDate->fValue[Day] += maxDayInMonthFor(fNewDate->fValue[CentYear], fNewDate->fValue[Month]-1);
             carry = -1;
         }
-        else if ( fNewDate->fValue[Day] > temp ) 
+        else if ( fNewDate->fValue[Day] > temp )
         {
             fNewDate->fValue[Day] -= temp;
             carry = 1;
         }
-        else 
+        else
         {
             break;
         }
@@ -333,24 +338,24 @@ int XMLDateTime::compareResult(short resultA
                              , bool strict)
 {
 
-    if ( resultB == INDETERMINATE ) 
+    if ( resultB == INDETERMINATE )
     {
         return INDETERMINATE;
     }
-    else if ( (resultA != resultB) && 
-              strict                ) 
+    else if ( (resultA != resultB) &&
+              strict                )
     {
         return INDETERMINATE;
     }
-    else if ( (resultA != resultB) && 
-              !strict               ) 
+    else if ( (resultA != resultB) &&
+              !strict               )
     {
-        if ( (resultA != EQUAL) && 
-             (resultB != EQUAL)  ) 
+        if ( (resultA != EQUAL) &&
+             (resultB != EQUAL)  )
         {
             return INDETERMINATE;
         }
-        else 
+        else
         {
             return (resultA != EQUAL)? resultA : resultB;
         }
@@ -369,18 +374,18 @@ int XMLDateTime::compare(const XMLDateTime* const pDate1
 
     if (pDate1->fValue[utc] == pDate2->fValue[utc])
     {
-        return XMLDateTime::compareOrder(pDate1, pDate2);    
+        return XMLDateTime::compareOrder(pDate1, pDate2);
     }
 
     short c1, c2;
 
-    if ( pDate1->isNormalized()) 
+    if ( pDate1->isNormalized())
     {
         c1 = compareResult(pDate1, pDate2, false, UTC_POS);
         c2 = compareResult(pDate1, pDate2, false, UTC_NEG);
         return getRetVal(c1, c2);
     }
-    else if ( pDate2->isNormalized()) 
+    else if ( pDate2->isNormalized())
     {
         c1 = compareResult(pDate1, pDate2, true, UTC_POS);
         c2 = compareResult(pDate1, pDate2, true, UTC_NEG);
@@ -408,9 +413,9 @@ int XMLDateTime::compareResult(const XMLDateTime* const pDate1
 
 int XMLDateTime::compareOrder(const XMLDateTime* const lValue
                             , const XMLDateTime* const rValue)
-{  
+{
     //
-    // If any of the them is not normalized() yet, 
+    // If any of the them is not normalized() yet,
     // we need to do something here.
     //
     XMLDateTime lTemp = *lValue;
@@ -419,13 +424,13 @@ int XMLDateTime::compareOrder(const XMLDateTime* const lValue
     lTemp.normalize();
     rTemp.normalize();
 
-    for ( int i = 0 ; i < TOTAL_SIZE; i++ ) 
+    for ( int i = 0 ; i < TOTAL_SIZE; i++ )
     {
-        if ( lTemp.fValue[i] < rTemp.fValue[i] ) 
+        if ( lTemp.fValue[i] < rTemp.fValue[i] )
         {
             return LESS_THAN;
         }
-        else if ( lTemp.fValue[i] > rTemp.fValue[i] ) 
+        else if ( lTemp.fValue[i] > rTemp.fValue[i] )
         {
             return GREATER_THAN;
         }
@@ -480,7 +485,7 @@ XMLDateTime& XMLDateTime::operator=(const XMLDateTime& rhs)
 
 //
 // We may simply return the handle to fBuffer, but
-// for the sake of consistency, we return a duplicated copy 
+// for the sake of consistency, we return a duplicated copy
 // and the caller is responsible for the release of the buffer
 // just like any other things in the XMLNumber family.
 //
@@ -555,30 +560,30 @@ void XMLDateTime::parseDay()
 {
     initParser();
 
-    if (fBuffer[0] != DATE_SEPARATOR || 
-        fBuffer[1] != DATE_SEPARATOR || 
-        fBuffer[2] != DATE_SEPARATOR  ) 
+    if (fBuffer[0] != DATE_SEPARATOR ||
+        fBuffer[1] != DATE_SEPARATOR ||
+        fBuffer[2] != DATE_SEPARATOR  )
     {
         ThrowXML1(SchemaDateTimeException
                 , XMLExcepts::DateTime_gDay_invalid
                 , fBuffer);
     }
 
-    //initialize values 
+    //initialize values
     fValue[CentYear] = YEAR_DEFAULT;
-    fValue[Month]    = MONTH_DEFAULT;  
+    fValue[Month]    = MONTH_DEFAULT;
     fValue[Day]      = parseInt(fStart+3, fStart+5);
 
-    if ( DAY_SIZE < fEnd ) 
+    if ( DAY_SIZE < fEnd )
     {
         int sign = findUTCSign(DAY_SIZE);
-        if ( sign < 0 ) 
+        if ( sign < 0 )
         {
             ThrowXML1(SchemaDateTimeException
                     , XMLExcepts::DateTime_gDay_invalid
                     , fBuffer);
         }
-        else 
+        else
         {
             getTimeZone(sign);
         }
@@ -596,8 +601,8 @@ void XMLDateTime::parseMonth()
 {
     initParser();
 
-    if (fBuffer[0] != DATE_SEPARATOR || 
-        fBuffer[1] != DATE_SEPARATOR || 
+    if (fBuffer[0] != DATE_SEPARATOR ||
+        fBuffer[1] != DATE_SEPARATOR ||
         fBuffer[4] != DATE_SEPARATOR ||
         fBuffer[5] != DATE_SEPARATOR  )
     {
@@ -611,16 +616,16 @@ void XMLDateTime::parseMonth()
     fValue[Day]      = DAY_DEFAULT;
     fValue[Month]    = parseInt(2, 4);
 
-    if ( MONTH_SIZE < fEnd ) 
+    if ( MONTH_SIZE < fEnd )
     {
         int sign = findUTCSign(MONTH_SIZE);
-        if ( sign < 0 ) 
+        if ( sign < 0 )
         {
             ThrowXML1(SchemaDateTimeException
                     , XMLExcepts::DateTime_gMth_invalid
                     , fBuffer);
         }
-        else 
+        else
         {
             getTimeZone(sign);
         }
@@ -642,17 +647,17 @@ void XMLDateTime::parseYear()
     //
     int sign = findUTCSign((fBuffer[0] == chDash) ? 1 : 0);
 
-    if (sign == NOT_FOUND) 
+    if (sign == NOT_FOUND)
     {
         fValue[CentYear] = parseIntYear(fEnd);
     }
-    else 
+    else
     {
         fValue[CentYear] = parseIntYear(sign);
         getTimeZone(sign);
     }
 
-    //initialize values 
+    //initialize values
     fValue[Month] = MONTH_DEFAULT;
     fValue[Day]   = DAY_DEFAULT;   //java is 1
 
@@ -668,8 +673,8 @@ void XMLDateTime::parseMonthDay()
 {
     initParser();
 
-    if (fBuffer[0] != DATE_SEPARATOR || 
-        fBuffer[1] != DATE_SEPARATOR || 
+    if (fBuffer[0] != DATE_SEPARATOR ||
+        fBuffer[1] != DATE_SEPARATOR ||
         fBuffer[4] != DATE_SEPARATOR )
     {
         ThrowXML1(SchemaDateTimeException
@@ -678,21 +683,21 @@ void XMLDateTime::parseMonthDay()
     }
 
 
-    //initialize 
+    //initialize
     fValue[CentYear] = YEAR_DEFAULT;
     fValue[Month]    = parseInt(2, 4);	
     fValue[Day]      = parseInt(5, 7);
 
-    if ( MONTHDAY_SIZE < fEnd ) 
+    if ( MONTHDAY_SIZE < fEnd )
     {
         int sign = findUTCSign(MONTHDAY_SIZE);
-        if ( sign<0 ) 
+        if ( sign<0 )
         {
             ThrowXML1(SchemaDateTimeException
                     , XMLExcepts::DateTime_gMthDay_invalid
                     , fBuffer);
         }
-        else 
+        else
         {
             getTimeZone(sign);
         }
@@ -716,7 +721,7 @@ void XMLDateTime::parseYearMonth()
 }
 
 //
-//PnYn MnDTnH nMnS: -P1Y2M3DT10H30M        
+//PnYn MnDTnH nMnS: -P1Y2M3DT10H30M
 //
 // [-]{'P'{[n'Y'][n'M'][n'D']['T'][n'H'][n'M'][n'S']}}
 //
@@ -730,8 +735,8 @@ void XMLDateTime::parseDuration()
     // must start with '-' or 'P'
     //
     XMLCh c = fBuffer[fStart++];
-    if ( (c != DURATION_STARTER) && 
-         (c != chDash)            ) 
+    if ( (c != DURATION_STARTER) &&
+         (c != chDash)            )
     {
         ThrowXML1(SchemaDateTimeException
                 , XMLExcepts::DateTime_dur_Start_dashP
@@ -739,7 +744,7 @@ void XMLDateTime::parseDuration()
     }
 
     // 'P' must ALWAYS be present in either case
-    if ( (c == chDash) && 
+    if ( (c == chDash) &&
          (fBuffer[fStart++]!= DURATION_STARTER ))
     {
         ThrowXML1(SchemaDateTimeException
@@ -749,12 +754,12 @@ void XMLDateTime::parseDuration()
 
     // java code
     //date[utc]=(c=='-')?'-':0;
-    //fValue[utc] = UTC_STD; 
+    //fValue[utc] = UTC_STD;
     fValue[utc] = (fBuffer[0] == chDash? UTC_NEG : UTC_STD);
 
     int negate = ( fBuffer[0] == chDash ? -1 : 1);
 
-    // 
+    //
     // No negative value is allowed after 'P'
     //
     // eg P-1234, invalid
@@ -769,15 +774,15 @@ void XMLDateTime::parseDuration()
     //at least one number and designator must be seen after P
     bool designator = false;
 
-    int endDate = indexOf(fStart, fEnd, DATETIME_SEPARATOR); 
-    if ( endDate == NOT_FOUND ) 
+    int endDate = indexOf(fStart, fEnd, DATETIME_SEPARATOR);
+    if ( endDate == NOT_FOUND )
     {
         endDate = fEnd;  // 'T' absent
     }
 
-    //find 'Y'        
+    //find 'Y'
     int end = indexOf(fStart, endDate, DURATION_Y);
-    if ( end != NOT_FOUND ) 
+    if ( end != NOT_FOUND )
     {
         //scan year
         fValue[CentYear] = negate * parseInt(fStart, end);
@@ -786,7 +791,7 @@ void XMLDateTime::parseDuration()
     }
 
     end = indexOf(fStart, endDate, DURATION_M);
-    if ( end != NOT_FOUND ) 
+    if ( end != NOT_FOUND )
     {
         //scan month
         fValue[Month] = negate * parseInt(fStart, end);
@@ -795,7 +800,7 @@ void XMLDateTime::parseDuration()
     }
 
     end = indexOf(fStart, endDate, DURATION_D);
-    if ( end != NOT_FOUND ) 
+    if ( end != NOT_FOUND )
     {
         //scan day
         fValue[Day] = negate * parseInt(fStart,end);
@@ -814,11 +819,11 @@ void XMLDateTime::parseDuration()
     if ( fEnd != endDate ) // 'T' present
     {
         //scan hours, minutes, seconds
-        //         
+        //
 
         // skip 'T' first
         end = indexOf(++fStart, fEnd, DURATION_H);
-        if ( end != NOT_FOUND ) 
+        if ( end != NOT_FOUND )
         {
             //scan hours
             fValue[Hour] = negate * parseInt(fStart, end);
@@ -827,7 +832,7 @@ void XMLDateTime::parseDuration()
         }
 
         end = indexOf(fStart, fEnd, DURATION_M);
-        if ( end != NOT_FOUND ) 
+        if ( end != NOT_FOUND )
         {
             //scan min
             fValue[Minute] = negate * parseInt(fStart, end);
@@ -836,28 +841,28 @@ void XMLDateTime::parseDuration()
         }
 
         end = indexOf(fStart, fEnd, DURATION_S);
-        if ( end != NOT_FOUND ) 
+        if ( end != NOT_FOUND )
         {
             //scan seconds
             int mlsec = indexOf (fStart, end, MILISECOND_SEPARATOR);
-            if ( mlsec != NOT_FOUND ) 
+            if ( mlsec != NOT_FOUND )
             {
                 fValue[Second]     = negate * parseInt(fStart, mlsec);
                 fValue[MiliSecond] = negate * parseInt(mlsec+1, end);
             }
-            else 
+            else
             {
                 fValue[Second] = negate * parseInt(fStart,end);
             }
-   
+
             fStart = end+1;
             designator = true;
         }
 
         // no additional data should appear after last item
         // P1Y1M1DT is illigal value as well
-        if ( (fStart != fEnd) || 
-              fBuffer[--fStart] == DATETIME_SEPARATOR ) 
+        if ( (fStart != fEnd) ||
+              fBuffer[--fStart] == DATETIME_SEPARATOR )
         {
             ThrowXML1(SchemaDateTimeException
                     , XMLExcepts::DateTime_dur_NoTimeAfterT
@@ -865,7 +870,7 @@ void XMLDateTime::parseDuration()
         }
     }
 
-    if ( !designator ) 
+    if ( !designator )
     {
         ThrowXML1(SchemaDateTimeException
                 , XMLExcepts::DateTime_dur_NoElementAtAll
@@ -895,10 +900,10 @@ void XMLDateTime::getDate()
                 , XMLExcepts::DateTime_date_incomplete
                 , fBuffer);
 
-    getYearMonth();    // Scan YearMonth and 
-                       // fStart point to the next '-' 
+    getYearMonth();    // Scan YearMonth and
+                       // fStart point to the next '-'
 
-    if (fBuffer[fStart++] != DATE_SEPARATOR) 
+    if (fBuffer[fStart++] != DATE_SEPARATOR)
     {
         ThrowXML1(SchemaDateTimeException
                 , XMLExcepts::DateTime_date_invalid
@@ -945,7 +950,7 @@ void XMLDateTime::getTime()
     // get hours, minute and second
     //
     fValue[Hour]   = parseInt(fStart + 0, fStart + 2);
-    fValue[Minute] = parseInt(fStart + 3, fStart + 5);            
+    fValue[Minute] = parseInt(fStart + 3, fStart + 5);
     fValue[Second] = parseInt(fStart + 6, fStart + 8);
     fStart += 8;
 
@@ -956,7 +961,7 @@ void XMLDateTime::getTime()
     //find UTC sign if any
     int sign = findUTCSign(fStart);
 
-    //parse miliseconds 
+    //parse miliseconds
     int milisec = (fBuffer[fStart] == MILISECOND_SEPARATOR)? fStart : NOT_FOUND;
     if ( milisec != NOT_FOUND )
     {
@@ -970,18 +975,18 @@ void XMLDateTime::getTime()
             //("ms shall be present once '.' is present" );
         }
 
-        if ( sign == NOT_FOUND ) 
+        if ( sign == NOT_FOUND )
         {
             fValue[MiliSecond] = parseInt(fStart, fEnd);  //get ms between '.' and fEnd
             fStart = fEnd;
         }
-        else 
+        else
         {
             fValue[MiliSecond] = parseInt(fStart, sign);  //get ms between UTC sign and fEnd
         }
 	}
 
-    //parse UTC time zone (hh:mm)        
+    //parse UTC time zone (hh:mm)
     if ( sign > 0 ) {
         getTimeZone(sign);
     }
@@ -1011,7 +1016,7 @@ void XMLDateTime::getYearMonth()
     // search for year separator '-'
     //
     int yearSeparator = indexOf(start, fEnd, DATE_SEPARATOR);
-    if ( yearSeparator == NOT_FOUND) 
+    if ( yearSeparator == NOT_FOUND)
         ThrowXML1(SchemaDateTimeException
                 , XMLExcepts::DateTime_ym_invalid
                 , fBuffer);
@@ -1037,17 +1042,17 @@ void XMLDateTime::getYearMonth()
 
 void XMLDateTime::parseTimeZone()
 {
-    if ( fStart < fEnd ) 
+    if ( fStart < fEnd )
     {
         int sign = findUTCSign(fStart);
-        if ( sign < 0 ) 
+        if ( sign < 0 )
         {
             ThrowXML1(SchemaDateTimeException
                     , XMLExcepts::DateTime_tz_noUTCsign
                     , fBuffer);
             //("Error in month parsing");
         }
-        else 
+        else
         {
             getTimeZone(sign);
         }
@@ -1106,12 +1111,12 @@ void XMLDateTime::getTimeZone(const int sign)
 
 /**
  * If timezone present - normalize dateTime  [E Adding durations to dateTimes]
- * 
+ *
  * @param date   CCYY-MM-DDThh:mm:ss+03
  * @return CCYY-MM-DDThh:mm:ssZ
  */
 void XMLDateTime::normalize()
-{  
+{
 
     if ((fValue[utc] == UTC_UNKNOWN) ||
         (fValue[utc] == UTC_STD)      )
@@ -1123,7 +1128,7 @@ void XMLDateTime::normalize()
     int temp = fValue[Minute] + negate * fTimeZone[mm];
     int carry = fQuotient(temp, 60);
     fValue[Minute] = mod(temp, 60, carry);
-       
+
     //add hours
     temp = fValue[Hour] + negate * fTimeZone[hh] + carry;
     carry = fQuotient(temp, 24);
@@ -1134,17 +1139,17 @@ void XMLDateTime::normalize()
     while (1)
     {
         temp = maxDayInMonthFor(fValue[CentYear], fValue[Month]);
-        if (fValue[Day] < 1) 
+        if (fValue[Day] < 1)
         {
             fValue[Day] += maxDayInMonthFor(fValue[CentYear], fValue[Month] - 1);
             carry = -1;
         }
-        else if ( fValue[Day] > temp ) 
+        else if ( fValue[Day] > temp )
         {
             fValue[Day] -= temp;
             carry = 1;
         }
-        else 
+        else
         {
             break;
         }
@@ -1164,8 +1169,8 @@ void XMLDateTime::validateDateTime() const
 {
 
     //REVISIT: should we throw an exception for not valid dates
-    //          or reporting an error message should be sufficient?  
-    if ( fValue[CentYear] == 0 ) 
+    //          or reporting an error message should be sufficient?
+    if ( fValue[CentYear] == 0 )
     {
         ThrowXML1(SchemaDateTimeException
                 , XMLExcepts::DateTime_year_zero
@@ -1173,8 +1178,8 @@ void XMLDateTime::validateDateTime() const
         //"The year \"0000\" is an illegal year value");
     }
 
-    if ( fValue[Month] < 1  || 
-         fValue[Month] > 12  ) 
+    if ( fValue[Month] < 1  ||
+         fValue[Month] > 12  )
     {
         ThrowXML1(SchemaDateTimeException
                 , XMLExcepts::DateTime_mth_invalid
@@ -1184,7 +1189,7 @@ void XMLDateTime::validateDateTime() const
 
     //validate days
     if ( fValue[Day] > maxDayInMonthFor( fValue[CentYear], fValue[Month]) ||
-         fValue[Day] == 0 ) 
+         fValue[Day] == 0 )
     {
         ThrowXML1(SchemaDateTimeException
                 , XMLExcepts::DateTime_day_invalid
@@ -1193,11 +1198,11 @@ void XMLDateTime::validateDateTime() const
     }
 
     //validate hours
-    if ((fValue[Hour] < 0)  || 
-        (fValue[Hour] > 23) || 
-        ((fValue[Hour] == 24) && ((fValue[Minute] !=0) || 
+    if ((fValue[Hour] < 0)  ||
+        (fValue[Hour] > 23) ||
+        ((fValue[Hour] == 24) && ((fValue[Minute] !=0) ||
                                   (fValue[Second] !=0) ||
-                                  (fValue[MiliSecond] !=0)))) 
+                                  (fValue[MiliSecond] !=0))))
     {
         ThrowXML1(SchemaDateTimeException
                 , XMLExcepts::DateTime_hour_invalid
@@ -1252,8 +1257,8 @@ void XMLDateTime::validateDateTime() const
 // -----------------------------------------------------------------------
 int XMLDateTime::indexOf(const int start, const int end, const XMLCh ch) const
 {
-    for ( int i = start; i < end; i++ ) 
-        if ( fBuffer[i] == ch ) 
+    for ( int i = start; i < end; i++ )
+        if ( fBuffer[i] == ch )
             return i;
 
     return NOT_FOUND;
@@ -1262,7 +1267,7 @@ int XMLDateTime::indexOf(const int start, const int end, const XMLCh ch) const
 int XMLDateTime::findUTCSign (const int start)
 {
     int  pos;
-    for ( int index = start; index < fEnd; index++ ) 
+    for ( int index = start; index < fEnd; index++ )
     {
         pos = XMLString::indexOf(UTC_SET, fBuffer[index]);
         if ( pos != NOT_FOUND)
@@ -1296,7 +1301,7 @@ int XMLDateTime::parseInt(const int start, const int end) const
 
 //
 // [-]CCYY
-// 
+//
 // Note: start from fStart
 //       end (exclusive)
 //       fStart NOT updated
@@ -1307,20 +1312,20 @@ int XMLDateTime::parseIntYear(const int end) const
     int start = ( fBuffer[0] == chDash ) ? fStart + 1 : fStart;
 
     int length = end - start;
-    if (length < 4) 
+    if (length < 4)
     {
         ThrowXML1(SchemaDateTimeException
                 , XMLExcepts::DateTime_year_tooShort
                 , fBuffer);
         //"Year must have 'CCYY' format");
     }
-    else if (length > 4 && 
+    else if (length > 4 &&
              fBuffer[start] == chDigit_0)
     {
         ThrowXML1(SchemaDateTimeException
                 , XMLExcepts::DateTime_year_leadingZero
                 , fBuffer);
-        //"Leading zeros are required if the year value would otherwise have fewer than four digits; 
+        //"Leading zeros are required if the year value would otherwise have fewer than four digits;
         // otherwise they are forbidden");
     }
 
@@ -1329,4 +1334,4 @@ int XMLDateTime::parseIntYear(const int end) const
     return ( negative ? (-1) * yearVal : yearVal );
 }
 
-
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/XMLDateTime.hpp b/src/xercesc/util/XMLDateTime.hpp
index 361c40350033d76207cf07d8ab98a42fc5cd2fa2..e4df55e0747280d82af6c5f3c2fe9d34cfe28a4a 100644
--- a/src/xercesc/util/XMLDateTime.hpp
+++ b/src/xercesc/util/XMLDateTime.hpp
@@ -57,8 +57,11 @@
 /*
  * $Id$
  * $Log$
- * Revision 1.1  2002/02/01 22:22:14  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:14  peiyongz
+ * sane_include
  *
  * Revision 1.4  2001/11/22 20:23:00  peiyongz
  * _declspec(dllimport) and inline warning C4273
@@ -83,12 +86,14 @@
 #include <xercesc/util/XMLUniDefs.hpp>
 #include <xercesc/util/SchemaDateTimeException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 class XMLUTIL_EXPORT XMLDateTime : public XMLNumber
 {
 public:
 
     // to be moved to XMLNumber
-    enum 
+    enum
     {
         LESS_THAN     = -1,
         EQUAL         = 0,
@@ -106,10 +111,10 @@ public:
         Second     ,
         MiliSecond ,
         utc        ,
-        TOTAL_SIZE   
+        TOTAL_SIZE
     };
 
-    enum utcType 
+    enum utcType
     {
         UTC_UNKNOWN = 0,
         UTC_STD        ,          // set in parse() or normalize()
@@ -135,7 +140,7 @@ public:
 
     XMLDateTime(const XMLDateTime&);
 
-    XMLDateTime&          operator=(const XMLDateTime&);   
+    XMLDateTime&          operator=(const XMLDateTime&);
 
     // -----------------------------------------------------------------------
     // Implementation of Abstract Interface
@@ -168,12 +173,12 @@ public:
     void                  parseDuration();       //duration
 
     // -----------------------------------------------------------------------
-    // Comparison 
+    // Comparison
     // -----------------------------------------------------------------------
-    static int            compare(const XMLDateTime* const 
+    static int            compare(const XMLDateTime* const
                                 , const XMLDateTime* const);
 
-    static int            compare(const XMLDateTime* const 
+    static int            compare(const XMLDateTime* const
                                 , const XMLDateTime* const
                                 , bool                    );
 
@@ -186,7 +191,7 @@ private:
     // Constant data
     // -----------------------------------------------------------------------
 	//
-    enum timezoneIndex 
+    enum timezoneIndex
     {
         hh = 0,
         mm ,
@@ -194,10 +199,10 @@ private:
     };
 
     // -----------------------------------------------------------------------
-    // Comparison 
+    // Comparison
     // -----------------------------------------------------------------------
-    static int            compareResult(short 
-                                      , short 
+    static int            compareResult(short
+                                      , short
                                       , bool);
 
     static void           addDuration(XMLDateTime*             pDuration
@@ -219,7 +224,7 @@ private:
     inline  void          reset();
 
     inline  void          assertBuffer()               const;
-   
+
     inline  void          copy(const XMLDateTime&);
 
     // allow multiple parsing
@@ -228,7 +233,7 @@ private:
     inline  bool          isNormalized()               const;
 
     // -----------------------------------------------------------------------
-    // scaners 
+    // scaners
     // -----------------------------------------------------------------------
 
     void                  getDate();
@@ -287,7 +292,7 @@ private:
     //
     // -----------------------------------------------------------------------
 
-    int          fValue[TOTAL_SIZE];    
+    int          fValue[TOTAL_SIZE];
     int          fTimeZone[TIMEZONE_ARRAYSIZE];
     int          fStart;
     int          fEnd;
@@ -306,7 +311,7 @@ inline void XMLDateTime::setBuffer(const XMLCh* const aString)
 
 inline void XMLDateTime::reset()
 {
-    for ( int i=0; i < TOTAL_SIZE; i++ ) 
+    for ( int i=0; i < TOTAL_SIZE; i++ )
         fValue[i] = 0;
 
     fTimeZone[hh] = fTimeZone[mm] = 0;
@@ -322,7 +327,7 @@ inline void XMLDateTime::reset()
 
 inline void XMLDateTime::copy(const XMLDateTime& rhs)
 {
-    for ( int i = 0; i < TOTAL_SIZE; i++ ) 
+    for ( int i = 0; i < TOTAL_SIZE; i++ )
         fValue[i] = rhs.fValue[i];
 
     fTimeZone[hh] = rhs.fTimeZone[hh];
@@ -343,7 +348,7 @@ inline void XMLDateTime::copy(const XMLDateTime& rhs)
 
 inline void XMLDateTime::assertBuffer() const
 {
-    if ( ( !fBuffer )            || 
+    if ( ( !fBuffer )            ||
          ( fBuffer[0] == chNull ) )
     {
         ThrowXML(SchemaDateTimeException
@@ -367,12 +372,14 @@ inline bool XMLDateTime::isNormalized() const
 inline int XMLDateTime::getRetVal(int c1, int c2)
 {
     if ((c1 == LESS_THAN    && c2 == GREATER_THAN) ||
-        (c1 == GREATER_THAN && c2 == LESS_THAN)      ) 
+        (c1 == GREATER_THAN && c2 == LESS_THAN)      )
     {
-        return INDETERMINATE; 
+        return INDETERMINATE;
     }
 
     return ( c1 != INDETERMINATE ) ? c1 : c2;
 }
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/XMLDeleterFor.c b/src/xercesc/util/XMLDeleterFor.c
index f05c2d314dd5cbc362c121a3d921e37871ec37f8..a91d23a8a30523d018dac9f04fc37e953bb0249c 100644
--- a/src/xercesc/util/XMLDeleterFor.c
+++ b/src/xercesc/util/XMLDeleterFor.c
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:14  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:14  peiyongz
+ * sane_include
  *
  * Revision 1.1  2000/03/02 19:54:48  roddey
  * This checkin includes many changes done while waiting for the
@@ -74,6 +77,7 @@
 #include <xercesc/util/XMLDeleterFor.hpp>
 #endif
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  XMLDeleterFor: Constructors and Destructor
@@ -88,3 +92,5 @@ template <class T> XMLDeleterFor<T>::~XMLDeleterFor()
 {
    delete fToDelete;
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/XMLDeleterFor.hpp b/src/xercesc/util/XMLDeleterFor.hpp
index 4ac7de7a5f541b345a1f71b58be2c572968663b7..1f6cd9b37cd4c1ace797e23527977ef6682258b0 100644
--- a/src/xercesc/util/XMLDeleterFor.hpp
+++ b/src/xercesc/util/XMLDeleterFor.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:14  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:14  peiyongz
+ * sane_include
  *
  * Revision 1.2  2000/03/09 22:38:08  abagchi
  * Changed copy constructor to make it work on SunOS 5.7
@@ -76,8 +79,9 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/PlatformUtils.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
-// 
+//
 //  For internal use only.
 //
 //  This class is used by the platform utilities class to support cleanup
@@ -115,6 +119,7 @@ private :
     T*  fToDelete;
 };
 
+XERCES_CPP_NAMESPACE_END
 
 #if !defined(XERCES_TMPLSINC)
 #include <xercesc/util/XMLDeleterFor.c>
diff --git a/src/xercesc/util/XMLDouble.cpp b/src/xercesc/util/XMLDouble.cpp
index 95ce40cbbbca8050a9fb61261d03729e54f11d65..be8fc716b8034cd126e5859c9980ac1a98ca59ea 100644
--- a/src/xercesc/util/XMLDouble.cpp
+++ b/src/xercesc/util/XMLDouble.cpp
@@ -57,6 +57,9 @@
 /*
  * $Id$
  * $Log$
+ * Revision 1.4  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.3  2002/09/24 19:51:24  tng
  * Performance: use XMLString::equals instead of XMLString::compareString
  *
@@ -125,6 +128,8 @@
 #include <xercesc/util/XMLUniDefs.hpp>
 #include <xercesc/util/NumberFormatException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 //---------
 // TODO:
 //
@@ -322,3 +327,5 @@ void XMLDouble::reinitXMLDouble() {
     maxPositiveValue = 0;
 
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/XMLDouble.hpp b/src/xercesc/util/XMLDouble.hpp
index 287b5d5e857ad83bbbd6ac526ea4460ad2857715..e9c30628ba58a613ac1cd5788323aade3064242e 100644
--- a/src/xercesc/util/XMLDouble.hpp
+++ b/src/xercesc/util/XMLDouble.hpp
@@ -57,6 +57,9 @@
 /*
  * $Id$
  * $Log$
+ * Revision 1.3  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.2  2002/02/20 18:17:02  tng
  * [Bug 5977] Warnings on generating apiDocs.
  *
@@ -100,6 +103,8 @@
 
 #include <xercesc/util/XMLAbstractDoubleFloat.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 class XMLUTIL_EXPORT XMLDouble : public XMLAbstractDoubleFloat
 {
 public:
@@ -161,5 +166,7 @@ inline int XMLDouble::compareValues(const XMLDouble* const lValue
                                                  (const XMLAbstractDoubleFloat* const) rValue );
 }
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
 
diff --git a/src/xercesc/util/XMLEBCDICTranscoder.cpp b/src/xercesc/util/XMLEBCDICTranscoder.cpp
index 9967bcd17e827a36d1adf25055c9edacf9e253d7..bbc9aa6b1d0fbf100997308be351e921af56eac6 100644
--- a/src/xercesc/util/XMLEBCDICTranscoder.cpp
+++ b/src/xercesc/util/XMLEBCDICTranscoder.cpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -60,7 +60,7 @@
 // ---------------------------------------------------------------------------
 #include <xercesc/util/XMLEBCDICTranscoder.hpp>
 
-
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  Local const data
@@ -238,3 +238,5 @@ XMLEBCDICTranscoder::XMLEBCDICTranscoder(const  XMLCh* const    encodingName
 XMLEBCDICTranscoder::~XMLEBCDICTranscoder()
 {
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/XMLEBCDICTranscoder.hpp b/src/xercesc/util/XMLEBCDICTranscoder.hpp
index 358dc785c699e2b23063b4e3a2910e7aee767324..e6e986be5e0d21ea1dcd202b1a6b9b882e79ec14 100644
--- a/src/xercesc/util/XMLEBCDICTranscoder.hpp
+++ b/src/xercesc/util/XMLEBCDICTranscoder.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -60,6 +60,7 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/XML256TableTranscoder.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 //
 //  This class provides an implementation of the XMLTranscoder interface
@@ -101,4 +102,6 @@ private :
     void operator=(const XMLEBCDICTranscoder&);
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/XMLEnumerator.hpp b/src/xercesc/util/XMLEnumerator.hpp
index 98c047c3ebbed405ec1749c913642abb77bdff1d..15d69b09827d91beeb3c62b5420a61033173e8cd 100644
--- a/src/xercesc/util/XMLEnumerator.hpp
+++ b/src/xercesc/util/XMLEnumerator.hpp
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.3  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.2  2002/08/21 17:45:00  tng
  * [Bug 7087] compiler warnings when using gcc.
  *
@@ -87,6 +90,8 @@
 
 #include <xercesc/util/XercesDefs.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 template <class TElem> class XMLEnumerator
 {
 public :
@@ -103,4 +108,6 @@ public :
     virtual void Reset() = 0;
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/XMLExceptMsgs.hpp b/src/xercesc/util/XMLExceptMsgs.hpp
index 280205ada28a2cac99b0aa97d54539f91e338b6a..75b4d9c0e04f67a95a5e49892ca751d87ea824a7 100644
--- a/src/xercesc/util/XMLExceptMsgs.hpp
+++ b/src/xercesc/util/XMLExceptMsgs.hpp
@@ -3,6 +3,10 @@
 #if !defined(ERRHEADER_XMLExcepts)
 #define ERRHEADER_XMLExcepts
 
+#include <xercesc/util/XercesDefs.hpp>
+
+XERCES_CPP_NAMESPACE_BEGIN
+
 class XMLExcepts
 {
 public :
@@ -371,5 +375,8 @@ public :
     };
 
 };
+
+XERCES_CPP_NAMESPACE_END
+
 #endif
 
diff --git a/src/xercesc/util/XMLException.cpp b/src/xercesc/util/XMLException.cpp
index f2aa398a94077a9ba9281eaa73f965fbac43e3f0..96a962e51ae0501551b3a084600fd94a8e0e4e7d 100644
--- a/src/xercesc/util/XMLException.cpp
+++ b/src/xercesc/util/XMLException.cpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -71,6 +71,7 @@
 #include <xercesc/util/XMLUniDefs.hpp>
 #include <xercesc/util/XMLUni.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  Local data
@@ -79,7 +80,7 @@
 //      For now, if we cannot load an exception message, we load up the
 //      default.
 // ---------------------------------------------------------------------------
-static const XMLCh  gDefErrMsg[] = 
+static const XMLCh  gDefErrMsg[] =
 {
         chLatin_C, chLatin_o, chLatin_u, chLatin_l, chLatin_d
     ,   chSpace, chLatin_n, chLatin_o, chLatin_t, chSpace
@@ -122,7 +123,7 @@ static XMLMutex& gMsgMutex()
             // This is the real mutex.  Register it for cleanup at Termination.
 			msgMutexCleanup.registerCleanup(XMLException::reinitMsgMutex);
         }
-        
+
     }
 
     return *sMsgMutex;
@@ -150,7 +151,7 @@ static XMLMsgLoader& gGetMsgLoader()
         //
         msgLoaderCleanup.registerCleanup(XMLException::reinitMsgLoader);
     }
-    
+
     // We got it, so return it
     return *sMsgLoader;
 }
@@ -327,3 +328,5 @@ void XMLException::reinitMsgLoader()
 	delete sMsgLoader;
 	sMsgLoader = 0;
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/XMLException.hpp b/src/xercesc/util/XMLException.hpp
index d852a4eb7df79def98305b4c4afa07da318299c3..54ab501f988d414be66cd6485cb1791571af611d 100644
--- a/src/xercesc/util/XMLException.hpp
+++ b/src/xercesc/util/XMLException.hpp
@@ -66,6 +66,7 @@
 #include <xercesc/util/XMLUni.hpp>
 #include <xercesc/framework/XMLErrorReporter.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  This is the base class from which all the XML parser exceptions are
@@ -298,4 +299,6 @@ private : \
 
 #define ThrowXML4(type,code,p1,p2,p3,p4) throw type(__FILE__, __LINE__, code, p1, p2, p3, p4)
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/XMLFloat.cpp b/src/xercesc/util/XMLFloat.cpp
index 075db9d0e95122c2fb7d1b4607d407f1fabc2af5..84a06de8ff6cbb9185bdcb8da04a11ea8b71cc83 100644
--- a/src/xercesc/util/XMLFloat.cpp
+++ b/src/xercesc/util/XMLFloat.cpp
@@ -57,6 +57,9 @@
 /*
  * $Id$
  * $Log$
+ * Revision 1.4  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.3  2002/09/24 19:51:24  tng
  * Performance: use XMLString::equals instead of XMLString::compareString
  *
@@ -117,6 +120,8 @@
 #include <xercesc/util/XMLUniDefs.hpp>
 #include <xercesc/util/NumberFormatException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 // ---------------------------------------------------------------------------
 //  local data member
 // ---------------------------------------------------------------------------
@@ -296,3 +301,5 @@ void XMLFloat::reinitXMLFloat() {
     maxPositiveValue = 0;
 
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/XMLFloat.hpp b/src/xercesc/util/XMLFloat.hpp
index 52c7cd62fdca6e7bd329ee5d6f5861aabfdbec07..97855deaedfd125d9d834e62bbf316143b7d2d1f 100644
--- a/src/xercesc/util/XMLFloat.hpp
+++ b/src/xercesc/util/XMLFloat.hpp
@@ -57,6 +57,9 @@
 /*
  * $Id$
  * $Log$
+ * Revision 1.3  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.2  2002/02/20 18:17:02  tng
  * [Bug 5977] Warnings on generating apiDocs.
  *
@@ -95,6 +98,8 @@
 
 #include <xercesc/util/XMLAbstractDoubleFloat.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 class XMLUTIL_EXPORT XMLFloat : public XMLAbstractDoubleFloat
 {
 public:
@@ -155,5 +160,7 @@ inline int XMLFloat::compareValues(const XMLFloat* const lValue
                                                  (const XMLAbstractDoubleFloat* const) rValue );
 }
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
 
diff --git a/src/xercesc/util/XMLIBM1140Transcoder.cpp b/src/xercesc/util/XMLIBM1140Transcoder.cpp
index 561b1862ff2bb4abfc132f8f77a71b8fff9bfcfe..c70aa7a8f6e7de5b740db37e4b1a8bb1606717f7 100644
--- a/src/xercesc/util/XMLIBM1140Transcoder.cpp
+++ b/src/xercesc/util/XMLIBM1140Transcoder.cpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -60,7 +60,7 @@
 // ---------------------------------------------------------------------------
 #include <xercesc/util/XMLIBM1140Transcoder.hpp>
 
-
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  Local const data
@@ -240,3 +240,4 @@ XMLIBM1140Transcoder::~XMLIBM1140Transcoder()
 {
 }
 
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/XMLIBM1140Transcoder.hpp b/src/xercesc/util/XMLIBM1140Transcoder.hpp
index 037d00bf47d833e58f519e35fb24569a5c5e8b0d..3c97a084101111fb78e447b20060b1b0de1be50b 100644
--- a/src/xercesc/util/XMLIBM1140Transcoder.hpp
+++ b/src/xercesc/util/XMLIBM1140Transcoder.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
- * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights 
+ *
+ * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -60,6 +60,7 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/XML256TableTranscoder.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 //
 //  This class provides an implementation of the XMLTranscoder interface
@@ -99,4 +100,6 @@ private :
     void operator=(const XMLIBM1140Transcoder&);
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/XMLInteger.hpp b/src/xercesc/util/XMLInteger.hpp
index d8d1fd9224cb56fa34552b141c31ba6656b2d101..76e25677e1b79b9689a53ac927a31fde0c400d97 100644
--- a/src/xercesc/util/XMLInteger.hpp
+++ b/src/xercesc/util/XMLInteger.hpp
@@ -57,8 +57,11 @@
 /*
  * $Id$
  * $Log$
- * Revision 1.1  2002/02/01 22:22:15  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:15  peiyongz
+ * sane_include
  *
  * Revision 1.1  2001/08/16 21:53:52  peiyongz
  * new class creation
@@ -68,14 +71,18 @@
 #ifndef XML_INTEGER_HPP
 #define XML_INTEGER_HPP
 
+#include <xercesc/util/XercesDefs.hpp>
+
+XERCES_CPP_NAMESPACE_BEGIN
+
 class XMLUTIL_EXPORT XMLInteger
 {
 public:
 
 	/**
-	 * Constructs a newly allocated <code>XMLInteger</code> object 
+	 * Constructs a newly allocated <code>XMLInteger</code> object
      *
-	 * @param      intVal   the <code>integer</code> 
+	 * @param      intVal   the <code>integer</code>
 	 */
 
 	XMLInteger(const int intVal);
@@ -114,4 +121,6 @@ inline int XMLInteger::intValue() const
     return fData;
 }
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/XMLMsgLoader.hpp b/src/xercesc/util/XMLMsgLoader.hpp
index caa91a490f136cc8e6dc03ac7029abdb2c0d8da3..7a43d1d3750b67409b5573030b3ef5b4425f3ce5 100644
--- a/src/xercesc/util/XMLMsgLoader.hpp
+++ b/src/xercesc/util/XMLMsgLoader.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:15  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:15  peiyongz
+ * sane_include
  *
  * Revision 1.5  2000/03/28 19:43:20  roddey
  * Fixes for signed/unsigned warnings. New work for two way transcoding
@@ -88,6 +91,8 @@
 
 #include <xercesc/util/XercesDefs.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 //
 //  This header defines an abstract message loading API. This is the API via
 //  which the parser system loads translatable text, and there can be multiple
@@ -233,4 +238,6 @@ inline void XMLMsgLoader::setLanguageName(XMLCh* const nameToAdopt)
     fLanguage = nameToAdopt;
 }
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/XMLNetAccessor.hpp b/src/xercesc/util/XMLNetAccessor.hpp
index 7777db59e7d700dedd3892a39ded54b7c82f2553..de99612c4567ad7caa5ed70e4db490053b9520a4 100644
--- a/src/xercesc/util/XMLNetAccessor.hpp
+++ b/src/xercesc/util/XMLNetAccessor.hpp
@@ -65,6 +65,7 @@
 #include <xercesc/util/XMLURL.hpp>
 #include <xercesc/util/XMLException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 class BinInputStream;
 
@@ -124,5 +125,6 @@ private :
 
 MakeXMLException(NetAccessorException, XMLUTIL_EXPORT)
 
+XERCES_CPP_NAMESPACE_END
 
 #endif
diff --git a/src/xercesc/util/XMLNumber.cpp b/src/xercesc/util/XMLNumber.cpp
index 0c4342e3bb17aac48fe6b8fe412dc464672597c4..29a70c8b713e5fe61fbf8d80174a2f5b871c3f3a 100644
--- a/src/xercesc/util/XMLNumber.cpp
+++ b/src/xercesc/util/XMLNumber.cpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 2001 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -57,8 +57,11 @@
 /*
  * $Id$
  * $Log$
- * Revision 1.1  2002/02/01 22:22:15  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:15  peiyongz
+ * sane_include
  *
  * Revision 1.2  2001/10/09 21:28:28  peiyongz
  * explicit ctor/dtor defined.
@@ -73,6 +76,7 @@
 // ---------------------------------------------------------------------------
 #include <xercesc/util/XMLNumber.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 XMLNumber::XMLNumber()
 {}
@@ -80,3 +84,4 @@ XMLNumber::XMLNumber()
 XMLNumber::~XMLNumber()
 {}
 
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/XMLNumber.hpp b/src/xercesc/util/XMLNumber.hpp
index f3f9636886162e9ae41daf65a9e6bf1b662fdf2f..310ce45181159e8123f435758cf93d85b00a0057 100644
--- a/src/xercesc/util/XMLNumber.hpp
+++ b/src/xercesc/util/XMLNumber.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 2001 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -57,8 +57,11 @@
 /*
  * $Id$
  * $Log$
- * Revision 1.1  2002/02/01 22:22:15  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:15  peiyongz
+ * sane_include
  *
  * Revision 1.2  2001/10/09 21:28:28  peiyongz
  * explicit ctor/dtor defined.
@@ -73,6 +76,8 @@
 
 #include <xercesc/util/XercesDefs.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 class XMLUTIL_EXPORT XMLNumber
 {
 public:
@@ -81,12 +86,12 @@ public:
 
 	/**
 	 *  Return string representation of the decimal value.
-     *  A decimal point will be included as necessary, 
-     *  the caller of this method is responsible for the 
+     *  A decimal point will be included as necessary,
+     *  the caller of this method is responsible for the
      *  de-allocation of the memory.
 	 */
     virtual XMLCh*     toString() const = 0;
-        
+
 	/**
 	 * Returns the sign of this number
      *
@@ -103,4 +108,6 @@ protected:
 
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/XMLRegisterCleanup.hpp b/src/xercesc/util/XMLRegisterCleanup.hpp
index b4cad91e7f6a963772a0c73d4605e1963b1134a9..e4f916030b86f531b4825d0fa7f85732a2e100d3 100644
--- a/src/xercesc/util/XMLRegisterCleanup.hpp
+++ b/src/xercesc/util/XMLRegisterCleanup.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -57,8 +57,11 @@
 /*
  * $Id$
  * $Log$
- * Revision 1.1  2002/02/01 22:22:15  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:15  peiyongz
+ * sane_include
  *
  * Revision 1.4  2001/10/25 21:55:29  peiyongz
  * copy ctor explicity declared private to prevent supprise.
@@ -74,6 +77,8 @@
 
 #include <xercesc/util/Mutexes.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 // This is a mutex for exclusive use by this class
 extern XMLMutex* gXMLCleanupListMutex;
 
@@ -83,11 +88,11 @@ extern XMLMutex* gXMLCleanupListMutex;
 class XMLRegisterCleanup;
 extern XMLRegisterCleanup* gXMLCleanupList;
 
-// 
+//
 //  For internal use only.
 //
-//  This class is used by the platform utilities class to support 
-//  reinitialisation of global/static data which is lazily created. 
+//  This class is used by the platform utilities class to support
+//  reinitialisation of global/static data which is lazily created.
 //  Since that data is widely spread out the platform utilities
 //  class cannot know about them directly. So, the code that creates such
 //  objects creates an registers a cleanup for the object. The platform
@@ -105,7 +110,7 @@ public :
 	void doCleanup() {
 		// When performing cleanup, we only do this once, but we can
 		// cope if somehow we have been called twice.
-		if (m_cleanupFn) 
+		if (m_cleanupFn)
             m_cleanupFn();
 
         // We need to remove "this" from the list
@@ -121,7 +126,7 @@ public :
 		// Store the cleanup function
 		m_cleanupFn = cleanupFn;
 		
-		// Add this object to the list head, if it is not already 
+		// Add this object to the list head, if it is not already
 		// present - which it shouldn't be.
 		// This is done under a mutex to ensure thread safety.
 		gXMLCleanupListMutex->lock();
@@ -129,7 +134,7 @@ public :
 			m_nextCleanup = gXMLCleanupList;
 			gXMLCleanupList = this;
 
-			if (m_nextCleanup) 
+			if (m_nextCleanup)
 				m_nextCleanup->m_prevCleanup = this;
 		}
 		gXMLCleanupListMutex->unlock();
@@ -146,9 +151,9 @@ public :
         // To protect against some compiler's (eg hp11) optimization
         // to change "this" as they update gXMLCleanupList
         //
-        // refer to 
+        // refer to
         // void XMLPlatformUtils::Terminate()
-        //       ... 
+        //       ...
         //       while (gXMLCleanupList)
 		//            gXMLCleanupList->doCleanup();
         //
@@ -196,4 +201,6 @@ private:
 	}
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/XMLString.cpp b/src/xercesc/util/XMLString.cpp
index 83b9b29f969cf4ab32c182ca8fc098851fbcf0b8..cc87784ce93cceb0fca7248ca80c865b6693b702 100644
--- a/src/xercesc/util/XMLString.cpp
+++ b/src/xercesc/util/XMLString.cpp
@@ -80,6 +80,7 @@
 #include <xercesc/util/XMLUni.hpp>
 #include <xercesc/internal/XMLReader.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  Local static data
@@ -1819,3 +1820,5 @@ void XMLString::termString()
     delete gTranscoder;
     gTranscoder = 0;
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/XMLString.hpp b/src/xercesc/util/XMLString.hpp
index f2d6e8e567fbbecf1c8223b015c3e9fa2e60e0f4..32e4da3a7c87d2d1c68dfa5770d15baa4bc14608 100644
--- a/src/xercesc/util/XMLString.hpp
+++ b/src/xercesc/util/XMLString.hpp
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.7  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.6  2002/10/01 19:45:22  tng
  * Performance in XMLString::equals, only need to check one string for null as they are equal already.
  *
@@ -205,6 +208,8 @@
 #include <xercesc/util/RefVectorOf.hpp>
 #include <xercesc/framework/XMLBuffer.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 class XMLLCPTranscoder;
 
 /**
@@ -1481,5 +1486,6 @@ inline bool XMLString::equals(   const   XMLCh* const    str1
     return false;
 }
 
+XERCES_CPP_NAMESPACE_END
 
 #endif
diff --git a/src/xercesc/util/XMLStringTokenizer.cpp b/src/xercesc/util/XMLStringTokenizer.cpp
index 30d0b7ccb199a3e1cc1ef05defa5614126890106..cd4492c3b50316f44f6f3cdfb11f2230c50946b6 100644
--- a/src/xercesc/util/XMLStringTokenizer.cpp
+++ b/src/xercesc/util/XMLStringTokenizer.cpp
@@ -56,8 +56,11 @@
 
 /*
  * $Log$
- * Revision 1.1  2002/02/01 22:22:16  peiyongz
- * Initial revision
+ * Revision 1.2  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
+ * Revision 1.1.1.1  2002/02/01 22:22:16  peiyongz
+ * sane_include
  *
  * Revision 1.1  2001/06/11 15:15:46  knoaman
  * StringTokenizer renamed to XMLStringTokenizer.
@@ -70,6 +73,7 @@
 #include <xercesc/util/XMLStringTokenizer.hpp>
 #include <xercesc/util/XMLUniDefs.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  XMLStringTokenizer: Local const data
@@ -179,6 +183,7 @@ bool XMLStringTokenizer::hasMoreTokens() {
 	return false;
 }
 
+XERCES_CPP_NAMESPACE_END
 
 /**
   * End of file XMLStringTokenizer.cpp
diff --git a/src/xercesc/util/XMLStringTokenizer.hpp b/src/xercesc/util/XMLStringTokenizer.hpp
index f8b15c511afaf2114b896bcfe37afbdca5144524..ab764c9b369ea0bd888db1219cc61c0d3ace6afd 100644
--- a/src/xercesc/util/XMLStringTokenizer.hpp
+++ b/src/xercesc/util/XMLStringTokenizer.hpp
@@ -64,6 +64,8 @@
 #include <xercesc/util/RefVectorOf.hpp>
 #include <xercesc/util/XMLString.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 /**
   * The string tokenizer class breaks a string into tokens.
   *
@@ -242,6 +244,8 @@ inline int XMLStringTokenizer::countTokens() {
     return tokCount;
 }
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
 
 /**
diff --git a/src/xercesc/util/XMLUCS4Transcoder.hpp b/src/xercesc/util/XMLUCS4Transcoder.hpp
index 40ad1cf7d0d3aca2d857bf6513fc5bfe9c6344ee..1d547129ea83cdf81252046ff1ecb1364f2c883e 100644
--- a/src/xercesc/util/XMLUCS4Transcoder.hpp
+++ b/src/xercesc/util/XMLUCS4Transcoder.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -60,6 +60,7 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/TransService.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 //
 //  This class provides an implementation of the XMLTranscoder interface
@@ -132,4 +133,6 @@ private :
     bool    fSwapped;
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/XMLUCSTranscoder.cpp b/src/xercesc/util/XMLUCSTranscoder.cpp
index 77ef96e4285ebea0cf55fb8f8a95cb06bf6cc088..366b4662e1422e5cac2a6aecb5429cb4b7548a4a 100644
--- a/src/xercesc/util/XMLUCSTranscoder.cpp
+++ b/src/xercesc/util/XMLUCSTranscoder.cpp
@@ -63,7 +63,7 @@
 #include <xercesc/util/TranscodingException.hpp>
 #include <string.h>
 
-
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  XMLUCS4Transcoder: Constructors and Destructor
@@ -283,3 +283,5 @@ bool XMLUCS4Transcoder::canTranscodeTo(const unsigned int toCheck) const
     // We can handle anything
     return true;
 }
+
+XERCES_CPP_NAMESPACE_END
diff --git a/src/xercesc/util/XMLURL.cpp b/src/xercesc/util/XMLURL.cpp
index ebc50115a16abd892329431586422157ff24ef34..39bb8fe22e14fbee1ccbdf0039d0bc9bf9eae400 100644
--- a/src/xercesc/util/XMLURL.cpp
+++ b/src/xercesc/util/XMLURL.cpp
@@ -73,6 +73,8 @@
 #include <xercesc/util/XMLUniDefs.hpp>
 #include <xercesc/util/XMLUni.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 
 
 // ---------------------------------------------------------------------------
@@ -1208,3 +1210,6 @@ void XMLURL::weavePaths(const XMLCh* const basePart)
     janBuf.orphan();
     fPath = tmpBuf;
 }
+
+XERCES_CPP_NAMESPACE_END
+
diff --git a/src/xercesc/util/XMLURL.hpp b/src/xercesc/util/XMLURL.hpp
index 161455b42e2e8d35e99f762f7f919bef11d5d2cd..13349b6485f5023b812b1cb9d93c1736f51fa2e4 100644
--- a/src/xercesc/util/XMLURL.hpp
+++ b/src/xercesc/util/XMLURL.hpp
@@ -64,6 +64,8 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/XMLException.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 class BinInputStream;
 
 //
@@ -304,5 +306,7 @@ inline const XMLCh* XMLURL::getURLText() const
 
 MakeXMLException(MalformedURLException, XMLUTIL_EXPORT)
 
+XERCES_CPP_NAMESPACE_END
+
 
 #endif
diff --git a/src/xercesc/util/XMLUTF16Transcoder.cpp b/src/xercesc/util/XMLUTF16Transcoder.cpp
index 2a21691332642fa04033c3e409e7c3eabcb1e540..f1f24c7afd2d8924a71ec35d59790f195e0c0030 100644
--- a/src/xercesc/util/XMLUTF16Transcoder.cpp
+++ b/src/xercesc/util/XMLUTF16Transcoder.cpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -63,6 +63,8 @@
 #include <xercesc/util/TranscodingException.hpp>
 #include <string.h>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 
 
 // ---------------------------------------------------------------------------
@@ -238,3 +240,6 @@ bool XMLUTF16Transcoder::canTranscodeTo(const unsigned int toCheck) const
     // We can handle anything
     return true;
 }
+
+XERCES_CPP_NAMESPACE_END
+
diff --git a/src/xercesc/util/XMLUTF16Transcoder.hpp b/src/xercesc/util/XMLUTF16Transcoder.hpp
index d7aaf8b7ea434f012bf1c2d4de8aca3f3c574d1e..57d09b03f71e208c0bfe7b66c46f2ada55e5f799 100644
--- a/src/xercesc/util/XMLUTF16Transcoder.hpp
+++ b/src/xercesc/util/XMLUTF16Transcoder.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -60,6 +60,8 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/TransService.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 
 //
 //  This class provides an implementation of the XMLTranscoder interface
@@ -132,4 +134,6 @@ private :
     bool    fSwapped;
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/XMLUTF8Transcoder.cpp b/src/xercesc/util/XMLUTF8Transcoder.cpp
index f0dc15a975d08a9ecbe40ff19d8f7aeb84948028..3d921b72bdf0507b18e57416ee413caacc90373e 100644
--- a/src/xercesc/util/XMLUTF8Transcoder.cpp
+++ b/src/xercesc/util/XMLUTF8Transcoder.cpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -68,6 +68,8 @@
 #include <xercesc/util/UTFDataFormatException.hpp>
 
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 // ---------------------------------------------------------------------------
 //  Local static data
 //
@@ -159,8 +161,8 @@ XMLUTF8Transcoder::transcodeFrom(const  XMLByte* const          srcData
     XMLCh*          outEnd = outPtr + maxChars;
     unsigned char*  sizePtr = charSizes;
 
- 
-    
+
+
     //
     //  We now loop until we either run out of input data, or room to store
     //  output chars.
@@ -402,3 +404,6 @@ bool XMLUTF8Transcoder::canTranscodeTo(const unsigned int toCheck) const
     // We can represent anything in the Unicode (with surrogates) range
     return (toCheck <= 0x10FFFF);
 }
+
+XERCES_CPP_NAMESPACE_END
+
diff --git a/src/xercesc/util/XMLUTF8Transcoder.hpp b/src/xercesc/util/XMLUTF8Transcoder.hpp
index 6dee037b1263e8a89d5a51c1f6de14adbb5d2a59..a68d4b8cf93877112fa3f0748b20c57bce8994c8 100644
--- a/src/xercesc/util/XMLUTF8Transcoder.hpp
+++ b/src/xercesc/util/XMLUTF8Transcoder.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -60,6 +60,8 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/TransService.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 //
 //  This class provides an implementation of the XMLTranscoder interface
 //  for a simple UTF8 transcoder. The parser does some encodings
@@ -120,4 +122,6 @@ private :
     void operator=(const XMLUTF8Transcoder&);
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/XMLUni.cpp b/src/xercesc/util/XMLUni.cpp
index 5834e8bbcd6df570620c39a22348e8cdd1f90e7d..d148af072f0a77115a98e4f8cb89e21be84cd304 100644
--- a/src/xercesc/util/XMLUni.cpp
+++ b/src/xercesc/util/XMLUni.cpp
@@ -66,6 +66,7 @@
 #include <xercesc/util/XMLUniDefs.hpp>
 #include <xercesc/util/XMLUni.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 // ---------------------------------------------------------------------------
 //  XMLUni: Static data
@@ -1197,3 +1198,6 @@ const XMLCh XMLUni::fgDOMWRTWhitespaceInElementContent[] =
 	chLatin_e, chLatin_n, chLatin_t, chDash,    chLatin_c, chLatin_o,
 	chLatin_n, chLatin_t, chLatin_e, chLatin_n, chLatin_t, chNull
 };
+
+XERCES_CPP_NAMESPACE_END
+
diff --git a/src/xercesc/util/XMLUni.hpp b/src/xercesc/util/XMLUni.hpp
index ccbb7792fb029f49dfcc7982fb6fd1ec2ac34325..97595b481e7ed7272293dff079c39513762e3d14 100644
--- a/src/xercesc/util/XMLUni.hpp
+++ b/src/xercesc/util/XMLUni.hpp
@@ -72,6 +72,7 @@
 
 #include <xercesc/util/XercesDefs.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
 
 class XMLUTIL_EXPORT XMLUni
 {
@@ -266,4 +267,6 @@ public :
 
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/XMLUniDefs.hpp b/src/xercesc/util/XMLUniDefs.hpp
index 6da58dfb6a056fc2d1b95e53a5c8167c1e3bd761..c8e9a458808626c46f7d981277c3574a73995b7b 100644
--- a/src/xercesc/util/XMLUniDefs.hpp
+++ b/src/xercesc/util/XMLUniDefs.hpp
@@ -62,6 +62,8 @@
 
 #include <xercesc/util/XercesDefs.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 // ---------------------------------------------------------------------------
 //  Constants for the Unicode characters of interest to us in an XML parser
 //  We don't put these inside the class because then they could not be const
@@ -185,4 +187,6 @@ const XMLCh chWonSign               = 0x20A9;
 const XMLCh chLineSeparator         = 0x2028;
 const XMLCh chParagraphSeparator    = 0x2029;
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/XMLUri.cpp b/src/xercesc/util/XMLUri.cpp
index 5bb147b43d8d2c461a41659fe161275f3d53a96a..ec71810c155169c4b9de2cfc977d56c591ad4892 100644
--- a/src/xercesc/util/XMLUri.cpp
+++ b/src/xercesc/util/XMLUri.cpp
@@ -69,6 +69,8 @@
 #include <xercesc/util/XMLUniDefs.hpp>
 #include <xercesc/util/XMLUni.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 // ---------------------------------------------------------------------------
 //  XMLUri: static data
 // ---------------------------------------------------------------------------
@@ -1441,3 +1443,5 @@ void XMLUri::buildFullText()
     *outPtr = 0;
 }
 
+XERCES_CPP_NAMESPACE_END
+
diff --git a/src/xercesc/util/XMLUri.hpp b/src/xercesc/util/XMLUri.hpp
index 917d8d507958f0b890816342685379b7b94b8b63..acf64547b46a90757a0b64de5f6ed8cd4f9e65d3 100644
--- a/src/xercesc/util/XMLUri.hpp
+++ b/src/xercesc/util/XMLUri.hpp
@@ -57,6 +57,9 @@
 /*
  * $Id$
  * $Log$
+ * Revision 1.5  2002/11/04 15:22:05  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.4  2002/09/23 18:41:00  tng
  * DOM L3: Support baseURI.   Add fURIText to XMLUri.   Added by Gareth Reakes and Thomas Ford.
  *
@@ -89,6 +92,8 @@
 #include <xercesc/util/XMLUniDefs.hpp>
 #include <xercesc/util/XMLString.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 /*
  * This class is a direct port of Java's URI class, to distinguish
  * itself from the XMLURL, we use the name XMLUri instead of
@@ -531,4 +536,6 @@ inline bool XMLUri::isUnreservedCharacter(const XMLCh theChar)
             XMLString::indexOf(MARK_CHARACTERS, theChar) != -1);
 }
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/src/xercesc/util/XMLWin1252Transcoder.cpp b/src/xercesc/util/XMLWin1252Transcoder.cpp
index 1924bcb7e1dafd7a5893956ff3116a59a2c2294b..17ae5d5db1a0ff9af0c4af344b009af172c4960c 100644
--- a/src/xercesc/util/XMLWin1252Transcoder.cpp
+++ b/src/xercesc/util/XMLWin1252Transcoder.cpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -60,6 +60,8 @@
 // ---------------------------------------------------------------------------
 #include <xercesc/util/XMLWin1252Transcoder.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 
 // ---------------------------------------------------------------------------
 //  Local const data
@@ -228,3 +230,5 @@ XMLWin1252Transcoder::~XMLWin1252Transcoder()
 {
 }
 
+XERCES_CPP_NAMESPACE_END
+
diff --git a/src/xercesc/util/XMLWin1252Transcoder.hpp b/src/xercesc/util/XMLWin1252Transcoder.hpp
index 3958f01c02db9b61fbb6f694c73cb0de7b28eb99..98796488a48c6ccc437629df572fc7f394ab7ab3 100644
--- a/src/xercesc/util/XMLWin1252Transcoder.hpp
+++ b/src/xercesc/util/XMLWin1252Transcoder.hpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -60,6 +60,8 @@
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/XML256TableTranscoder.hpp>
 
+XERCES_CPP_NAMESPACE_BEGIN
+
 
 //
 //  This class provides an implementation of the XMLTranscoder interface
@@ -90,4 +92,6 @@ private :
     void operator=(const XMLWin1252Transcoder&);
 };
 
+XERCES_CPP_NAMESPACE_END
+
 #endif
diff --git a/tests/DOM/DOMTest/DTest.h b/tests/DOM/DOMTest/DTest.h
index 58a73fcdadef61a833a99e5f65e5f6d4fac87837..8d1493fcf1a46fcfcdeb5e0332d1d7489117110e 100644
--- a/tests/DOM/DOMTest/DTest.h
+++ b/tests/DOM/DOMTest/DTest.h
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.10  2002/11/04 15:23:43  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.9  2002/09/23 20:09:23  tng
  * DOM L3: Test baseURI with different parser's setting.
  *
@@ -92,7 +95,9 @@
 //  define null for compatibility with original Java source code.
 #define null 0
 
+XERCES_CPP_NAMESPACE_BEGIN
 class XercesDOMParser;
+XERCES_CPP_NAMESPACE_END
 
 class DOMTest {
 public:
diff --git a/tests/DOM/DeprecatedDOMCount/DeprecatedDOMCount.hpp b/tests/DOM/DeprecatedDOMCount/DeprecatedDOMCount.hpp
index e08875c5150a3a8e65e17224a2945001bc5ee047..108198f4677ec8abcf83c8304782d133ff18b066 100644
--- a/tests/DOM/DeprecatedDOMCount/DeprecatedDOMCount.hpp
+++ b/tests/DOM/DeprecatedDOMCount/DeprecatedDOMCount.hpp
@@ -64,7 +64,9 @@
 #include <xercesc/sax/ErrorHandler.hpp>
 #include <iostream.h>
 
+XERCES_CPP_NAMESPACE_BEGIN
 class SAXParseException;
+XERCES_CPP_NAMESPACE_END
 
 
 // ---------------------------------------------------------------------------
diff --git a/tests/InitTermTest/InitTermTest.hpp b/tests/InitTermTest/InitTermTest.hpp
index aa8bd66170bfe5a545529bfdfe173d91850d2bde..f1b50c241502172476d2f26a7ba0c87c4c25478d 100644
--- a/tests/InitTermTest/InitTermTest.hpp
+++ b/tests/InitTermTest/InitTermTest.hpp
@@ -64,7 +64,9 @@
 #include <xercesc/sax/ErrorHandler.hpp>
 #include <iostream.h>
 
+XERCES_CPP_NAMESPACE_BEGIN
 class SAXParseException;
+XERCES_CPP_NAMESPACE_END
 
 
 // ---------------------------------------------------------------------------
diff --git a/tests/ThreadTest/ThreadTest.cpp b/tests/ThreadTest/ThreadTest.cpp
index 27599e5d717423b33c1d9c6f75ee85a6f0699b47..f013357221207fba14eb27e5a24ffc74f94fe532 100644
--- a/tests/ThreadTest/ThreadTest.cpp
+++ b/tests/ThreadTest/ThreadTest.cpp
@@ -288,7 +288,7 @@ private:
     int           fCheckSum;
     SAXParser*    fSAXParser;
     XercesDOMParser*    fXercesDOMParser;
-    DOMDocument * fDoc;
+    XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * fDoc;
 
 
 public:                               //  This is the API used by the rest of the test program
diff --git a/tools/IANACharset/IANACharset.cpp b/tools/IANACharset/IANACharset.cpp
index f520b16a983d84eb86bb1a019b8719528801d4f9..7948029d8ef905a9f0bc5b324e0feee21eed0c09 100644
--- a/tools/IANACharset/IANACharset.cpp
+++ b/tools/IANACharset/IANACharset.cpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 2002 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -57,6 +57,9 @@
 
 /*
  * $Log$
+ * Revision 1.2  2002/11/04 15:24:50  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.1  2002/07/18 20:15:32  knoaman
  * Initial checkin: feature to control strict IANA encoding name.
  *
@@ -210,6 +213,10 @@ static void startOutput(const XMLCh* const outPath)
           L"//  This file was generated from the IANA charset source.\n"
           L"//  so do not edit this file directly!!\n"
           L"// ----------------------------------------------------------------\n\n"
+          L"#if !defined(IANAENCODINGS_HPP)\n"
+          L"#define IANAENCODINGS_HPP\n\n"
+          L"#include <xercesc/util/XercesDefs.hpp>\n\n"
+          L"XERCES_CPP_NAMESPACE_BEGIN\n\n"
     );
 
     //
@@ -252,6 +259,13 @@ static void endOutput(const unsigned int encCount)
     // Output the const size value
     fwprintf(gOutFile, L"const unsigned int gEncodingArraySize = %d;\n\n", encCount);
 
+    fwprintf
+    (
+        gOutFile
+        , L"XERCES_CPP_NAMESPACE_END\n\n"
+          L"#endif\n\n"
+    );
+
     // Close the output file
     fclose(gOutFile);
 }
diff --git a/tools/NLS/Xlat/Xlat.cpp b/tools/NLS/Xlat/Xlat.cpp
index 7b1b8020ce2e18cc73e334cabe5985aaf07f2308..b7bc990a1245a2be9f76c1af0705229c3dc17122 100644
--- a/tools/NLS/Xlat/Xlat.cpp
+++ b/tools/NLS/Xlat/Xlat.cpp
@@ -57,6 +57,9 @@
 
 /*
  * $Log$
+ * Revision 1.14  2002/11/04 15:24:50  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.13  2002/09/30 22:09:58  peiyongz
  * To generate icu resource file (in text) for error message.
  *
@@ -405,7 +408,7 @@ extern "C" int wmain(int argC, XMLCh** argV)
 
     {
         //  Nest entire code in an inner block.
-        
+
         DOMDocument* srcDoc;
         const unsigned int bufSize = 4095;
         XMLCh tmpFileBuf[bufSize + 1];
@@ -459,7 +462,7 @@ extern "C" int wmain(int argC, XMLCh** argV)
                 case OutFormat_MsgCatalog :
                     formatter = new MsgCatFormatter;
                     break;
-                
+
                 case OutFormat_ResBundle:
                     formatter = new ICUResBundFormatter;
                     break;
@@ -579,8 +582,13 @@ extern "C" int wmain(int argC, XMLCh** argV)
 
                 // If its not the exception domain, then we need a header included
                 if (XMLString::compareString(domainStr, XMLUni::fgExceptDomain))
-                    fwprintf(outHeader, L"#include <xercesc/framework/XMLErrorReporter.hpp>\n\n");
+                    fwprintf(outHeader, L"#include <xercesc/framework/XMLErrorReporter.hpp>\n");
 
+                //  Write out the namespace declaration
+                fwprintf(outHeader, L"#include <xercesc/util/XercesDefs.hpp>\n\n");
+                fwprintf(outHeader, L"XERCES_CPP_NAMESPACE_BEGIN\n\n");
+
+                //  Now the message codes
                 fwprintf(outHeader, L"class %s\n{\npublic :\n    enum Codes\n    {\n", errNameSpace);
 
                 // Tell the formatter that a new domain is starting
@@ -747,8 +755,11 @@ extern "C" int wmain(int argC, XMLCh** argV)
                     );
                 }
 
-                // And close out the class declaration and the header file
-                fwprintf(outHeader, L"};\n#endif\n\n");
+
+                // And close out the class declaration, the namespace declaration and the header file
+                fwprintf(outHeader, L"};\n\n");
+                fwprintf(outHeader, L"XERCES_CPP_NAMESPACE_END\n\n");
+                fwprintf(outHeader, L"#endif\n\n");
                 fclose(outHeader);
             }
 
diff --git a/tools/NLS/Xlat/Xlat_CppSrc.cpp b/tools/NLS/Xlat/Xlat_CppSrc.cpp
index 4b72a70c2f0d7366924c9fb7f34709b23bb99bb0..fc1a44052fb44f2fc484154076b58e1ef447541c 100644
--- a/tools/NLS/Xlat/Xlat_CppSrc.cpp
+++ b/tools/NLS/Xlat/Xlat_CppSrc.cpp
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.6  2002/11/04 15:24:50  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.5  2002/07/31 18:39:53  tng
  * [Bug 3788] very long lines in CppErrMsgs_EN_US.hpp causes problems for OS390 compiler.
  *
@@ -127,6 +130,11 @@ void CppSrcFormatter::endMsgType(const MsgTypes type)
 
 void CppSrcFormatter::endOutput()
 {
+    fwprintf
+    (
+        fOutFl,
+          L"XERCES_CPP_NAMESPACE_END\n\n"
+    );
     // Close the output file
     fclose(fOutFl);
 }
@@ -261,5 +269,7 @@ void CppSrcFormatter::startOutput(  const   XMLCh* const    locale
           L"//  This file was generated from the XML error message source.\n"
           L"//  so do not edit this file directly!!\n"
           L"// ----------------------------------------------------------------\n\n"
+          L"#include <xercesc/util/XercesDefs.hpp>\n\n"
+          L"XERCES_CPP_NAMESPACE_BEGIN\n\n"
     );
 }
diff --git a/tools/NLS/Xlat/Xlat_MsgCatalog.cpp b/tools/NLS/Xlat/Xlat_MsgCatalog.cpp
index 9c8cfaa3b5b36591da02bdbfe88bf8381e8329d1..1a33b075d4197bd5d7461b659ed364a0b216470b 100644
--- a/tools/NLS/Xlat/Xlat_MsgCatalog.cpp
+++ b/tools/NLS/Xlat/Xlat_MsgCatalog.cpp
@@ -1,37 +1,37 @@
 /*
  * The Apache Software License, Version 1.1
- * 
+ *
  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  * reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
+ *    notice, this list of conditions and the following disclaimer.
+ *
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 
+ *
  * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
+ *    if any, must include the following acknowledgment:
  *       "This product includes software developed by the
  *        Apache Software Foundation (http://www.apache.org/)."
  *    Alternately, this acknowledgment may appear in the software itself,
  *    if and wherever such third-party acknowledgments normally appear.
- * 
+ *
  * 4. The names "Xerces" and "Apache Software Foundation" must
  *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
+ *    software without prior written permission. For written
  *    permission, please contact apache\@apache.org.
- * 
+ *
  * 5. Products derived from this software may not be called "Apache",
  *    nor may "Apache" appear in their name, without prior written
  *    permission of the Apache Software Foundation.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -45,7 +45,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * ====================================================================
- * 
+ *
  * This software consists of voluntary contributions made by many
  * individuals on behalf of the Apache Software Foundation, and was
  * originally based on software copyright (c) 1999, International
@@ -56,6 +56,9 @@
 
 /*
  * $Log$
+ * Revision 1.6  2002/11/04 15:24:50  tng
+ * C++ Namespace Support.
+ *
  * Revision 1.5  2000/03/02 19:55:53  roddey
  * This checkin includes many changes done while waiting for the
  * 1.1.0 code to be finished. I can't list them all here, but a list is
@@ -133,6 +136,12 @@ void MsgCatFormatter::endMsgType(const MsgTypes type)
 
 void MsgCatFormatter::endOutput()
 {
+    fwprintf
+    (
+        fOutHpp
+        , L"\nXERCES_CPP_NAMESPACE_END\n\n"
+    );
+
     // Close the output files
     fclose(fOutFl);
     fclose(fOutHpp);
@@ -213,6 +222,17 @@ void MsgCatFormatter::startOutput(  const   XMLCh* const    locale
         throw ErrReturn_OutFileOpenFailed;
     }
 
+    fwprintf
+    (
+        fOutHpp
+        , L"// ----------------------------------------------------------------\n"
+          L"//  This file was generated from the XML error message source.\n"
+          L"//  so do not edit this file directly!!\n"
+          L"// ----------------------------------------------------------------\n\n"
+          L"#include <xercesc/util/XercesDefs.hpp>\n\n"
+          L"XERCES_CPP_NAMESPACE_BEGIN\n\n"
+    );
+
     // Reset the sequence id
     fSeqId = 1;
 }