You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2008/07/13 08:16:50 UTC

svn commit: r676264 [3/11] - in /xalan/c/trunk: Projects/Win32/Res/Localization/ Projects/Win32/VC6/AllInOne/ Projects/Win32/VC7.1/AllInOne/ Projects/Win32/VC7/AllInOne/ Projects/Win32/VC8/AllInOne/ Projects/Win32/VC8/CompileStylesheet/ Projects/Win32/...

Modified: xalan/c/trunk/src/xalanc/Harness/XalanFileUtility.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/Harness/XalanFileUtility.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/Harness/XalanFileUtility.cpp (original)
+++ xalan/c/trunk/src/xalanc/Harness/XalanFileUtility.cpp Sat Jul 12 23:16:42 2008
@@ -1022,7 +1022,7 @@
         }
 
         // Compare the lines character by charcter ....
-        unsigned int i = 0;
+        XalanSize_t     i = 0;
         while(i < strlen(gline)) 
         {
             if (gline[i] == rline[i]) 
@@ -1536,8 +1536,8 @@
     const XalanNamedNodeMap* const  docAttrs  = doc.getAttributes();
 
     // Get number of Attributes
-    const unsigned int  numGoldAttr = goldAttrs->getLength();
-    const unsigned int  numDomAttr  = docAttrs ->getLength();
+    const XalanSize_t  numGoldAttr = goldAttrs->getLength();
+    const XalanSize_t  numDomAttr  = docAttrs ->getLength();
 
     /*
     // This needs to be uncommented if 'compare.exe' is to work. 
@@ -1554,8 +1554,7 @@
     if ( numGoldAttr == numDomAttr )
     {
         // Compare Attributes one at a time.
-        //for (int i=1; i < numGoldAttr; i++)  // To be used with 'compare'
-        for (unsigned int i = 0; i < numGoldAttr; ++i)
+        for (XalanSize_t i = 0; i < numGoldAttr; ++i)
         {
             // Attribute order is irrelvant, so comparision is base on Attribute name.
             const XalanNode* const  gAttr = goldAttrs->item(i);
@@ -1588,8 +1587,8 @@
         collectData(
             "Wrong number of attributes. ",
             docNodeName,
-            UnsignedLongToDOMString(numGoldAttr, numGoldStr),
-            UnsignedLongToDOMString(numDomAttr, numDOMStr));
+            NumberToDOMString(numGoldAttr, numGoldStr),
+            NumberToDOMString(numDomAttr, numDOMStr));
 
         return false;
     }
@@ -1694,17 +1693,16 @@
     assert(docAttrs != 0);
 
     // Get number of Attributes
-    const unsigned int  numGoldAttr = goldAttrs->getLength();
-    const unsigned int  numDomAttr  = docAttrs ->getLength();
+    const XalanSize_t  numGoldAttr = goldAttrs->getLength();
+    const XalanSize_t  numDomAttr  = docAttrs ->getLength();
 
     // Check that each Element has same number of Attributes. If they don't report error  
     if ( numGoldAttr == numDomAttr )
     {
         // Compare Attributes one at a time.
-        //for (int i=1; i < numGoldAttr; i++)  // To be used with 'compare'
-        for (unsigned int i = 0; i < numGoldAttr; ++i)
+        for (XalanSize_t i = 0; i < numGoldAttr; ++i)
         {
-            // Attribute order is irrelvant, so comparision is base on Attribute name.
+            // Attribute order is irrelevant, so comparision is base on Attribute name.
             const XalanNode* const  gAttr = goldAttrs->item(i);
             const XalanDOMString&   goldAttrName = gAttr->getNodeName();
 
@@ -1735,8 +1733,8 @@
         collectData(
             "Wrong number of attributes. ",
             docNodeName,
-            UnsignedLongToDOMString(numGoldAttr, numGoldStr),
-            UnsignedLongToDOMString(numDomAttr, numDOMStr));
+            NumberToDOMString(numGoldAttr, numGoldStr),
+            NumberToDOMString(numDomAttr, numDOMStr));
 
         return false;
     }

Modified: xalan/c/trunk/src/xalanc/ICUBridge/ICUBridge.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/ICUBridge/ICUBridge.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/ICUBridge/ICUBridge.cpp (original)
+++ xalan/c/trunk/src/xalanc/ICUBridge/ICUBridge.cpp Sat Jul 12 23:16:42 2008
@@ -43,12 +43,12 @@
 #if defined(XALAN_XALANDOMCHAR_USHORT_MISMATCH)
 inline void
 doCopyData(
-			const XalanDOMChar*		theString,
-			unsigned int			theStringLength,
-			XalanDOMChar*			theBuffer)
+			const XalanDOMChar*		    theString,
+			XalanDOMString::size_type   theStringLength,
+			XalanDOMChar*			    theBuffer)
 {
 	// Copy the data, truncating each character...
-	for (unsigned int i = 0; i < theStringLength; ++i)
+	for (XalanDOMString::size_type i = 0; i < theStringLength; ++i)
 	{
 		// There should be no truncation, since XalanDOMChars
 		// hold UTF-16 code points, but assert, just in case...
@@ -63,13 +63,14 @@
 
 
 // Use a stack-based buffer up to this size.
-const unsigned int	theStackBufferSize = 200u;
+const XalanSize_t	theStackBufferSize = 200u;
 
 
 
 const UnicodeString
-ICUBridge::XalanDOMCharStringToUnicodeString(MemoryManagerType&     theManager,
-                                             const XalanDOMChar*	theString)
+ICUBridge::XalanDOMCharStringToUnicodeString(
+            MemoryManagerType&      theManager,
+            const XalanDOMChar*	    theString)
 {
 	if (theString == 0)
 	{
@@ -146,8 +147,9 @@
 
 
 const UnicodeString
-ICUBridge::XalanDOMStringToUnicodeString(MemoryManagerType&     theManager,
-                                         const XalanDOMString&	theString)
+ICUBridge::XalanDOMStringToUnicodeString(
+            MemoryManagerType&      theManager,
+            const XalanDOMString&   theString)
 {
 	// Just call up to the XalanDOMChar* version...
 	return XalanDOMCharStringToUnicodeString(theManager, c_wstr(theString), length(theString));
@@ -157,8 +159,8 @@
 
 XalanDOMString&
 ICUBridge::UnicodeStringToXalanDOMString(
-                                         const UnicodeString&	theString,
-                                         XalanDOMString&        theResult)
+            const UnicodeString&	theString,
+            XalanDOMString&         theResult)
 {
 	const int32_t	theLength = theString.length();
 

Modified: xalan/c/trunk/src/xalanc/ICUBridge/ICUBridgeCollationCompareFunctorImpl.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/ICUBridge/ICUBridgeCollationCompareFunctorImpl.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/ICUBridge/ICUBridgeCollationCompareFunctorImpl.cpp (original)
+++ xalan/c/trunk/src/xalanc/ICUBridge/ICUBridgeCollationCompareFunctorImpl.cpp Sat Jul 12 23:16:42 2008
@@ -240,7 +240,7 @@
 
 		// Since language names must be ASCII, this
 		// is the cheapest way to "transcode"...
-		for (unsigned int i = 0; i <= theLength; ++i)
+		for (XalanDOMString::size_type i = 0; i <= theLength; ++i)
 		{
 			theBuffer[i] = char(theLocale[i]);
 		}

Modified: xalan/c/trunk/src/xalanc/ICUBridge/ICUXalanNumberFormatProxy.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/ICUBridge/ICUXalanNumberFormatProxy.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/ICUBridge/ICUXalanNumberFormatProxy.cpp (original)
+++ xalan/c/trunk/src/xalanc/ICUBridge/ICUXalanNumberFormatProxy.cpp Sat Jul 12 23:16:42 2008
@@ -126,24 +126,27 @@
 
 
 
-#if defined(XALAN_SIZE_T_NOT_STANDARD_TYPE)
-
-	/**
-	 * Format a number into a string.
-	 *
-	 * @param theValue number to format
-	 * @param theResult the string result
-	 */
 XalanDOMString&
 ICUXalanNumberFormatProxy::format(
-			size_t				theValue,
+			XALAN_UINT64		theValue,
 			XalanDOMString&		theResult)
 
 {
 	// $$$ ToDo: Fix this!
 	return format(static_cast<unsigned long>(theValue), theResult);
 }
-#endif
+
+
+
+XalanDOMString&
+ICUXalanNumberFormatProxy::format(
+			XALAN_INT64		    theValue,
+			XalanDOMString&		theResult)
+
+{
+	// $$$ ToDo: Fix this!
+	return format(static_cast<long>(theValue), theResult);
+}
 
 
 

Modified: xalan/c/trunk/src/xalanc/ICUBridge/ICUXalanNumberFormatProxy.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/ICUBridge/ICUXalanNumberFormatProxy.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/ICUBridge/ICUXalanNumberFormatProxy.hpp (original)
+++ xalan/c/trunk/src/xalanc/ICUBridge/ICUXalanNumberFormatProxy.hpp Sat Jul 12 23:16:42 2008
@@ -50,27 +50,33 @@
 	~ICUXalanNumberFormatProxy();
 
 	virtual XalanDOMString&
-	format(double	        theValue,
-            XalanDOMString& theResult);
+	format(
+            double	            theValue,
+            XalanDOMString&     theResult);
 
 
 	virtual XalanDOMString&
-	format(int	            theValue,
-            XalanDOMString& theResult);
+	format(
+            int	                theValue,
+            XalanDOMString&     theResult);
 
 
 	virtual XalanDOMString&
-	format(unsigned int		theValue, XalanDOMString& theResult);
+	format(
+            unsigned int		theValue,
+            XalanDOMString&     theResult);
 
 
 	virtual XalanDOMString&
-	format(long		theValue, XalanDOMString& theResult);
+	format(
+            long		        theValue,
+            XalanDOMString&     theResult);
 
 
 	virtual XalanDOMString&
-	format(unsigned long	theValue, XalanDOMString& theResult);
-
-#if defined(XALAN_SIZE_T_NOT_STANDARD_TYPE)
+	format(
+            unsigned long	    theValue,
+            XalanDOMString&     theResult);
 
 	/**
 	 * Format a number into a string.
@@ -80,10 +86,19 @@
 	 */
 	virtual XalanDOMString&
 	format(
-			size_t				theValue,
+			XALAN_INT64	        theValue,
 			XalanDOMString&		theResult);
 
-#endif
+	/**
+	 * Format a number into a string.
+	 *
+	 * @param theValue number to format
+	 * @param theResult the string result
+	 */
+	virtual XalanDOMString&
+	format(
+			XALAN_UINT64	    theValue,
+			XalanDOMString&		theResult);
 
 	virtual bool
 	isGroupingUsed() const;

Modified: xalan/c/trunk/src/xalanc/Include/PlatformDefinitions.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/Include/PlatformDefinitions.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/Include/PlatformDefinitions.hpp (original)
+++ xalan/c/trunk/src/xalanc/Include/PlatformDefinitions.hpp Sat Jul 12 23:16:42 2008
@@ -129,7 +129,8 @@
 typedef XMLFileLoc      XalanFileLoc;
 #endif
 
-typedef XMLCh   XalanDOMChar;
+typedef XMLCh           XalanDOMChar;
+typedef unsigned int    XalanUnicodeChar;
 
 template<bool value>
 struct XalanCompileErrorBoolean
@@ -140,6 +141,11 @@
 XALAN_CPP_NAMESPACE_END
 
 
+#if !defined(XALAN_NO_LONG_LONG)
+typedef unsigned long long XALAN_UINT64;
+typedef long long  XALAN_INT64;
+#endif
+
 #define XALAN_STATIC_ASSERT(expr) XALAN_CPP_NAMESPACE_QUALIFIER XalanCompileErrorBoolean<bool(expr)>()
 
 

Modified: xalan/c/trunk/src/xalanc/Include/VCPPDefinitions.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/Include/VCPPDefinitions.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/Include/VCPPDefinitions.hpp (original)
+++ xalan/c/trunk/src/xalanc/Include/VCPPDefinitions.hpp Sat Jul 12 23:16:42 2008
@@ -19,8 +19,9 @@
 #define VCPPDEFINITIONS_HEADER_GUARD_1357924680
 
 
-#pragma warning(disable: 4127 4251 4345 4351 4511 4512 4514 4521 4702 4710 4711 4786 4097 4503 4786; error: 4150 4172 4238 4239 4715)
+#pragma warning(disable: 4127 4146 4251 4345 4351 4355 4511 4512 4514 4521 4702 4710 4711 4786 4097 4503 4786; error: 4150 4172 4238 4239 4715)
 
+#include <basetsd.h>
 
 // ---------------------------------------------------------------------------
 //  A define in the build for each project is also used to control whether
@@ -58,9 +59,12 @@
 #define XALAN_HAS_STD_DISTANCE
 #define XALAN_NO_REENTRANT_TIME_FUNCTIONS
 
-#if defined(_WIN64)
-#define XALAN_SIZE_T_NOT_STANDARD_TYPE
-#endif
+// long long is not supported on all MS compilers.
+#define XALAN_NO_LONG_LONG
+
+typedef UINT64 XALAN_UINT64;
+typedef INT64  XALAN_INT64;
+
 #define XALAN_WINDOWS
 
 #if defined(_DEBUG) && defined(NDEBUG)

Modified: xalan/c/trunk/src/xalanc/Include/XalanMemoryManagement.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/Include/XalanMemoryManagement.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/Include/XalanMemoryManagement.hpp (original)
+++ xalan/c/trunk/src/xalanc/Include/XalanMemoryManagement.hpp Sat Jul 12 23:16:42 2008
@@ -38,8 +38,8 @@
 
 
 
-typedef XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager    MemoryManagerType;
 XALAN_USING_XERCES(MemoryManager)
+typedef MemoryManager    MemoryManagerType;
 
 
 

Modified: xalan/c/trunk/src/xalanc/Include/XalanObjectCache.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/Include/XalanObjectCache.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/Include/XalanObjectCache.hpp (original)
+++ xalan/c/trunk/src/xalanc/Include/XalanObjectCache.hpp Sat Jul 12 23:16:42 2008
@@ -131,7 +131,7 @@
     explicit
     XalanObjectCache(
                 MemoryManagerType&  theManager,
-                unsigned int        initialListSize = 0) :
+                XalanSize_t         initialListSize = 0) :
         m_availableList(theManager),
         m_busyList(theManager)
     {
@@ -273,8 +273,8 @@
     typedef ObjectType  CacheObjectType;
 
     explicit
-    XalanObjectCache(MemoryManagerType& theManager,
-                    unsigned int    initialListSize = 0) :
+    XalanObjectCache(MemoryManagerType&     theManager,
+                    XalanSize_t             initialListSize = 0) :
         m_deleteFunctor(theManager),
         m_availableList(theManager)
     {
@@ -425,7 +425,7 @@
     explicit
     XalanObjectCacheDefault(
                 MemoryManagerType&  theManager,
-                unsigned int        initialListSize = 0) :
+                XalanSize_t         initialListSize = 0) :
         BaseClassType(theManager, initialListSize)
     {
     }
@@ -452,7 +452,7 @@
     explicit
     XalanMemoryManagerObjectCacheDefault(
                 MemoryManagerType&  theManager,
-                unsigned int        initialListSize = 0) :
+                XalanSize_t         initialListSize = 0) :
         BaseClassType(theManager, initialListSize)
     {
     }

Modified: xalan/c/trunk/src/xalanc/Include/XalanObjectStackCache.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/Include/XalanObjectStackCache.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/Include/XalanObjectStackCache.hpp (original)
+++ xalan/c/trunk/src/xalanc/Include/XalanObjectStackCache.hpp Sat Jul 12 23:16:42 2008
@@ -54,15 +54,15 @@
 	typedef ObjectType	CacheObjectType;
 
 	explicit
-	XalanObjectStackCache(MemoryManagerType& theManager, 
-                          unsigned int	initialListSize = 0) :
+	XalanObjectStackCache(
+            MemoryManagerType&  theManager, 
+            XalanSize_t	        initialListSize = 0) :
         m_createFunctor(),
         m_deleteFunctor(theManager),
-	m_stack(theManager),
+	    m_stack(theManager),
         m_numObjectsOnStack(0)
 	{
 		m_stack.reserve(initialListSize);
-
 	}
 
 	~XalanObjectStackCache()
@@ -154,7 +154,7 @@
 	typedef XalanObjectStackCache<ObjectType, DefaultCacheCreateFunctor<ObjectType>, DeleteFunctor<ObjectType>, DefaultCacheResetFunctor<ObjectType> >		BaseClassType;
 
 	explicit
-	XalanObjectStackCacheDefault(unsigned int	initialListSize = 0) :
+	XalanObjectStackCacheDefault(XalanSize_t    initialListSize = 0) :
 		BaseClassType(initialListSize)
 	{
 	}

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.cpp Sat Jul 12 23:16:42 2008
@@ -63,6 +63,12 @@
 
 
 
+#if defined (XALAN_STRICT_ANSI_HEADERS)
+    using std::size_t;
+#endif
+
+
+
 // The maximum number of digits that sprintf can put in a buffer.
 // 100 for now.  We're using this because we want to avoid transcoding
 // number strings when we don't have to,
@@ -340,6 +346,7 @@
 
 
 XALAN_USING_STD(ostream)
+XALAN_USING_STD(streamsize)
 
 XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(void)
 OutputString(
@@ -348,7 +355,12 @@
 {
 	if (theString.empty() == false)
 	{
-		theStream.write(&*theString.begin(), theString.size());
+        assert(
+            static_cast<XALAN_UINT64>(static_cast<streamsize>(theString.size())) == theString.size());
+
+		theStream.write(
+            &*theString.begin(),
+            static_cast<streamsize>(theString.size()));
 	}
 }
 
@@ -1345,7 +1357,7 @@
 	XALAN_USING_STD(sprintf);
 #endif
 
-	unsigned int	theCharsWritten = sprintf(theBuffer, "%p", theValue);
+	const int	theCharsWritten = sprintf(theBuffer, "%p", theValue);
 	assert(theCharsWritten != 0);
 
 	reserve(theResult, length(theResult) + theCharsWritten);
@@ -1784,7 +1796,27 @@
 
 XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(XalanDOMString&)
 NumberToDOMString(
-            unsigned long long	theValue,
+            XALAN_INT64	        theValue,
+            XalanDOMString&     theResult)
+{
+    return ScalarToDecimalString(theValue, theResult);
+}
+
+
+
+XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(XalanDOMString&)
+NumberToDOMString(
+            XALAN_UINT64	    theValue,
+            XalanDOMString&     theResult)
+{
+    return ScalarToDecimalString(theValue, theResult);
+}
+
+
+
+XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(XalanDOMString&)
+NumberToDOMString(
+            unsigned long	    theValue,
             XalanDOMString&     theResult)
 {
     return ScalarToDecimalString(theValue, theResult);

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.hpp Sat Jul 12 23:16:42 2008
@@ -766,7 +766,7 @@
 
 
 /**
- * Converts an unsigned long long value into a XalanDOMString
+ * Converts an 64-bit signed value into a XalanDOMString
  * 
  * @param theValue number to be converted
  * @param theResult the string to append with the result
@@ -774,7 +774,33 @@
  */
 XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(XalanDOMString&)
 NumberToDOMString(
-            unsigned long long  theValue,
+            XALAN_INT64         theValue,
+            XalanDOMString&     theResult);
+
+/**
+ * Converts an 64-bit unsigned value into a XalanDOMString
+ * 
+ * @param theValue number to be converted
+ * @param theResult the string to append with the result
+ * @return a reference to the passed string result.
+ */
+XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(XalanDOMString&)
+NumberToDOMString(
+            XALAN_UINT64        theValue,
+            XalanDOMString&     theResult);
+
+
+
+/**
+ * Converts an unsigned long value into a XalanDOMString
+ * 
+ * @param theValue number to be converted
+ * @param theResult the string to append with the result
+ * @return a reference to the passed string result.
+ */
+XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(XalanDOMString&)
+NumberToDOMString(
+            unsigned long       theValue,
             XalanDOMString&     theResult);
 
 
@@ -789,7 +815,11 @@
  */
 XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(XalanDOMString&)
 SizeTypeToDOMString(
-            size_t				theValue,
+#if defined (XALAN_STRICT_ANSI_HEADERS)
+            std::size_t         theValue,
+#else
+            size_t              theValue,
+#endif
             XalanDOMString&     theResult);
 
 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/StdBinInputStream.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/StdBinInputStream.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/StdBinInputStream.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/StdBinInputStream.cpp Sat Jul 12 23:16:42 2008
@@ -66,12 +66,14 @@
 	}
 	else
 	{
+        XALAN_USING_STD(streamsize)
+
+        assert(static_cast<XALAN_UINT64>(static_cast<streamsize>(maxToRead)) == maxToRead);
+
 #if !defined(XALAN_CLASSIC_IOSTREAMS)
-#if defined(XALAN_OLD_STYLE_CASTS)
-		m_stream.read((char*)toFill, maxToRead);
-#else
-		m_stream.read(reinterpret_cast<char*>(toFill), maxToRead);
-#endif
+		m_stream.read(
+            reinterpret_cast<char*>(toFill),
+            static_cast<streamsize>(maxToRead));
 #else
 		m_stream.read(toFill, maxToRead);
 #endif

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringCache.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringCache.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringCache.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringCache.cpp Sat Jul 12 23:16:42 2008
@@ -35,7 +35,7 @@
 
 XalanDOMStringCache::XalanDOMStringCache(
             MemoryManagerType&     theManager,
-            unsigned int	        theMaximumSize) :
+            XalanSize_t	            theMaximumSize) :
 	m_availableList(theManager),
     m_busyList(theManager),
 	m_maximumSize(theMaximumSize),

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringCache.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringCache.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringCache.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringCache.hpp Sat Jul 12 23:16:42 2008
@@ -45,24 +45,25 @@
 {
 public:
 
-	enum { eDefaultMaximumSize = 100 };
+	enum { eDefaultMaximumSize = 100u };
 
 	typedef XalanVector<XalanDOMString*>	StringListType;
 
 	explicit
-	XalanDOMStringCache(MemoryManagerType&     theManager,
-                        unsigned int	theMaximumSize = eDefaultMaximumSize);
+	XalanDOMStringCache(
+            MemoryManagerType&  theManager,
+            XalanSize_t	        theMaximumSize = eDefaultMaximumSize);
 
 	~XalanDOMStringCache();
 
-	unsigned int
+	XalanSize_t
 	getMaximumSize() const
 	{
 		return m_maximumSize;
 	}
 
 	void
-	setMaximumSize(unsigned int		theSize)
+	setMaximumSize(XalanSize_t	theSize)
 	{
 		m_maximumSize = theSize;
 	}
@@ -137,7 +138,7 @@
 	 */
 	StringListType	                    m_busyList;
 
-	unsigned int	                    m_maximumSize;
+	XalanSize_t	                        m_maximumSize;
 
     XalanDOMStringReusableAllocator     m_allocator;
 };

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringHashTable.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringHashTable.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringHashTable.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringHashTable.hpp Sat Jul 12 23:16:42 2008
@@ -135,7 +135,7 @@
 	 *
 	 * @param theString The string to find.
 	 * @param theLength The number of characters in the string.
-	 * @param theBucketIndex A pointer to an unsigned int to get the bucket index
+	 * @param theBucketIndex A pointer to a parameter to get the bucket index
 	 * @return a pointer to the string, or null if not found.
 	 */
 	const XalanDOMString*
@@ -239,7 +239,7 @@
 
 	size_t							m_count;
 
-	unsigned int					m_collisions;		
+	size_t					        m_collisions;		
 };
 
 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanEncodingPropertyCache.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanEncodingPropertyCache.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanEncodingPropertyCache.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanEncodingPropertyCache.cpp Sat Jul 12 23:16:42 2008
@@ -44,7 +44,7 @@
 
 
 bool
-XalanEncodingPropertyCache::canEncodeCharacter(unsigned int 	theChar) const
+XalanEncodingPropertyCache::canEncodeCharacter(XalanUnicodeChar     theChar) const
 {
 	if (theChar > m_presentBitmap.getSize())
 	{

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanEncodingPropertyCache.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanEncodingPropertyCache.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanEncodingPropertyCache.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanEncodingPropertyCache.hpp Sat Jul 12 23:16:42 2008
@@ -53,7 +53,7 @@
 	~XalanEncodingPropertyCache();
 
 	bool
-	canEncodeCharacter(unsigned int		theChar) const;
+	canEncodeCharacter(XalanUnicodeChar     theChar) const;
 
 	const XalanOutputTranscoder*
 	getTranscoder() const

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanFStreamOutputStream.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanFStreamOutputStream.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanFStreamOutputStream.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanFStreamOutputStream.cpp Sat Jul 12 23:16:42 2008
@@ -35,8 +35,8 @@
 
 XalanFStreamOutputStream::XalanFStreamOutputStream(
             FILE*               theHandle,
-            MemoryManagerType&   theManager,
-            unsigned int        theBufferSize) :
+            MemoryManagerType&  theManager,
+            size_type           theBufferSize) :
     XalanOutputStream(theManager, theBufferSize),
     m_handle(theHandle)
 {
@@ -48,8 +48,8 @@
 XalanFStreamOutputStream*
 XalanFStreamOutputStream::create(
             FILE*               theFileHandle,
-            MemoryManagerType&   theManager,
-            unsigned int        theBufferSize)
+            MemoryManagerType&  theManager,
+            size_type           theBufferSize)
 {
     typedef XalanFStreamOutputStream ThisType;
 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanFStreamOutputStream.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanFStreamOutputStream.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanFStreamOutputStream.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanFStreamOutputStream.hpp Sat Jul 12 23:16:42 2008
@@ -42,7 +42,7 @@
 {
 public :
 
-	enum { eDefaultBufferSize = 8192 };
+	enum { eDefaultBufferSize = 8192u };
 
 
 	/**
@@ -53,13 +53,14 @@
 	 */
     XalanFStreamOutputStream(
 			FILE*			    theFileHandle,
-            MemoryManagerType&   theManager,
-			unsigned int	    theBufferSize = eDefaultBufferSize);
+            MemoryManagerType&  theManager,
+			size_type	        theBufferSize = eDefaultBufferSize);
 
     static XalanFStreamOutputStream*
-    create(	FILE*			    theFileHandle,
-            MemoryManagerType&   theManager,
-			unsigned int	    theBufferSize = eDefaultBufferSize);
+    create(
+            FILE*			    theFileHandle,
+            MemoryManagerType&  theManager,
+			size_type	        theBufferSize = eDefaultBufferSize);
     virtual
 	~XalanFStreamOutputStream();
 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp Sat Jul 12 23:16:42 2008
@@ -194,7 +194,7 @@
 XalanFileOutputStream::XalanFileOutputStream(
             const XalanDOMString&   theFileName,
             MemoryManagerType&      theManager,
-            unsigned int            theBufferSize) :
+            size_type               theBufferSize) :
     XalanOutputStream(theManager, theBufferSize),
     m_fileName(theFileName, theManager),
     m_handle(openFile(theFileName, theManager))
@@ -226,7 +226,7 @@
 XalanFileOutputStream::create(
             const XalanDOMString&   theFileName,
             MemoryManagerType&      theManager,
-            unsigned int            theBufferSize)
+            size_type               theBufferSize)
 {
     typedef XalanFileOutputStream ThisType;
 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanFileOutputStream.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanFileOutputStream.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanFileOutputStream.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanFileOutputStream.hpp Sat Jul 12 23:16:42 2008
@@ -46,7 +46,7 @@
 {
 public :
 
-	enum { eDefaultBufferSize = 8192 };
+	enum { eDefaultBufferSize = 8192u };
 
 #if defined(XALAN_WINDOWS)
 	typedef HANDLE	HandleType;
@@ -63,13 +63,13 @@
     XalanFileOutputStream(
 			const XalanDOMString&	theFileName,
             MemoryManagerType&      theManager,
-			unsigned int			theBufferSize = eDefaultBufferSize);
+			size_type			    theBufferSize = eDefaultBufferSize);
 
     static XalanFileOutputStream*
     create(
 			const XalanDOMString&	theFileName,
             MemoryManagerType&      theManager,
-			unsigned int			theBufferSize = eDefaultBufferSize);
+			size_type			    theBufferSize = eDefaultBufferSize);
     virtual
 	~XalanFileOutputStream();
 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanICUMessageLoader.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanICUMessageLoader.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanICUMessageLoader.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanICUMessageLoader.cpp Sat Jul 12 23:16:42 2008
@@ -163,12 +163,11 @@
 
 
 
-bool XalanICUMessageLoader::loadMsg(XalanMessages::Codes    msgToLoad
-									, XalanDOMChar*		toFill
-									, unsigned int      maxChars)
+bool XalanICUMessageLoader::loadMsg(
+            XalanMessages::Codes    msgToLoad,
+            XalanDOMChar*		    toFill,
+			XalanSize_t             maxChars)
 {
-
-
    bool bResult = true;
    UErrorCode   err = U_ZERO_ERROR;
    int32_t      strLen = 0;
@@ -183,7 +182,8 @@
 	   return false;
    }
 
-   const unsigned int	retStrLen = unsigned(strLen + 1 ) > maxChars ? maxChars : unsigned(strLen + 1);
+   const XalanSize_t	retStrLen =
+       static_cast<XalanSize_t>(strLen + 1 ) > maxChars ? maxChars : static_cast<XalanSize_t>(strLen + 1);
 
    XalanCopy(name, name + retStrLen, toFill);
   

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanICUMessageLoader.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanICUMessageLoader.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanICUMessageLoader.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanICUMessageLoader.hpp Sat Jul 12 23:16:42 2008
@@ -47,14 +47,15 @@
 	~XalanICUMessageLoader();
 
 protected:
-	// -----------------------------------------------------------------------
+
+    // -----------------------------------------------------------------------
     //  Implementation of the virtual message loader API
     // -----------------------------------------------------------------------
-    virtual bool loadMsg
-    (
-        XalanMessages::Codes    msgToLoad
-        ,       XalanDOMChar*	toFill
-        , unsigned int            maxChars
+    virtual bool
+    loadMsg(
+        XalanMessages::Codes    msgToLoad,
+        XalanDOMChar*	        toFill,
+        XalanSize_t             maxChars
     );
 
 private:

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanInMemoryMessageLoader.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanInMemoryMessageLoader.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanInMemoryMessageLoader.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanInMemoryMessageLoader.cpp Sat Jul 12 23:16:42 2008
@@ -37,42 +37,39 @@
 
 bool
 XalanInMemoryMessageLoader::loadMsg(
-					 XalanMessages::Codes	msgToLoad
-					 , XalanDOMChar*		toFill
-					 , unsigned int         maxChars )
+            XalanMessages::Codes	msgToLoad,
+			XalanDOMChar*		    toFill,
+			XalanSize_t             maxChars)
 {
-	if ( toFill == 0 )
+	if (toFill == 0)
 	{
 		return false;
 	}
-	else
+	else if (XalanMsgContainer::getMessageCount() < static_cast<XalanSize_t>(msgToLoad))
 	{
-		if (XalanMsgContainer::getNumbOfMsgs() < (unsigned int)msgToLoad)
-		{
-			const XalanDOMString::size_type		msgLength =
-                m_unknownMessage.length() + 1;
-
-			XalanCopy(
-                m_unknownMessage.c_str(),
-                m_unknownMessage.c_str() + (msgLength < maxChars ? msgLength : maxChars),
-                toFill);
-		}
-		else
-		{
-			const XalanDOMChar* const	pErrMsg = XalanMsgContainer::getMessage(msgToLoad);
-			assert (pErrMsg != 0);
-
-			const XalanDOMString::size_type		msgLength =
-                XalanDOMString::length(pErrMsg) + 1;
-
-            XalanCopy(
-                pErrMsg,
-                pErrMsg + (msgLength < maxChars ? msgLength : maxChars),
-                toFill);
-		}
+		const XalanDOMString::size_type		msgLength =
+               m_unknownMessage.length() + 1;
 
-		return true;
+		XalanCopy(
+            m_unknownMessage.c_str(),
+            m_unknownMessage.c_str() + (msgLength < maxChars ? msgLength : maxChars),
+            toFill);
 	}
+	else
+    {
+        const XalanDOMChar* const	pErrMsg = XalanMsgContainer::getMessage(msgToLoad);
+		assert(pErrMsg != 0);
+
+		const XalanDOMString::size_type		msgLength =
+               XalanDOMString::length(pErrMsg) + 1;
+
+        XalanCopy(
+            pErrMsg,
+            pErrMsg + (msgLength < maxChars ? msgLength : maxChars),
+            toFill);
+    }
+
+    return true;
 }
 
 
@@ -89,6 +86,9 @@
 }
 
 
+
 XALAN_CPP_NAMESPACE_END
 
+
+
 #endif

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanInMemoryMessageLoader.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanInMemoryMessageLoader.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanInMemoryMessageLoader.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanInMemoryMessageLoader.hpp Sat Jul 12 23:16:42 2008
@@ -48,11 +48,11 @@
 	// -----------------------------------------------------------------------
     //  Implementation of the virtual message loader API
     // -----------------------------------------------------------------------
-    virtual bool loadMsg
-    (
-        XalanMessages::Codes	msgToLoad
-        , XalanDOMChar*			toFill
-        , unsigned int          maxChars
+    virtual bool
+    loadMsg(
+            XalanMessages::Codes	msgToLoad,
+            XalanDOMChar*			toFill,
+            XalanSize_t             maxChars
     );
 
 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanMemoryManagement.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanMemoryManagement.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanMemoryManagement.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanMemoryManagement.cpp Sat Jul 12 23:16:42 2008
@@ -16,40 +16,47 @@
  * limitations under the License.
  */
 
-#include <xalanc/Include/XalanMemoryManagement.hpp>
+#include "xalanc/Include/XalanMemoryManagement.hpp"
+
+
+
+#include "xercesc/util/PlatformUtils.hpp"
+#include "xercesc/util/OutOfMemoryException.hpp"
+
 
-#include <xercesc/util/PlatformUtils.hpp>
 
 #include <cassert>
 #include <new>
 
+
+
 XALAN_CPP_NAMESPACE_BEGIN
 
-class XalanDummyMemoryManager : public MemoryManagerType
+
+
+class XalanDummyMemoryManager : public MemoryManager
 {
 public:
-	virtual 
+
+    virtual
 	~XalanDummyMemoryManager()
 	{
 	}
-	
+
 	virtual void*
-	allocate( size_t /*	size, */ )
+	allocate(XalanSize_t /*	size */ )
 	{
-		XALAN_USING_STD(bad_alloc)
-		
-		throw bad_alloc();
-		
-		return 0;
+        XALAN_USING_XERCES(OutOfMemoryException)
+
+		throw OutOfMemoryException();
 	}	
 
     virtual void
-	deallocate(  void* 	/*	pDataPointer */ )
+	deallocate(void* 	/* pDataPointer */ )
 	{
-		XALAN_USING_STD(bad_alloc)
-		
-		throw bad_alloc();		
-		
+        XALAN_USING_XERCES(OutOfMemoryException)
+
+		throw OutOfMemoryException();
 	}
 
     MemoryManager*
@@ -63,31 +70,26 @@
 
 static XalanDummyMemoryManager  s_dummyMemMgr;
 
-MemoryManagerType&
+
+
+MemoryManager&
 XalanMemMgrs::getDummyMemMgr()
 {
 	return s_dummyMemMgr;
 }
 
 
-MemoryManagerType&
+
+MemoryManager&
 XalanMemMgrs::getDefaultXercesMemMgr()
 {
 	XALAN_USING_XERCES(XMLPlatformUtils)
-	
-	MemoryManagerType* ptr = XMLPlatformUtils::fgMemoryManager;
-	
-	assert (ptr != 0);
-	
-	return *ptr;
-}
-
 
+	assert(XMLPlatformUtils::fgMemoryManager != 0);
 
-
-    
-XALAN_CPP_NAMESPACE_END
-
+	return *XMLPlatformUtils::fgMemoryManager;
+}
 
 
 
+XALAN_CPP_NAMESPACE_END

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanMemoryManagerDefault.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanMemoryManagerDefault.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanMemoryManagerDefault.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanMemoryManagerDefault.cpp Sat Jul 12 23:16:42 2008
@@ -43,7 +43,7 @@
 
 
 void*
-XalanMemoryManagerDefault::allocate(size_t size)
+XalanMemoryManagerDefault::allocate(XalanSize_t     size)
 {
     XALAN_USING_XERCES(OutOfMemoryException)
 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanMemoryManagerDefault.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanMemoryManagerDefault.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanMemoryManagerDefault.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanMemoryManagerDefault.hpp Sat Jul 12 23:16:42 2008
@@ -49,7 +49,7 @@
     ~XalanMemoryManagerDefault();
 
     virtual void*
-    allocate(size_t     size);
+    allocate(XalanSize_t    size);
 
     virtual void
     deallocate(void*    pointer);

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanMessageLoader.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanMessageLoader.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanMessageLoader.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanMessageLoader.cpp Sat Jul 12 23:16:42 2008
@@ -201,7 +201,7 @@
             XalanMessages::Codes    msgToLoad,
             MemoryManager&          theMemoryManager,
             XalanDOMChar*           toFill,
-            unsigned int            maxChars,
+            XalanSize_t             maxChars,
             const XalanDOMChar*     repText1, 
             const XalanDOMChar*     repText2, 
             const XalanDOMChar*     repText3,
@@ -289,7 +289,7 @@
             XalanMessages::Codes    msgToLoad,
             MemoryManagerType&      theManager,
             XalanDOMChar*           toFill,
-            unsigned int            maxChars,
+            XalanSize_t             maxChars,
             const char*             repText1, 
             const char*             repText2, 
             const char*             repText3, 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanMessageLoader.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanMessageLoader.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanMessageLoader.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanMessageLoader.hpp Sat Jul 12 23:16:42 2008
@@ -141,7 +141,7 @@
     loadMsg(
                 XalanMessages::Codes    msgToLoad, 
                 XalanDOMChar*           toFill, 
-                unsigned int            maxChars) = 0;
+                XalanSize_t             maxChars) = 0;
 
 private:
 
@@ -150,7 +150,7 @@
                 XalanMessages::Codes    msgToLoad,
                 MemoryManager&          theMemoryManager,
                 XalanDOMChar*           toFill,
-                unsigned int            maxChars,
+                XalanSize_t             maxChars,
                 const XalanDOMChar*     repText1, 
                 const XalanDOMChar*     repText2 = 0, 
                 const XalanDOMChar*     repText3 = 0,
@@ -161,7 +161,7 @@
                 XalanMessages::Codes        msgToLoad,
                 MemoryManagerType&          theManager,
                 XalanDOMChar*               toFill, 
-                unsigned int                maxChars, 
+                XalanSize_t                 maxChars, 
                 const char*                 repText1 , 
                 const char*                 repText2 = 0, 
                 const char*                 repText3 = 0, 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanNLSMessageLoader.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanNLSMessageLoader.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanNLSMessageLoader.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanNLSMessageLoader.cpp Sat Jul 12 23:16:42 2008
@@ -77,7 +77,7 @@
     */
     m_catalogHandle = catopen(fileName, 0);
 
-    if ((int)m_catalogHandle == -1)
+    if (reinterpret_cast<int>(m_catalogHandle) == -1)
     {
         // Probably have to call panic here
         // the user will get an error with retrieving messages
@@ -85,31 +85,38 @@
     }
 }
 
-bool XalanNLSMessageLoader::loadMsg(XalanMessages::Codes    msgToLoad
-								, XalanDOMChar*		toFill
-								, unsigned int            maxChars)
+bool
+XalanNLSMessageLoader::loadMsg(
+            XalanMessages::Codes    msgToLoad
+            XalanDOMChar*           toFill
+			XalanSize_t             maxChars)
 {
     
     bool bRetValue = false;
 
-    if( toFill == 0 || maxChars == 0 )
+    if (toFill == 0 || maxChars == 0)
     {
     	return bRetValue;
     }
 
-    if ((int)m_catalogHandle == -1)
+    if (static_cast<int>(m_catalogHandle) == -1)
     {
     	// for transcoding to Unicode
     	const XalanDOMString	errorMsg("Message can't be retrieved: the message catalog is not open.", m_memoryManager );
     	
     	if(errorMsg.length() < maxChars)
     	{
-    		XalanCopy(errorMsg.c_str(), errorMsg.c_str()+ errorMsg.length() +1 , toFill);
+    		XalanCopy(errorMsg.c_str(), errorMsg.c_str()+ errorMsg.length() + 1 , toFill);
     	}
     }
     else
     {
-    	const char* const	catMessage = catgets( m_catalogHandle, 1, (int)msgToLoad+2, s_errorMessage);
+    	const char* const	catMessage =
+            catgets(
+                m_catalogHandle,
+                1,
+                static_cast<int>(msgToLoad) + 2,
+                s_errorMessage);
 	
 		// catgets returns a pointer to msgString if it fails to locate the message
 		// from the message catalog
@@ -117,7 +124,7 @@
     	{
         	const XalanDOMString	errorMsg(catMessage, m_memoryManager);
         	
-        	if(errorMsg.length() < maxChars)
+        	if (errorMsg.length() < maxChars)
     		{
     			XalanCopy(errorMsg.c_str(), errorMsg.c_str() + errorMsg.length() +1  , toFill);
     			
@@ -129,9 +136,10 @@
     return bRetValue;
 }
 
-XALAN_CPP_NAMESPACE_END
 
 
-#endif // XALAN_NLS_MSG_LOADER
+XALAN_CPP_NAMESPACE_END
 
 
+
+#endif // XALAN_NLS_MSG_LOADER

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanNLSMessageLoader.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanNLSMessageLoader.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanNLSMessageLoader.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanNLSMessageLoader.hpp Sat Jul 12 23:16:42 2008
@@ -38,14 +38,15 @@
 	~XalanNLSMessageLoader();
 
 protected:
-	// -----------------------------------------------------------------------
+
+    // -----------------------------------------------------------------------
     //  Implementation of the virtual message loader API
     // -----------------------------------------------------------------------
-    virtual bool loadMsg
-    (
-        XalanMessages::Codes    msgToLoad
-        ,       XalanDOMChar* toFill
-        , unsigned int            maxChars
+    virtual bool
+    loadMsg(
+            XalanMessages::Codes    msgToLoad,
+            XalanDOMChar*           toFill,
+            XalanSize_t             maxChars
     );
 
 private:

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanNumberFormat.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanNumberFormat.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanNumberFormat.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanNumberFormat.cpp Sat Jul 12 23:16:42 2008
@@ -63,7 +63,6 @@
 			double				theValue,
 			XalanDOMString&		theResult)
 {
-	// $$$ ToDo: Fix this!
 	DoubleToDOMString(theValue, theResult);
 
 	applyGrouping(theResult, theResult);
@@ -94,7 +93,6 @@
 			unsigned int		theValue,
 			XalanDOMString&		theResult)
 {
-	// $$$ ToDo: Fix this!
 	UnsignedLongToDOMString(theValue, theResult);
 
 	applyGrouping(theResult, theResult);
@@ -111,7 +109,6 @@
 			long				theValue,
 			XalanDOMString&		theResult)
 {
-	// $$$ ToDo: Fix this!
 	LongToDOMString(theValue, theResult);
 
 	applyGrouping(theResult, theResult);
@@ -128,7 +125,6 @@
 			unsigned long		theValue,
 			XalanDOMString&		theResult)
 {
-	// $$$ ToDo: Fix this!
 	UnsignedLongToDOMString(theValue, theResult);
 
 	applyGrouping(theResult, theResult);
@@ -138,21 +134,26 @@
 
 
 
-#if defined(XALAN_SIZE_T_NOT_STANDARD_TYPE)
-
-	/**
-	 * Format a number into a string.
-	 *
-	 * @param theValue number to format
-	 * @param theResult the string result
-	 */
 XalanDOMString&
 XalanNumberFormat::format(
-			size_t				theValue,
+			XALAN_INT64	        theValue,
 			XalanDOMString&		theResult)
+{
+	NumberToDOMString(theValue, theResult);
+
+	applyGrouping(theResult, theResult);
+
+    return theResult;
+}
+
+
 
+XalanDOMString&
+XalanNumberFormat::format(
+			XALAN_UINT64	    theValue,
+			XalanDOMString&		theResult)
 {
-	SizeTypeToDOMString(theValue, theResult);
+	NumberToDOMString(theValue, theResult);
 
 	applyGrouping(theResult, theResult);
 
@@ -161,7 +162,6 @@
 
 
 
-#endif
 /*
  * Convert a string value using the currently active values for grouping size
  * and separator; returns the converted string

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanNumberFormat.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanNumberFormat.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanNumberFormat.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanNumberFormat.hpp Sat Jul 12 23:16:42 2008
@@ -117,8 +117,6 @@
 			unsigned long		theValue,
 			XalanDOMString&		theResult);
 
-#if defined(XALAN_SIZE_T_NOT_STANDARD_TYPE)
-
 	/**
 	 * Format a number into a string.
 	 *
@@ -127,10 +125,19 @@
 	 */
 	virtual XalanDOMString&
 	format(
-			size_t				theValue,
+			XALAN_INT64	        theValue,
 			XalanDOMString&		theResult);
 
-#endif
+	/**
+	 * Format a number into a string.
+	 *
+	 * @param theValue number to format
+	 * @param theResult the string result
+	 */
+	virtual XalanDOMString&
+	format(
+			XALAN_UINT64	    theValue,
+			XalanDOMString&		theResult);
 
 	/**
 	 * Whether groupings are used for numbers, for example, "234,678"

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanOutputStream.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanOutputStream.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanOutputStream.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanOutputStream.cpp Sat Jul 12 23:16:42 2008
@@ -307,7 +307,7 @@
 
 
 bool
-XalanOutputStream::canTranscodeTo(unsigned int      theChar) const
+XalanOutputStream::canTranscodeTo(XalanUnicodeChar  theChar) const
 {
     if (m_transcoder != 0)
     {
@@ -320,7 +320,6 @@
         // commented out line, if we can ever figure out how to see
         // if a character can be encoded.
         return true;
-//      return XalanTranscodingServices::canTranscodeToLocalCodePage(theChar);
     }
 }
 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanOutputStream.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanOutputStream.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanOutputStream.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanOutputStream.hpp Sat Jul 12 23:16:42 2008
@@ -55,7 +55,6 @@
 	typedef XalanVector<XalanDOMChar>		BufferType;
 	typedef XalanVector<char>				TranscodeVectorType;
 	typedef XalanTranscodingServices::size_type	        size_type;
-    typedef XalanTranscodingServices::UnicodeCharType   UnicodeCharType;
 
 	/**
 	 * Constructor.
@@ -238,7 +237,7 @@
 	 * @return true if the value can be represented, and false if not.
 	 */
 	bool
-	canTranscodeTo(UnicodeCharType 	theChar) const;
+	canTranscodeTo(XalanUnicodeChar     theChar) const;
 
 
 	const XalanOutputTranscoder*

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanReferenceCountedObject.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanReferenceCountedObject.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanReferenceCountedObject.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanReferenceCountedObject.hpp Sat Jul 12 23:16:42 2008
@@ -65,7 +65,7 @@
 	virtual void 
 	dereferenced() = 0;
 
-	virtual unsigned int
+	virtual XalanSize_t
 	getReferenceCount() const
 	{
 		return m_referenceCount;
@@ -73,7 +73,7 @@
 
 private:
 
-	unsigned int	m_referenceCount;
+	XalanSize_t	    m_referenceCount;
 
 	// Not implemented...
 	XalanReferenceCountedObject&

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanStdOutputStream.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanStdOutputStream.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanStdOutputStream.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanStdOutputStream.cpp Sat Jul 12 23:16:42 2008
@@ -146,7 +146,7 @@
             const char*     theBuffer,
             size_type       theBufferLength)
 {
-    assert(StreamSizeType(theBufferLength) == theBufferLength);
+    assert(static_cast<XALAN_UINT64>(StreamSizeType(theBufferLength)) == theBufferLength);
 
     m_outputStream.write(theBuffer, StreamSizeType(theBufferLength));
 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanToXercesTranscoderWrapper.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanToXercesTranscoderWrapper.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanToXercesTranscoderWrapper.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanToXercesTranscoderWrapper.cpp Sat Jul 12 23:16:42 2008
@@ -140,7 +140,7 @@
 
 
 bool
-XalanToXercesTranscoderWrapper::canTranscodeTo(UnicodeCharType	theChar) const
+XalanToXercesTranscoderWrapper::canTranscodeTo(XalanUnicodeChar     theChar) const
 {
 	return m_transcoder->canTranscodeTo(theChar);
 }

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanToXercesTranscoderWrapper.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanToXercesTranscoderWrapper.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanToXercesTranscoderWrapper.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanToXercesTranscoderWrapper.hpp Sat Jul 12 23:16:42 2008
@@ -73,7 +73,7 @@
 			unsigned char*			theCharSizes);
 
 	virtual bool
-	canTranscodeTo(UnicodeCharType	theChar) const;
+	canTranscodeTo(XalanUnicodeChar     theChar) const;
 
 private:
 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanTranscodingServices.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanTranscodingServices.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanTranscodingServices.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanTranscodingServices.cpp Sat Jul 12 23:16:42 2008
@@ -593,7 +593,7 @@
 
 
 XalanTranscodingServices::UnrepresentableCharacterException::UnrepresentableCharacterException(
-            UnicodeCharType         theCharacter,
+            XalanUnicodeChar        theCharacter,
             const XalanDOMString&   theEncoding,
             XalanDOMString&         theBuffer) :
     XSLException(

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanTranscodingServices.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanTranscodingServices.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanTranscodingServices.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanTranscodingServices.hpp Sat Jul 12 23:16:42 2008
@@ -60,7 +60,6 @@
 
     typedef unsigned char   XalanXMLByte;
     typedef XalanSize_t     size_type;
-    typedef unsigned int    UnicodeCharType;
 
     static size_type
     length(const XalanXMLByte*  theBytes)
@@ -215,13 +214,6 @@
     static bool
     getBytesEqualChars(const XalanDOMString&    theEncoding);
 
-    static bool
-    canTranscodeToLocalCodePage(UnicodeCharType     theChar)
-    {
-        // Yuck!! See getMaximumCharacterValue() for more details.
-        return theChar <= 0x7fu ? true : false;
-    }
-
     static const XalanDOMChar   s_utf8String[];
 
     static const XalanDOMChar   s_utf16String[];
@@ -289,7 +281,7 @@
     public:
 
         UnrepresentableCharacterException(
-                UnicodeCharType         theCharacter,
+                XalanUnicodeChar        theCharacter,
                 const XalanDOMString&   theEncoding,
                 XalanDOMString&         theBuffer);
 
@@ -298,7 +290,7 @@
         virtual
         ~UnrepresentableCharacterException();
 
-        UnicodeCharType
+        XalanUnicodeChar
         getCharacter() const
         {
             return m_badCharacter;
@@ -321,7 +313,7 @@
         static const XalanDOMChar   s_type[];
 
 
-        const UnicodeCharType   m_badCharacter;
+        const XalanUnicodeChar  m_badCharacter;
 
         mutable XalanDOMString  m_encoding;
     };
@@ -342,7 +334,6 @@
     typedef XalanTranscodingServices::XalanXMLByte      XalanXMLByte;
     typedef XalanTranscodingServices::eCode             eCode;
     typedef XalanTranscodingServices::size_type         size_type;
-    typedef XalanTranscodingServices::UnicodeCharType   UnicodeCharType;
 
     explicit
     XalanOutputTranscoder(MemoryManager&    theManager);
@@ -403,7 +394,7 @@
             unsigned char*          theCharSizes) = 0;
 
     virtual bool
-    canTranscodeTo(UnicodeCharType  theChar) const = 0;
+    canTranscodeTo(XalanUnicodeChar     theChar) const = 0;
 
 private:
 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanUTF16Transcoder.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanUTF16Transcoder.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanUTF16Transcoder.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanUTF16Transcoder.cpp Sat Jul 12 23:16:42 2008
@@ -138,7 +138,7 @@
 
 
 bool
-XalanUTF16Transcoder::canTranscodeTo(UnicodeCharType	/* theChar */) const
+XalanUTF16Transcoder::canTranscodeTo(XalanUnicodeChar	/* theChar */) const
 {
 	return true;
 }

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanUTF16Transcoder.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanUTF16Transcoder.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanUTF16Transcoder.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanUTF16Transcoder.hpp Sat Jul 12 23:16:42 2008
@@ -91,7 +91,7 @@
 			unsigned char*			theCharSizes);
 
 	virtual bool
-	canTranscodeTo(UnicodeCharType	theChar) const;
+	canTranscodeTo(XalanUnicodeChar     theChar) const;
 
 private:
 

Modified: xalan/c/trunk/src/xalanc/TestXPath/TestXPath.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/TestXPath/TestXPath.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/TestXPath/TestXPath.cpp (original)
+++ xalan/c/trunk/src/xalanc/TestXPath/TestXPath.cpp Sat Jul 12 23:16:42 2008
@@ -53,6 +53,7 @@
 #include <xalanc/XalanDOM/XalanNode.hpp>
 #include <xalanc/XalanDOM/XalanDocument.hpp>
 #include <xalanc/XalanDOM/XalanElement.hpp>
+#include <xalanc/XalanDOM/XalanNamedNodeMap.hpp>
 #include <xalanc/XalanDOM/XalanNodeList.hpp>
 
 
@@ -326,7 +327,19 @@
                     static_cast<const XalanElement*>(theNode);
 #endif
 
-        theResult = theElement->getAttribute(theAttributeName);
+        const XalanNamedNodeMap* const  theAttributes =
+            theElement->getAttributes();
+
+        if (theAttributes != 0)
+        {
+            const XalanNode* const  theNode =
+                theAttributes->getNamedItem(theAttributeName);
+
+            if (theNode != 0)
+            {
+                theResult = theNode->getNodeValue();
+            }
+        }
     }
 
     return theResult;
@@ -577,7 +590,7 @@
                     const NodeRefListBase&  theResultList =
                         theResult->nodeset();
 
-                    const unsigned int  theLength = theResultList.getLength();
+                    const NodeRefListBase::size_type    theLength = theResultList.getLength();
 
                     if (theLength == 0)
                     {
@@ -587,7 +600,7 @@
                     {
                         thePrintWriter.print("<out>");
 
-                        for (unsigned int i = 0; i < theLength; i++)
+                        for (NodeRefListBase::size_type i = 0; i < theLength; i++)
                         {
                             thePrintWriter.print(theResultList.item(i)->getNodeName());
                             thePrintWriter.print(" ");
@@ -722,20 +735,17 @@
                         const NodeRefListBase&  theResultList =
                                 theResult1->nodeset();
 
-                        const unsigned int  theLength = theResultList.getLength();
+                        const NodeRefListBase::size_type    theLength = theResultList.getLength();
 
                         thePrintWriter.print("theResult1->str() == \"");
                         thePrintWriter.print(theResult1->str());
                         thePrintWriter.print("\"");
                         thePrintWriter.println();
 
-                        if (theLength > 0)
+                        for (NodeRefListBase::size_type i = 0; i < theLength; i++)
                         {
-                            for (unsigned int i = 0; i < theLength; i++)
-                            {
-                                thePrintWriter.print(theResultList.item(i)->getNodeName());
-                                thePrintWriter.println();
-                            }
+                            thePrintWriter.print(theResultList.item(i)->getNodeName());
+                            thePrintWriter.println();
                         }
                     }
                     catch(...)
@@ -755,20 +765,17 @@
                         const NodeRefListBase&  theResultList =
                                 theResult2->nodeset();
 
-                        const int   theLength = theResultList.getLength();
+                        const NodeRefListBase::size_type    theLength = theResultList.getLength();
 
                         thePrintWriter.print("theResult2->str() == \"");
                         thePrintWriter.print(theResult2->str());
                         thePrintWriter.print("\"");
                         thePrintWriter.println();
 
-                        if (theLength > 0)
+                        for (NodeRefListBase::size_type i = 0; i < theLength; i++)
                         {
-                            for (int i = 0; i < theLength; i++)
-                            {
-                                thePrintWriter.print(theResultList.item(i)->getNodeName());
-                                thePrintWriter.println();
-                            }
+                            thePrintWriter.print(theResultList.item(i)->getNodeName());
+                            thePrintWriter.println();
                         }
                     }
                     catch(...)

Modified: xalan/c/trunk/src/xalanc/TestXSLT/process.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/TestXSLT/process.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/TestXSLT/process.cpp (original)
+++ xalan/c/trunk/src/xalanc/TestXSLT/process.cpp Sat Jul 12 23:16:42 2008
@@ -816,8 +816,8 @@
 	theXalanSourceTreeDOMSupport.setParserLiaison( &theXalanSourceTreeParserLiaison);
 
 
-	XercesDOMSupport		theXercesDOMSupport(theManager);
 	XercesParserLiaison		theXercesParserLiaison(theManager);
+	XercesDOMSupport		theXercesDOMSupport(theXercesParserLiaison);
 
 	DOMSupport&				theDOMSupport = getDOMSupport(
 		theXalanSourceTreeDOMSupport,

Modified: xalan/c/trunk/src/xalanc/Utils/MsgCreator/ICUResHandler.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/Utils/MsgCreator/ICUResHandler.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/Utils/MsgCreator/ICUResHandler.cpp (original)
+++ xalan/c/trunk/src/xalanc/Utils/MsgCreator/ICUResHandler.cpp Sat Jul 12 23:16:42 2008
@@ -75,16 +75,16 @@
         // we need to acount for the terminating null,
         // and the possibility of escaping each character,
         // 1025 is the maximum buffer size.
-        const unsigned int  theMaxChars = 512;
+        const XalanSize_t   theMaxChars = 512;
         assert(length <= theMaxChars); 
 
         XMLCh   buffer[(theMaxChars * 2) + 1];
 
-        unsigned int    j = 0;
+        XalanSize_t    j = 0;
 
         // ICU genrb doesn't like " and {} chars
         // change tham with \", \{ and \}.
-        for (unsigned int i = 0 ; i < length ; ++i , ++j)
+        for (XalanSize_t i = 0 ; i < length ; ++i , ++j)
         {
             if (chars[i] == chDoubleQuote ||
                 chars[i] == chOpenCurly ||

Modified: xalan/c/trunk/src/xalanc/Utils/MsgCreator/InMemData.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/Utils/MsgCreator/InMemData.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/Utils/MsgCreator/InMemData.hpp (original)
+++ xalan/c/trunk/src/xalanc/Utils/MsgCreator/InMemData.hpp Sat Jul 12 23:16:42 2008
@@ -65,7 +65,7 @@
 {
 "\n",
 "\n",
-"static const unsigned int gXalanMsgArraySize = ",
+"static const XalanSize_t gXalanMsgArraySize = ",
 0
 };
 

Modified: xalan/c/trunk/src/xalanc/Utils/MsgCreator/InMemHandler.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/Utils/MsgCreator/InMemHandler.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/Utils/MsgCreator/InMemHandler.cpp (original)
+++ xalan/c/trunk/src/xalanc/Utils/MsgCreator/InMemHandler.cpp Sat Jul 12 23:16:42 2008
@@ -59,7 +59,7 @@
 {
     if (sArrayOfStrings != 0)
     {
-        for (int i = 0; sArrayOfStrings[i] != 0; ++i)
+        for (XalanSize_t i = 0; sArrayOfStrings[i] != 0; ++i)
         {
             m_stream.writeAsASCII(
                 sArrayOfStrings[i],
@@ -89,7 +89,7 @@
     {
         char buffer[20];
 
-        for( unsigned int i = 0; i < length ; ++i)
+        for (XalanSize_t i = 0; i < length ; ++i)
         {
             sprintf(
                 buffer,
@@ -143,7 +143,7 @@
 {
     if(!XMLString::compareString(localname, s_transUnitXMLCh))
     {
-        // this is an elemente, SAX2Handler class is responsible to handle:
+        // This is an element, SAX2Handler class is responsible to handle:
         // creating Index file, commom for all localization styles
         SAX2Handler::startElement(uri, localname, qname, attributes);
     }

Modified: xalan/c/trunk/src/xalanc/Utils/MsgCreator/NLSHandler.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/Utils/MsgCreator/NLSHandler.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/Utils/MsgCreator/NLSHandler.cpp (original)
+++ xalan/c/trunk/src/xalanc/Utils/MsgCreator/NLSHandler.cpp Sat Jul 12 23:16:42 2008
@@ -105,7 +105,7 @@
 {
     if (sArrayOfStrings != 0)
     {
-        for (unsigned int i = 0; sArrayOfStrings[i] != 0; ++i)
+        for (XalanSize_t i = 0; sArrayOfStrings[i] != 0; ++i)
         {
             m_stream.writeAsASCII(
                 sArrayOfStrings[i],

Modified: xalan/c/trunk/src/xalanc/Utils/XalanMsgLib/XalanMsgLib.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/Utils/XalanMsgLib/XalanMsgLib.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/Utils/XalanMsgLib/XalanMsgLib.cpp (original)
+++ xalan/c/trunk/src/xalanc/Utils/XalanMsgLib/XalanMsgLib.cpp Sat Jul 12 23:16:42 2008
@@ -53,8 +53,8 @@
 
 
 
-unsigned int
-XalanMsgContainer::getNumbOfMsgs()
+XalanSize_t
+XalanMsgContainer::getMessageCount()
 {
 	return gXalanMsgArraySize;
 }
@@ -62,12 +62,16 @@
 
 
 const XalanDOMChar*
-XalanMsgContainer::getMessage(unsigned int	msgInd)
+XalanMsgContainer::getMessage(XalanSize_t   msgID)
 {
-	if ( msgInd < gXalanMsgArraySize )
-		return msgArray[msgInd];
+	if (msgID < gXalanMsgArraySize)
+    {
+		return msgArray[msgID];
+    }
 	else
+    {
 		return s_errString;
+    }
 }
 
 

Modified: xalan/c/trunk/src/xalanc/Utils/XalanMsgLib/XalanMsgLib.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/Utils/XalanMsgLib/XalanMsgLib.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/Utils/XalanMsgLib/XalanMsgLib.hpp (original)
+++ xalan/c/trunk/src/xalanc/Utils/XalanMsgLib/XalanMsgLib.hpp Sat Jul 12 23:16:42 2008
@@ -26,19 +26,19 @@
 
 XALAN_CPP_NAMESPACE_BEGIN
 
+
+
 class  XALAN_XALANMSGLIB_EXPORT XalanMsgContainer{
 
 public:
 
-	static unsigned int
-	getNumbOfMsgs();
+	static XalanSize_t
+	getMessageCount();
 
 	static const XalanDOMChar*
-	getMessage(unsigned int);
+	getMessage(XalanSize_t  msgID);
 
 private:
-
-
 };
 
 
@@ -48,4 +48,3 @@
 
 
 #endif
-

Modified: xalan/c/trunk/src/xalanc/XMLSupport/FormatterToText.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XMLSupport/FormatterToText.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XMLSupport/FormatterToText.cpp (original)
+++ xalan/c/trunk/src/xalanc/XMLSupport/FormatterToText.cpp Sat Jul 12 23:16:42 2008
@@ -199,9 +199,9 @@
 	}
 	else
 	{
-		unsigned int i = 0;
+		size_type   i = 0;
 
-		while(i < length)
+		while (i < length)
 		{
 			if (chars[i] > m_maxCharacter)
 			{

Modified: xalan/c/trunk/src/xalanc/XMLSupport/FormatterToXML.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XMLSupport/FormatterToXML.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XMLSupport/FormatterToXML.cpp (original)
+++ xalan/c/trunk/src/xalanc/XMLSupport/FormatterToXML.cpp Sat Jul 12 23:16:42 2008
@@ -813,8 +813,9 @@
 }
 
 void
-FormatterToXML::throwInvalidCharacterException( unsigned int        ch,
-                                                MemoryManagerType&  theManager)
+FormatterToXML::throwInvalidCharacterException(
+            XalanUnicodeChar    ch,
+            MemoryManagerType&  theManager)
 {
     XalanDOMString  theMessage(theManager);
     XalanDOMString  theBuffer(theManager);  

Modified: xalan/c/trunk/src/xalanc/XMLSupport/FormatterToXML.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XMLSupport/FormatterToXML.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XMLSupport/FormatterToXML.hpp (original)
+++ xalan/c/trunk/src/xalanc/XMLSupport/FormatterToXML.hpp Sat Jul 12 23:16:42 2008
@@ -579,7 +579,7 @@
 	 */
     static void
     throwInvalidCharacterException( 
-            unsigned int		ch,
+            XalanUnicodeChar    ch,
             MemoryManagerType&  theManager);
 
     static bool

Modified: xalan/c/trunk/src/xalanc/XMLSupport/XalanFormatterWriter.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XMLSupport/XalanFormatterWriter.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XMLSupport/XalanFormatterWriter.hpp (original)
+++ xalan/c/trunk/src/xalanc/XMLSupport/XalanFormatterWriter.hpp Sat Jul 12 23:16:42 2008
@@ -130,18 +130,18 @@
     {
     public:
 
-        CommonRepresentableCharFunctor(const XalanOutputStream* stream) :
+        CommonRepresentableCharFunctor(const XalanOutputStream*     stream) :
             m_stream(stream)
         {
             assert(stream != 0);
         }
 
         bool
-        operator()(unsigned int theChar) const
+        operator()(XalanUnicodeChar     theChar) const
         {
             bool result = true;
 
-            if( m_stream != 0)
+            if (m_stream != 0)
             {
                 result = m_stream->canTranscodeTo(theChar);
             }
@@ -230,7 +230,7 @@
 		return 0xDC00u <= theChar && theChar <= 0xDFFFu ? true : false;
 	}
 
-    static unsigned int
+    static XalanUnicodeChar
     decodeUTF16SurrogatePair(
 			    XalanDOMChar	theHighSurrogate,
 			    XalanDOMChar	theLowSurrogate,
@@ -248,8 +248,8 @@
 
     static void
     throwInvalidCharacterException(
-                unsigned int	ch,
-                MemoryManager&  theManager)
+                XalanUnicodeChar    ch,
+                MemoryManager&      theManager)
     {
         XalanDOMString	theMessage(theManager);
         XalanDOMString	theBuffer(theManager);  
@@ -266,8 +266,8 @@
 
     void
     throwUnrepresentableCharacterException(
-                unsigned int	ch,
-                MemoryManager&  theManager)
+                XalanUnicodeChar    ch,
+                MemoryManager&      theManager)
     {
         XalanDOMString	theBuffer(theManager);  
 
@@ -340,14 +340,14 @@
      * @param theChar A Unicode code point.
      */
     const XalanDOMString&
-    formatNumericCharacterReference(unsigned int     theNumber)
+    formatNumericCharacterReference(XalanUnicodeChar    theChar)
     {
         clear(m_stringBuffer);
 
         m_stringBuffer.push_back(XalanDOMChar(XalanUnicode::charAmpersand));
         m_stringBuffer.push_back(XalanDOMChar(XalanUnicode::charNumberSign));
 
-        UnsignedLongToDOMString(theNumber, m_stringBuffer);
+        UnsignedLongToDOMString(theChar, m_stringBuffer);
 
         m_stringBuffer.push_back(XalanDOMChar(XalanUnicode::charSemicolon));
 

Modified: xalan/c/trunk/src/xalanc/XMLSupport/XalanOtherEncodingWriter.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XMLSupport/XalanOtherEncodingWriter.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XMLSupport/XalanOtherEncodingWriter.hpp (original)
+++ xalan/c/trunk/src/xalanc/XMLSupport/XalanOtherEncodingWriter.hpp Sat Jul 12 23:16:42 2008
@@ -46,7 +46,7 @@
         }
 
         void
-        operator()(unsigned int value) const
+        operator()(XalanUnicodeChar     value) const
         {
             m_writer.writeNumericCharacterReference(value);
         }
@@ -66,9 +66,11 @@
         }
 
         void
-        operator()(unsigned int  value) const
+        operator()(XalanUnicodeChar     value) const
         {
-            m_writer.throwUnrepresentableCharacterException(value, m_writer.getMemoryManager());
+            m_writer.throwUnrepresentableCharacterException(
+                value,
+                m_writer.getMemoryManager());
         }
 
     private:
@@ -131,9 +133,9 @@
 
         const XalanDOMChar  theChar = chars[start];
 
-        unsigned int value = theChar;
+        XalanUnicodeChar    value = theChar;
 
-        size_type result = start;
+        size_type   result = start;
 
         if (isUTF16HighSurrogate(theChar) == true)
         {
@@ -316,9 +318,9 @@
                 }
                 else 
                 {
-                    unsigned int value = decodeUTF16SurrogatePair(ch, theChars[i+1],  getMemoryManager());
+                    XalanUnicodeChar    value = decodeUTF16SurrogatePair(ch, theChars[i+1],  getMemoryManager());
 
-                    if(this->m_isPresentable(value))
+                    if (this->m_isPresentable(value))
                     {
                         write(value);
                     }
@@ -332,7 +334,7 @@
             }
             else
             {
-                write((unsigned int)ch);
+                write(static_cast<XalanUnicodeChar>(ch));
             }
         }
     }
@@ -389,7 +391,7 @@
 
         const XalanDOMChar  ch = chars[start];
 
-        unsigned int value = ch;
+        XalanUnicodeChar    value = ch;
 
         if (isUTF16HighSurrogate(ch) == true)
         {
@@ -427,22 +429,22 @@
      *                       transcoder, we convert it back to UTF-16                         
      */
     void
-    write(unsigned int  theChar)
+    write(XalanUnicodeChar  theChar)
     {
         // encode back UTF-32 into UTF-16 
 
-        if( theChar > 0xFFFF )
+        if (theChar > 0xFFFF)
         {
             if (m_bufferRemaining < 2)
             {
                 flushBuffer();
             }
 
-            *m_bufferPosition = (XalanDOMChar((theChar >> 10) + 0xD7C0));
+            *m_bufferPosition = static_cast<XalanDOMChar>((theChar >> 10) + 0xD7C0);
 
             ++m_bufferPosition;
 
-            *m_bufferPosition = (XalanDOMChar((theChar &  0x03FF) + 0xDC00));
+            *m_bufferPosition = static_cast<XalanDOMChar>((theChar &  0x03FF) + 0xDC00);
 
             ++m_bufferPosition;
 
@@ -463,10 +465,10 @@
     }
 
     void
-    writeNumericCharacterReference(unsigned int     theNumber)
+    writeNumericCharacterReference(XalanUnicodeChar     theChar)
     {
         const XalanDOMString&   theString =
-            formatNumericCharacterReference(theNumber);
+            formatNumericCharacterReference(theChar);
 
         const XalanDOMString::size_type     theLength =
             theString.length();

Modified: xalan/c/trunk/src/xalanc/XMLSupport/XalanUTF8Writer.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XMLSupport/XalanUTF8Writer.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XMLSupport/XalanUTF8Writer.hpp (original)
+++ xalan/c/trunk/src/xalanc/XMLSupport/XalanUTF8Writer.hpp Sat Jul 12 23:16:42 2008
@@ -28,49 +28,49 @@
 
 
 inline char
-bits19to21(unsigned int theChar)
+bits19to21(XalanUnicodeChar     theChar)
 {
-    return char((theChar >> 18) & 0x7);
+    return static_cast<char>((theChar >> 18) & 0x7);
 }
 
 
 
 inline char
-bits13to18(unsigned int theChar)
+bits13to18(XalanUnicodeChar     theChar)
 {
-    return char((theChar >> 12) & 0x3F);
+    return static_cast<char>((theChar >> 12) & 0x3F);
 }
 
 
 
 inline char
-bits13to16(unsigned int theChar)
+bits13to16(XalanUnicodeChar     theChar)
 {
-    return char((theChar >> 12) & 0xF);
+    return static_cast<char>((theChar >> 12) & 0xF);
 }
 
 
 
 inline char
-bits7to12(unsigned int  theChar)
+bits7to12(XalanUnicodeChar      theChar)
 {
-    return char((theChar >> 6) & 0x3f);
+    return static_cast<char>((theChar >> 6) & 0x3f);
 }
 
 
 
 inline char
-bits7to11(unsigned int  theChar)
+bits7to11(XalanUnicodeChar      theChar)
 {
-    return char((theChar >> 6) & 0x1f);
+    return static_cast<char>((theChar >> 6) & 0x1f);
 }
 
 
 
 inline char
-bits1to6(unsigned int   theChar)
+bits1to6(XalanUnicodeChar       theChar)
 {
-    return char(theChar & 0x3f);
+    return static_cast<char>(theChar & 0x3f);
 }
 
 
@@ -78,7 +78,7 @@
 inline char
 leadingByteOf2(char     theBits)
 {
-    return char(0xC0 + theBits);
+    return static_cast<char>(0xC0 + theBits);
 }
 
 
@@ -86,7 +86,7 @@
 inline char
 leadingByteOf3(char     theBits)
 {
-    return char(0xE0 + theBits);
+    return static_cast<char>(0xE0 + theBits);
 }
 
 
@@ -94,7 +94,7 @@
 inline char
 leadingByteOf4(char     theBits)
 {
-    return char(0xF0 + theBits);
+    return static_cast<char>(0xF0 + theBits);
 }
 
 
@@ -102,7 +102,7 @@
 inline char
 trailingByte(char   theBits)
 {
-    return char(0x80 + theBits);
+    return static_cast<char>(0x80 + theBits);
 }
 
 
@@ -269,7 +269,7 @@
         {
             if (isUTF16HighSurrogate(theChars[i]) == false)
             {
-                write((unsigned int)theChars[i]);
+                write(static_cast<XalanUnicodeChar>(theChars[i]));
             }
             else if (i + 1 >= theLength)
             {
@@ -301,7 +301,7 @@
 
         if (isUTF16HighSurrogate(ch) == false)
         {
-            write((unsigned int)ch);
+            write(static_cast<XalanUnicodeChar>(ch));
         }
         else if (start + 1 >= length)
         {
@@ -353,7 +353,7 @@
             }
             else
             {
-                write((unsigned int)ch);
+                write(static_cast<XalanUnicodeChar>(ch));
             }
         }
         
@@ -383,7 +383,7 @@
 private:
 
     void
-    write(unsigned int  theChar)
+    write(XalanUnicodeChar  theChar)
     {
         if (theChar <= 0x7F)
         {

Modified: xalan/c/trunk/src/xalanc/XMLSupport/XalanXMLSerializerBase.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XMLSupport/XalanXMLSerializerBase.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XMLSupport/XalanXMLSerializerBase.cpp (original)
+++ xalan/c/trunk/src/xalanc/XMLSupport/XalanXMLSerializerBase.cpp Sat Jul 12 23:16:42 2008
@@ -130,7 +130,7 @@
 
 
 
-unsigned int
+XalanUnicodeChar
 XalanXMLSerializerBase::decodeUTF16SurrogatePair(
             XalanDOMChar    theHighSurrogate,
             XalanDOMChar    theLowSurrogate,
@@ -194,8 +194,8 @@
 
 void
 XalanXMLSerializerBase::throwInvalidCharacterException(
-            unsigned int        ch,
-            MemoryManager&  theManager)
+            XalanUnicodeChar    ch,
+            MemoryManager&      theManager)
 {
     XalanDOMString  theMessage(theManager);
     XalanDOMString  theBuffer(theManager);  
@@ -208,11 +208,13 @@
     throw SAXException(theMessage.c_str(), &theManager);
 }
 
+
+
 void
 XalanXMLSerializerBase::throwInvalidXMLCharacterException(
-                                  unsigned int                ch,
-                                  const XalanDOMString&       theXMLversion,
-                                  MemoryManager&              theManager)
+            XalanUnicodeChar        ch,
+            const XalanDOMString&   theXMLversion,
+            MemoryManager&          theManager)
 {
     XalanDOMString  theMessage(theManager);
     XalanDOMString  theBuffer(theManager);  

Modified: xalan/c/trunk/src/xalanc/XMLSupport/XalanXMLSerializerBase.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XMLSupport/XalanXMLSerializerBase.hpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XMLSupport/XalanXMLSerializerBase.hpp (original)
+++ xalan/c/trunk/src/xalanc/XMLSupport/XalanXMLSerializerBase.hpp Sat Jul 12 23:16:42 2008
@@ -708,7 +708,7 @@
         return 0xDC00u <= theChar && theChar <= 0xDFFFu ? true : false;
     }
 
-    static unsigned int
+    static XalanUnicodeChar
     decodeUTF16SurrogatePair(
             XalanDOMChar    theHighSurrogate,
             XalanDOMChar    theLowSurrogate,
@@ -744,8 +744,8 @@
      */
     static void
     throwInvalidCharacterException(
-            unsigned int    ch,
-            MemoryManager&  theManager);
+            XalanUnicodeChar    ch,
+            MemoryManager&      theManager);
 
 
     /**
@@ -756,9 +756,9 @@
      */
     static void
     throwInvalidXMLCharacterException(
-            unsigned int                ch,
-            const XalanDOMString&       theXMLversion,
-            MemoryManager&              theManager);
+            XalanUnicodeChar        ch,
+            const XalanDOMString&   theXMLversion,
+            MemoryManager&          theManager);
 private:
 
     // These are not implemented.

Modified: xalan/c/trunk/src/xalanc/XPath/FunctionLang.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XPath/FunctionLang.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XPath/FunctionLang.cpp (original)
+++ xalan/c/trunk/src/xalanc/XPath/FunctionLang.cpp Sat Jul 12 23:16:42 2008
@@ -19,6 +19,14 @@
 
 
 
+#include "xalanc/Include/XalanMemoryManagement.hpp"
+
+
+
+#include "xalanc/XalanDOM/XalanNamedNodeMap.hpp"
+
+
+
 #include <xalanc/PlatformSupport/XalanMessageLoader.hpp>
 
 
@@ -35,6 +43,10 @@
 
 
 
+static const XalanDOMString     s_emptyString(XalanMemMgrs::getDummyMemMgr());
+
+
+
 FunctionLang::FunctionLang()
 {
 }
@@ -64,7 +76,7 @@
 
     while(0 != parent)
     {
-        if(XalanNode::ELEMENT_NODE == parent->getNodeType())
+        if (XalanNode::ELEMENT_NODE == parent->getNodeType())
         {
             const XalanElement* const   theElementNode =
 #if defined(XALAN_OLD_STYLE_CASTS)
@@ -73,22 +85,29 @@
                 static_cast<const XalanElement*>(parent);
 #endif
 
-            const XalanDOMString&       langVal =
-                theElementNode->getAttributeNS(
+            const XalanNamedNodeMap* const  theAttributes =
+                theElementNode->getAttributes();
+            assert(theAttributes != 0);
+
+            const XalanNode* const  theAttribute =
+                theAttributes->getNamedItemNS(
                     DOMServices::s_XMLNamespaceURI,
                     s_attributeName);
 
-            if(0 != length(langVal))
+            const XalanDOMString&   langVal = theAttribute == 0 ?
+                        s_emptyString : theAttribute->getNodeValue();
+
+            if (0 != length(langVal))
             {
                 XPathExecutionContext::GetAndReleaseCachedString theGuard1(executionContext);
                 XPathExecutionContext::GetAndReleaseCachedString theGuard2(executionContext);
 
-                if(startsWith(toLowerCaseASCII(langVal, theGuard1.get()), toLowerCaseASCII(lang, theGuard2.get())))
+                if (startsWith(toLowerCaseASCII(langVal, theGuard1.get()), toLowerCaseASCII(lang, theGuard2.get())))
                 {
                     const XalanDOMString::size_type     valLen = length(lang);
 
-                    if(length(langVal) == valLen ||
-                       charAt(langVal, valLen) == XalanUnicode::charHyphenMinus)
+                    if (length(langVal) == valLen ||
+                        charAt(langVal, valLen) == XalanUnicode::charHyphenMinus)
                     {
                         fMatch = true;
 

Modified: xalan/c/trunk/src/xalanc/XPath/FunctionNormalizeSpace.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XPath/FunctionNormalizeSpace.cpp?rev=676264&r1=676263&r2=676264&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XPath/FunctionNormalizeSpace.cpp (original)
+++ xalan/c/trunk/src/xalanc/XPath/FunctionNormalizeSpace.cpp Sat Jul 12 23:16:42 2008
@@ -123,7 +123,7 @@
     bool    fPreviousIsSpace = false;
 
     // OK, strip out any multiple spaces...
-    for (unsigned int i = 0; i < theStringLength; i++)
+    for (XalanDOMString::size_type i = 0; i < theStringLength; ++i)
     {
         const XalanDOMChar  theCurrentChar = charAt(theString, i);
 



---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org