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/09/01 08:42:13 UTC

svn commit: r690861 [1/6] - in /xalan/c/trunk: Projects/Win32/VC8/AllInOne/ Projects/Win32/VC9/AllInOne/ Tests/Conf/ samples/ExternalFunction/ src/xalanc/DOMSupport/ src/xalanc/Harness/ src/xalanc/ICUBridge/ src/xalanc/Include/ src/xalanc/NLS/en_US/ sr...

Author: dbertoni
Date: Sun Aug 31 23:42:06 2008
New Revision: 690861

URL: http://svn.apache.org/viewvc?rev=690861&view=rev
Log:
Major error reporting cleanup.

Modified:
    xalan/c/trunk/Projects/Win32/VC8/AllInOne/AllInOne.vcproj
    xalan/c/trunk/Projects/Win32/VC9/AllInOne/AllInOne.vcproj
    xalan/c/trunk/Tests/Conf/conf.cpp
    xalan/c/trunk/samples/ExternalFunction/ExternalFunction.cpp
    xalan/c/trunk/src/xalanc/DOMSupport/DOMSupportException.cpp
    xalan/c/trunk/src/xalanc/DOMSupport/DOMSupportException.hpp
    xalan/c/trunk/src/xalanc/Harness/XalanFileUtility.cpp
    xalan/c/trunk/src/xalanc/Harness/XalanFileUtility.hpp
    xalan/c/trunk/src/xalanc/ICUBridge/ICUBridge.cpp
    xalan/c/trunk/src/xalanc/ICUBridge/ICUBridgeCollationCompareFunctor.cpp
    xalan/c/trunk/src/xalanc/ICUBridge/ICUBridgeCollationCompareFunctorImpl.cpp
    xalan/c/trunk/src/xalanc/ICUBridge/ICUFormatNumberFunctor.cpp
    xalan/c/trunk/src/xalanc/Include/XalanMap.hpp
    xalan/c/trunk/src/xalanc/Include/XalanMemoryManagement.hpp
    xalan/c/trunk/src/xalanc/Include/XalanVector.hpp
    xalan/c/trunk/src/xalanc/NLS/en_US/XalanMsg_en_US.xlf
    xalan/c/trunk/src/xalanc/PlatformSupport/AttributeListImpl.cpp
    xalan/c/trunk/src/xalanc/PlatformSupport/AttributeListImpl.hpp
    xalan/c/trunk/src/xalanc/PlatformSupport/AttributesImpl.cpp
    xalan/c/trunk/src/xalanc/PlatformSupport/AttributesImpl.hpp
    xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.cpp
    xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.hpp
    xalan/c/trunk/src/xalanc/PlatformSupport/ExecutionContext.cpp
    xalan/c/trunk/src/xalanc/PlatformSupport/ExecutionContext.hpp
    xalan/c/trunk/src/xalanc/PlatformSupport/PlatformSupportInit.cpp
    xalan/c/trunk/src/xalanc/PlatformSupport/PrintWriter.hpp
    xalan/c/trunk/src/xalanc/PlatformSupport/URISupport.cpp
    xalan/c/trunk/src/xalanc/PlatformSupport/URISupport.hpp
    xalan/c/trunk/src/xalanc/PlatformSupport/XSLException.cpp
    xalan/c/trunk/src/xalanc/PlatformSupport/XSLException.hpp
    xalan/c/trunk/src/xalanc/PlatformSupport/XalanCollationServices.hpp
    xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringHashTable.cpp
    xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringHashTable.hpp
    xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringPool.cpp
    xalan/c/trunk/src/xalanc/PlatformSupport/XalanFStreamOutputStream.cpp
    xalan/c/trunk/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp
    xalan/c/trunk/src/xalanc/PlatformSupport/XalanFileOutputStream.hpp
    xalan/c/trunk/src/xalanc/PlatformSupport/XalanLocator.hpp
    xalan/c/trunk/src/xalanc/PlatformSupport/XalanOutputStream.cpp
    xalan/c/trunk/src/xalanc/PlatformSupport/XalanOutputStream.hpp
    xalan/c/trunk/src/xalanc/PlatformSupport/XalanStdOutputStream.cpp
    xalan/c/trunk/src/xalanc/PlatformSupport/XalanTranscodingServices.cpp
    xalan/c/trunk/src/xalanc/PlatformSupport/XalanTranscodingServices.hpp
    xalan/c/trunk/src/xalanc/XMLSupport/XMLParserLiaison.hpp
    xalan/c/trunk/src/xalanc/XMLSupport/XMLSupportException.cpp
    xalan/c/trunk/src/xalanc/XMLSupport/XMLSupportException.hpp
    xalan/c/trunk/src/xalanc/XPath/Function.cpp
    xalan/c/trunk/src/xalanc/XPath/Function.hpp
    xalan/c/trunk/src/xalanc/XPath/FunctionConcat.cpp
    xalan/c/trunk/src/xalanc/XPath/FunctionID.cpp
    xalan/c/trunk/src/xalanc/XPath/FunctionLang.cpp
    xalan/c/trunk/src/xalanc/XPath/FunctionNamespaceURI.cpp
    xalan/c/trunk/src/xalanc/XPath/FunctionNormalizeSpace.cpp
    xalan/c/trunk/src/xalanc/XPath/FunctionNormalizeSpace.hpp
    xalan/c/trunk/src/xalanc/XPath/FunctionString.cpp
    xalan/c/trunk/src/xalanc/XPath/FunctionSubstring.cpp
    xalan/c/trunk/src/xalanc/XPath/FunctionSubstringAfter.cpp
    xalan/c/trunk/src/xalanc/XPath/FunctionSubstringBefore.cpp
    xalan/c/trunk/src/xalanc/XPath/FunctionTranslate.cpp
    xalan/c/trunk/src/xalanc/XPath/XObject.cpp
    xalan/c/trunk/src/xalanc/XPath/XObject.hpp
    xalan/c/trunk/src/xalanc/XPath/XObjectFactory.hpp
    xalan/c/trunk/src/xalanc/XPath/XObjectFactoryDefault.cpp
    xalan/c/trunk/src/xalanc/XPath/XObjectFactoryDefault.hpp
    xalan/c/trunk/src/xalanc/XPath/XPath.cpp
    xalan/c/trunk/src/xalanc/XPath/XPath.hpp
    xalan/c/trunk/src/xalanc/XPath/XPathConstructionContext.hpp
    xalan/c/trunk/src/xalanc/XPath/XPathConstructionContextDefault.cpp
    xalan/c/trunk/src/xalanc/XPath/XPathConstructionContextDefault.hpp
    xalan/c/trunk/src/xalanc/XPath/XPathEnvSupport.hpp
    xalan/c/trunk/src/xalanc/XPath/XPathEnvSupportDefault.cpp
    xalan/c/trunk/src/xalanc/XPath/XPathEnvSupportDefault.hpp
    xalan/c/trunk/src/xalanc/XPath/XPathEvaluator.cpp
    xalan/c/trunk/src/xalanc/XPath/XPathExecutionContext.cpp
    xalan/c/trunk/src/xalanc/XPath/XPathExecutionContext.hpp
    xalan/c/trunk/src/xalanc/XPath/XPathExecutionContextDefault.cpp
    xalan/c/trunk/src/xalanc/XPath/XPathExecutionContextDefault.hpp
    xalan/c/trunk/src/xalanc/XPath/XPathFunctionTable.cpp
    xalan/c/trunk/src/xalanc/XPath/XPathFunctionTable.hpp
    xalan/c/trunk/src/xalanc/XPath/XPathParserException.cpp
    xalan/c/trunk/src/xalanc/XPath/XPathParserException.hpp
    xalan/c/trunk/src/xalanc/XPath/XPathProcessorImpl.cpp
    xalan/c/trunk/src/xalanc/XPath/XPathProcessorImpl.hpp
    xalan/c/trunk/src/xalanc/XPath/XStringCached.cpp
    xalan/c/trunk/src/xalanc/XPath/XStringCached.hpp
    xalan/c/trunk/src/xalanc/XPath/XStringCachedAllocator.cpp
    xalan/c/trunk/src/xalanc/XPath/XStringCachedAllocator.hpp
    xalan/c/trunk/src/xalanc/XPath/XalanQName.cpp
    xalan/c/trunk/src/xalanc/XPath/XalanQName.hpp
    xalan/c/trunk/src/xalanc/XPath/XalanQNameByValue.cpp
    xalan/c/trunk/src/xalanc/XPath/XalanQNameByValue.hpp
    xalan/c/trunk/src/xalanc/XPath/XalanQNameByValueAllocator.cpp
    xalan/c/trunk/src/xalanc/XPath/XalanQNameByValueAllocator.hpp
    xalan/c/trunk/src/xalanc/XPath/XalanXPathException.cpp
    xalan/c/trunk/src/xalanc/XPath/XalanXPathException.hpp
    xalan/c/trunk/src/xalanc/XSLT/AVT.cpp
    xalan/c/trunk/src/xalanc/XSLT/ElemAttribute.cpp
    xalan/c/trunk/src/xalanc/XSLT/ElemElement.cpp
    xalan/c/trunk/src/xalanc/XSLT/ElemExtensionCall.cpp
    xalan/c/trunk/src/xalanc/XSLT/ElemForEach.cpp
    xalan/c/trunk/src/xalanc/XSLT/ElemLiteralResult.cpp
    xalan/c/trunk/src/xalanc/XSLT/ElemMessage.cpp
    xalan/c/trunk/src/xalanc/XSLT/ElemMessage.hpp
    xalan/c/trunk/src/xalanc/XSLT/ElemNumber.cpp
    xalan/c/trunk/src/xalanc/XSLT/ElemPI.cpp
    xalan/c/trunk/src/xalanc/XSLT/ElemTemplateElement.cpp
    xalan/c/trunk/src/xalanc/XSLT/ElemValueOf.cpp
    xalan/c/trunk/src/xalanc/XSLT/ElemWithParam.cpp
    xalan/c/trunk/src/xalanc/XSLT/ExtensionNSHandler.hpp
    xalan/c/trunk/src/xalanc/XSLT/FunctionDocument.cpp
    xalan/c/trunk/src/xalanc/XSLT/FunctionFormatNumber.cpp
    xalan/c/trunk/src/xalanc/XSLT/FunctionGenerateID.cpp
    xalan/c/trunk/src/xalanc/XSLT/FunctionKey.cpp
    xalan/c/trunk/src/xalanc/XSLT/FunctionSystemProperty.cpp
    xalan/c/trunk/src/xalanc/XSLT/FunctionUnparsedEntityURI.cpp
    xalan/c/trunk/src/xalanc/XSLT/KeyTable.cpp
    xalan/c/trunk/src/xalanc/XSLT/NamespacesHandler.cpp
    xalan/c/trunk/src/xalanc/XSLT/NamespacesHandler.hpp
    xalan/c/trunk/src/xalanc/XSLT/NodeSorter.cpp
    xalan/c/trunk/src/xalanc/XSLT/ProblemListener.cpp
    xalan/c/trunk/src/xalanc/XSLT/ProblemListener.hpp
    xalan/c/trunk/src/xalanc/XSLT/ProblemListenerDefault.cpp
    xalan/c/trunk/src/xalanc/XSLT/ProblemListenerDefault.hpp
    xalan/c/trunk/src/xalanc/XSLT/Stylesheet.cpp
    xalan/c/trunk/src/xalanc/XSLT/Stylesheet.hpp
    xalan/c/trunk/src/xalanc/XSLT/StylesheetConstructionContext.hpp
    xalan/c/trunk/src/xalanc/XSLT/StylesheetConstructionContextDefault.cpp
    xalan/c/trunk/src/xalanc/XSLT/StylesheetConstructionContextDefault.hpp
    xalan/c/trunk/src/xalanc/XSLT/StylesheetExecutionContext.hpp
    xalan/c/trunk/src/xalanc/XSLT/StylesheetExecutionContextDefault.cpp
    xalan/c/trunk/src/xalanc/XSLT/StylesheetExecutionContextDefault.hpp
    xalan/c/trunk/src/xalanc/XSLT/StylesheetHandler.cpp
    xalan/c/trunk/src/xalanc/XSLT/StylesheetRoot.cpp
    xalan/c/trunk/src/xalanc/XSLT/VariablesStack.cpp
    xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.cpp
    xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.hpp
    xalan/c/trunk/src/xalanc/XSLT/XSLTProcessor.cpp
    xalan/c/trunk/src/xalanc/XSLT/XSLTProcessor.hpp
    xalan/c/trunk/src/xalanc/XSLT/XSLTProcessorEnvSupport.hpp
    xalan/c/trunk/src/xalanc/XSLT/XSLTProcessorEnvSupportDefault.cpp
    xalan/c/trunk/src/xalanc/XSLT/XSLTProcessorEnvSupportDefault.hpp
    xalan/c/trunk/src/xalanc/XSLT/XSLTProcessorException.cpp
    xalan/c/trunk/src/xalanc/XSLT/XSLTProcessorException.hpp
    xalan/c/trunk/src/xalanc/XalanDOM/XalanDOMString.cpp
    xalan/c/trunk/src/xalanc/XalanDOM/XalanDOMString.hpp
    xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTCommon.cpp
    xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTDateTime.cpp
    xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTMath.cpp
    xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTSet.cpp
    xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTString.cpp
    xalan/c/trunk/src/xalanc/XalanExtensions/FunctionDifference.cpp
    xalan/c/trunk/src/xalanc/XalanExtensions/FunctionDistinct.cpp
    xalan/c/trunk/src/xalanc/XalanExtensions/FunctionEvaluate.cpp
    xalan/c/trunk/src/xalanc/XalanExtensions/FunctionHasSameNodes.cpp
    xalan/c/trunk/src/xalanc/XalanExtensions/FunctionIntersection.cpp
    xalan/c/trunk/src/xalanc/XalanExtensions/FunctionNodeSet.cpp
    xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformer.cpp
    xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformer.hpp
    xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformerOutputStream.cpp
    xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformerProblemListener.cpp
    xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformerProblemListener.hpp
    xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesLiaisonXalanDOMStringPool.cpp
    xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesParserLiaison.cpp
    xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesParserLiaison.hpp

Modified: xalan/c/trunk/Projects/Win32/VC8/AllInOne/AllInOne.vcproj
URL: http://svn.apache.org/viewvc/xalan/c/trunk/Projects/Win32/VC8/AllInOne/AllInOne.vcproj?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/Projects/Win32/VC8/AllInOne/AllInOne.vcproj (original)
+++ xalan/c/trunk/Projects/Win32/VC8/AllInOne/AllInOne.vcproj Sun Aug 31 23:42:06 2008
@@ -1132,6 +1132,14 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\..\..\src\xalanc\PlatformSupport\ProblemListenerBase.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\..\src\xalanc\PlatformSupport\ProblemListenerBase.hpp"
+				>
+			</File>
+			<File
 				RelativePath="..\..\..\..\src\xalanc\PlatformSupport\Resettable.cpp"
 				>
 			</File>

Modified: xalan/c/trunk/Projects/Win32/VC9/AllInOne/AllInOne.vcproj
URL: http://svn.apache.org/viewvc/xalan/c/trunk/Projects/Win32/VC9/AllInOne/AllInOne.vcproj?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/Projects/Win32/VC9/AllInOne/AllInOne.vcproj (original)
+++ xalan/c/trunk/Projects/Win32/VC9/AllInOne/AllInOne.vcproj Sun Aug 31 23:42:06 2008
@@ -1125,6 +1125,14 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\..\..\src\xalanc\PlatformSupport\ProblemListenerBase.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\..\src\xalanc\PlatformSupport\ProblemListenerBase.hpp"
+				>
+			</File>
+			<File
 				RelativePath="..\..\..\..\src\xalanc\PlatformSupport\Resettable.cpp"
 				>
 			</File>

Modified: xalan/c/trunk/Tests/Conf/conf.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/Tests/Conf/conf.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/Tests/Conf/conf.cpp (original)
+++ xalan/c/trunk/Tests/Conf/conf.cpp Sun Aug 31 23:42:06 2008
@@ -23,8 +23,10 @@
 
 #if defined(XALAN_CLASSIC_IOSTREAMS)
 #include <iostream.h>
+#include <strstream.h>
 #else
 #include <iostream>
+#include <strstream>
 #endif
 
 #include <cstdio>
@@ -203,7 +205,7 @@
     XALAN_USING_XERCES(XercesDOMParser)
     XALAN_USING_XERCES(DOMDocument)
 
-    MemoryManagerType& mgr = h.getMemoryManager();
+    MemoryManager&  mgr = h.getMemoryManager();
 
     h.data.xmlFormat = XalanDOMString("Xerces_DOM", mgr);
 
@@ -376,6 +378,17 @@
                         const XSLTInputSource   xmlInputSource(theXMLFile, theMemoryManager);
                         const XSLTResultTarget  resultFile(theOutputFile, theMemoryManager);
 
+                        XALAN_USING_STD(ostrstream)
+
+                        // Setting a warning stream will swallow output in non-verbose mode.
+                        ostrstream  theDummyStream;
+
+                        if (h.getVerbose() == false)
+                        {
+                            xalan.setWarningStream(0);
+                            // xalan.setWarningStream(&theDummyStream);
+                        }
+
                         // Parsing(compile) the XSL stylesheet and report the results..
                         //
                         const XalanCompiledStylesheet*  compiledSS = 0;

Modified: xalan/c/trunk/samples/ExternalFunction/ExternalFunction.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/samples/ExternalFunction/ExternalFunction.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/samples/ExternalFunction/ExternalFunction.cpp (original)
+++ xalan/c/trunk/samples/ExternalFunction/ExternalFunction.cpp Sun Aug 31 23:42:06 2008
@@ -80,7 +80,7 @@
 		{
             XPathExecutionContext::GetAndReleaseCachedString	theGuard(executionContext);
 
-			executionContext.error(getError(theGuard.get()), context, locator);
+			generalError(executionContext, context, locator);
 		}
 
 		assert(args[0].null() == false);	
@@ -169,7 +169,7 @@
 		{
             XPathExecutionContext::GetAndReleaseCachedString	theGuard(executionContext);
 
-			executionContext.error(getError(theGuard.get()), context, locator);
+			generalError(executionContext, context, locator);
 		}
 
 		assert(args[0].null() == false);	
@@ -256,9 +256,7 @@
 	{
 		if (args.empty() == false)
 		{
-            XPathExecutionContext::GetAndReleaseCachedString	theGuard(executionContext);
-
-			executionContext.error(getError(theGuard.get()), context, locator);
+			generalError(executionContext, context, locator);
 		}
 
 #if defined(XALAN_STRICT_ANSI_HEADERS)

Modified: xalan/c/trunk/src/xalanc/DOMSupport/DOMSupportException.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/DOMSupport/DOMSupportException.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/DOMSupport/DOMSupportException.cpp (original)
+++ xalan/c/trunk/src/xalanc/DOMSupport/DOMSupportException.cpp Sun Aug 31 23:42:06 2008
@@ -25,9 +25,25 @@
 
 
 
-DOMSupportException::DOMSupportException(const XalanDOMString&	message,
-                                         MemoryManagerType&     theManager) :
-	XSLException(message, theManager)
+DOMSupportException::DOMSupportException(
+            const XalanDOMString&	theMessage,
+            MemoryManager&          theManager,
+            const Locator*          theLocator) :
+	XSLException(
+        theMessage,
+        theManager,
+        theLocator)
+{
+}
+
+
+
+DOMSupportException::DOMSupportException(
+            const XalanDOMString&	theMessage,
+            MemoryManager&          theManager) :
+	XSLException(
+        theMessage,
+        theManager)
 {
 }
 
@@ -39,4 +55,38 @@
 
 
 
+static const XalanDOMChar   s_type[] = 
+{	
+	XalanUnicode::charLetter_D,
+	XalanUnicode::charLetter_O,
+	XalanUnicode::charLetter_M,
+	XalanUnicode::charLetter_S,
+	XalanUnicode::charLetter_u,
+	XalanUnicode::charLetter_p,
+	XalanUnicode::charLetter_p,
+	XalanUnicode::charLetter_o,
+	XalanUnicode::charLetter_r,
+	XalanUnicode::charLetter_t,
+	XalanUnicode::charLetter_E,
+	XalanUnicode::charLetter_x,
+	XalanUnicode::charLetter_c,
+	XalanUnicode::charLetter_e,
+	XalanUnicode::charLetter_p,
+	XalanUnicode::charLetter_t,
+	XalanUnicode::charLetter_i,
+	XalanUnicode::charLetter_o,
+	XalanUnicode::charLetter_n,
+	0
+};
+
+
+
+const XalanDOMChar*
+DOMSupportException::getType() const
+{
+    return s_type;
+}
+
+
+
 XALAN_CPP_NAMESPACE_END

Modified: xalan/c/trunk/src/xalanc/DOMSupport/DOMSupportException.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/DOMSupport/DOMSupportException.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/DOMSupport/DOMSupportException.hpp (original)
+++ xalan/c/trunk/src/xalanc/DOMSupport/DOMSupportException.hpp Sun Aug 31 23:42:06 2008
@@ -45,13 +45,32 @@
 	/**
 	 * Constructor for an exception arising from DOMSupport classes
 	 * 
-	 * @param message error message
+	 * @param theMessage The error message.
+     * @param theManager the MemoryManager instance to use.
+     * @param theLocator The Locator instance to use, if any.
 	 */
-	explicit DOMSupportException(const XalanDOMString&	message, MemoryManagerType& theManager);
+    DOMSupportException(
+            const XalanDOMString&	theMessage,
+            MemoryManager&          theManager,
+            const Locator*          theLocator);
+
+	/**
+	 * Constructor for an exception arising from DOMSupport classes.
+     * Use this constructor when the error message is already formatted.
+	 * 
+	 * @param theMessage The error message.
+     * @param theManager the MemoryManager instance to use.
+	 */
+    DOMSupportException(
+            const XalanDOMString&	theMessage,
+            MemoryManager&          theManager);
 
 	virtual
 	~DOMSupportException();
 
+	virtual const XalanDOMChar*
+	getType() const;
+
 private:
 };
 

Modified: xalan/c/trunk/src/xalanc/Harness/XalanFileUtility.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/Harness/XalanFileUtility.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/Harness/XalanFileUtility.cpp (original)
+++ xalan/c/trunk/src/xalanc/Harness/XalanFileUtility.cpp Sun Aug 31 23:42:06 2008
@@ -58,7 +58,9 @@
 
 
 
+#include "xercesc/sax/ErrorHandler.hpp"
 #include "xercesc/sax/SAXException.hpp"
+#include "xercesc/sax/SAXParseException.hpp"
 
 
 
@@ -192,7 +194,8 @@
 XalanFileUtility::XalanFileUtility(MemoryManager&   theManager) :
     data(theManager),
     args(theManager),
-    m_buffer(theManager)
+    m_buffer(theManager),
+    m_verbose(false)
 {
     cout << endl
          << "Using Xalan version "
@@ -550,7 +553,10 @@
         if (!mkdir(theDir, DIR_MODE_BITS))
 #endif
         {
-            cout << theDir << " created." << endl;
+            if (m_verbose == true)
+            {
+                cout << theDir << " created." << endl;
+            }
         }
         else
         {
@@ -827,7 +833,7 @@
             const XalanCompiledStylesheet*  compiledSS, 
             const XalanSourceTreeDocument*  dom,
             const XSLTInputSource&          goldInputSource,
-            XalanXMLFileReporter&                logfile)
+            XalanXMLFileReporter&           logfile)
 {
     const int   ambgFlag = data.nogold;
 
@@ -857,7 +863,7 @@
     const XalanDocument* const  goldDom =
         parserLiaison.parseXMLStream(goldInputSource);
 
-    if(domCompare(*goldDom, *dom))
+    if (domCompare(*goldDom, *dom))
     {
         cout << "Passed: " << data.testOrFile << endl;
         logfile.logCheckPass(data.testOrFile);
@@ -902,6 +908,36 @@
     }
 }
 
+
+
+class DummyErrorHandler : public XERCES_CPP_NAMESPACE_QUALIFIER ErrorHandler
+{
+    virtual void
+    warning(const XERCES_CPP_NAMESPACE_QUALIFIER SAXParseException& exc)
+    {
+        throw exc;
+    }
+
+    virtual void
+    error(const XERCES_CPP_NAMESPACE_QUALIFIER SAXParseException& exc)
+    {
+        throw exc;
+    }
+
+    virtual void
+    fatalError(const XERCES_CPP_NAMESPACE_QUALIFIER SAXParseException& exc)
+    {
+        throw exc;
+    }
+
+    virtual void
+    resetErrors()
+    {
+    }
+};
+
+
+
 /*  This routine takes the result file and gold file and parses them.
 //  If either of the files fails to parse and a SAXException is throw,
 //  then the files are compared using a char by char file compare,
@@ -919,7 +955,6 @@
             const XalanDOMString&   outputFile,
             const XalanDOMString&   goldFile)
 {
-
     const XSLTInputSource   resultInputSource(outputFile, getMemoryManager());
     const XSLTInputSource   goldInputSource(goldFile, getMemoryManager());
 
@@ -928,6 +963,10 @@
 
     domSupport.setParserLiaison(&parserLiaison);
 
+    DummyErrorHandler   theErrorHandler;
+
+    parserLiaison.setErrorHandler(&theErrorHandler);
+
     try
     {
         const XalanDocument* const  transformDom =
@@ -945,7 +984,10 @@
     // to be compared with the Gold,  with a character by character basis,  not via the DOM compair. 
     catch (const XERCES_CPP_NAMESPACE_QUALIFIER SAXException&)
     {
-        cout << "SAXException: Using fileCompare to check output.\n";
+        if (m_verbose == true)
+        {
+            cout << "SAXException: Using fileCompare to check output.\n";
+        }
 
         CharVectorType     goldFileVec(getMemoryManager());
         TranscodeToLocalCodePage(goldFile, goldFileVec, true);

Modified: xalan/c/trunk/src/xalanc/Harness/XalanFileUtility.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/Harness/XalanFileUtility.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/Harness/XalanFileUtility.hpp (original)
+++ xalan/c/trunk/src/xalanc/Harness/XalanFileUtility.hpp Sun Aug 31 23:42:06 2008
@@ -83,7 +83,7 @@
         int             fail;
         int             nogold;
 
-        reportStruct(MemoryManager& theManager);
+        reportStruct(MemoryManager&     theManager);
 
         void
         reset();
@@ -143,6 +143,18 @@
 
     ~XalanFileUtility();
 
+    bool
+    getVerbose() const
+    {
+        return m_verbose;
+    }
+
+    void
+    setVerbose(bool flag)
+    {
+        m_verbose = flag;
+    }
+
     /** 
     * Utility method used to get test files from a specific directory.
     * @returns a vector containing test files.
@@ -391,7 +403,7 @@
     const MemoryManager&
     getMemoryManager() const
     {
-        return *m_buffer.getMemoryManager();
+        return m_buffer.getMemoryManager();
     }
 
     MemoryManager&
@@ -440,6 +452,8 @@
 
     CharVectorType  m_buffer;
 
+    bool            m_verbose;
+
     //Not implemented
     XalanFileUtility();
     XalanFileUtility(const XalanFileUtility&);

Modified: xalan/c/trunk/src/xalanc/ICUBridge/ICUBridge.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/ICUBridge/ICUBridge.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/ICUBridge/ICUBridge.cpp (original)
+++ xalan/c/trunk/src/xalanc/ICUBridge/ICUBridge.cpp Sun Aug 31 23:42:06 2008
@@ -75,7 +75,11 @@
 	}
 	else
 	{
-		return UnicodeString(theString, length(theString));
+        assert(theLength == static_cast<int32_t>(theLength));
+
+        return UnicodeString(
+                    theString,
+                    static_cast<int32_t>(theLength));
 	}
 }
 

Modified: xalan/c/trunk/src/xalanc/ICUBridge/ICUBridgeCollationCompareFunctor.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/ICUBridge/ICUBridgeCollationCompareFunctor.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/ICUBridge/ICUBridgeCollationCompareFunctor.cpp (original)
+++ xalan/c/trunk/src/xalanc/ICUBridge/ICUBridgeCollationCompareFunctor.cpp Sun Aug 31 23:42:06 2008
@@ -31,32 +31,38 @@
 
 
 ICUBridgeCollationCompareFunctor::ICUBridgeCollationCompareFunctor(
-        MemoryManagerType& theManager, bool	fCacheCollators) :
+            MemoryManager&  theManager,
+            bool            fCacheCollators) :
     m_impl(ICUBridgeCollationCompareFunctorImpl::create(theManager, fCacheCollators))
 {
 }
 
+
+
 ICUBridgeCollationCompareFunctor*
-ICUBridgeCollationCompareFunctor::create (MemoryManagerType& theManager , bool	fCacheCollators) 
+ICUBridgeCollationCompareFunctor::create(
+            MemoryManager&  theManager,
+            bool            fCacheCollators) 
 {
     typedef ICUBridgeCollationCompareFunctor ThisType;
 
-    XalanMemMgrAutoPtr<ThisType, false> theGuard( theManager , (ThisType*)theManager.allocate(sizeof(ThisType)));
-
-    ThisType* theResult = theGuard.get();
+    XalanAllocationGuard    theGuard(theManager, theManager.allocate(sizeof(ThisType)));
 
-    new (theResult) ThisType(theManager, fCacheCollators);
+    ThisType* const     theResult =
+        new (theGuard.get()) ThisType(theManager, fCacheCollators);
 
-   theGuard.release();
+    theGuard.release();
 
     return theResult;
 }
 
+
+
 ICUBridgeCollationCompareFunctor::~ICUBridgeCollationCompareFunctor()
 {
-    MemoryManagerType& theManager = m_impl->getMemoryManager();
-
-	destroyObjWithMemMgr(m_impl, theManager);
+    XalanDestroy(
+        m_impl->getMemoryManager(),
+        *m_impl);
 }
 
 

Modified: xalan/c/trunk/src/xalanc/ICUBridge/ICUBridgeCollationCompareFunctorImpl.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/ICUBridge/ICUBridgeCollationCompareFunctorImpl.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/ICUBridge/ICUBridgeCollationCompareFunctorImpl.cpp (original)
+++ xalan/c/trunk/src/xalanc/ICUBridge/ICUBridgeCollationCompareFunctorImpl.cpp Sun Aug 31 23:42:06 2008
@@ -150,11 +150,21 @@
 			const XalanDOMChar*		theLHS,
 			const XalanDOMChar*		theRHS) const
 {
+    const XalanDOMString::size_type     theLHSLength =
+        length(theLHS);
+
+    const XalanDOMString::size_type     theRHSLength =
+        length(theRHS);
+
+    assert(
+        theLHSLength == static_cast<int32_t>(theLHSLength) &&
+        theRHSLength == static_cast<int32_t>(theRHSLength));
+
 	return theCollator.compare(
 				theLHS,
-				length(theLHS),
+				static_cast<int32_t>(theLHSLength),
 				theRHS,
-				length(theRHS));
+				static_cast<int32_t>(theRHSLength));
 }
 
 
@@ -333,11 +343,21 @@
 				caseOrderConvert(theCaseOrder),
 				theStatus);
 
-	return theCollator.compare(
+    const XalanDOMString::size_type     theLHSLength =
+        length(theLHS);
+
+    const XalanDOMString::size_type     theRHSLength =
+        length(theRHS);
+
+    assert(
+        theLHSLength == static_cast<int32_t>(theLHSLength) &&
+        theRHSLength == static_cast<int32_t>(theRHSLength));
+
+    return theCollator.compare(
 					theLHS,
-					length(theLHS),
+					static_cast<int32_t>(theLHSLength),
 					theRHS,
-					length(theRHS));
+					static_cast<int32_t>(theRHSLength));
 }
 
 

Modified: xalan/c/trunk/src/xalanc/ICUBridge/ICUFormatNumberFunctor.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/ICUBridge/ICUFormatNumberFunctor.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/ICUBridge/ICUFormatNumberFunctor.cpp (original)
+++ xalan/c/trunk/src/xalanc/ICUBridge/ICUFormatNumberFunctor.cpp Sun Aug 31 23:42:06 2008
@@ -101,12 +101,14 @@
     {
         const XPathExecutionContext::GetCachedString    theGuard(executionContext);
 
-        executionContext.warn(
+        executionContext.problem(
+            XPathExecutionContext::eXSLTProcessor,
+            XPathExecutionContext::eWarning,
             XalanMessageLoader::getMessage(
                 theGuard.get(),
                 XalanMessages::FormatNumberFailed),
-            context,
-            locator);
+            locator,
+            context);
     }       
 }
 

Modified: xalan/c/trunk/src/xalanc/Include/XalanMap.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/Include/XalanMap.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/Include/XalanMap.hpp (original)
+++ xalan/c/trunk/src/xalanc/Include/XalanMap.hpp Sun Aug 31 23:42:06 2008
@@ -241,7 +241,7 @@
 
     XalanMap(
             MemoryManagerType&  theMemoryManager,
-            float               loadFactor = 0.75,
+            double              loadFactor = 0.75,
             size_type           minBuckets = eDefaultMinBuckets,
             size_type           eraseThreshold = eDefaultEraseThreshold) :
         m_memoryManager(&theMemoryManager),
@@ -577,6 +577,8 @@
             const Key&  key,
             size_type   modulus) const
     {
+        assert(modulus != 0);
+
         return m_hash(key) % modulus;
     }
 
@@ -589,6 +591,7 @@
     {
         // grow the number of buckets by 60%
         const size_type     theNewSize = size_type(1.6 * size());
+        assert(theNewSize != 0);
 
         BucketTableType     temp(
                                 theNewSize,
@@ -713,7 +716,7 @@
 
     MemoryManagerType*					m_memoryManager;
 
-    float								m_loadFactor;
+    double								m_loadFactor;
 
     const size_type						m_minBuckets;
 

Modified: xalan/c/trunk/src/xalanc/Include/XalanMemoryManagement.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/Include/XalanMemoryManagement.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/Include/XalanMemoryManagement.hpp (original)
+++ xalan/c/trunk/src/xalanc/Include/XalanMemoryManagement.hpp Sun Aug 31 23:42:06 2008
@@ -506,6 +506,13 @@
 
 };
 
+template <class C>
+struct ExplicitMemoryManagedConstructionTraits
+{
+    typedef ConstructWithMemoryManager<C> Constructor;
+
+};
+
 #define  XALAN_USES_MEMORY_MANAGER(Type)  \
 template<> \
 struct MemoryManagedConstructionTraits<Type> \

Modified: xalan/c/trunk/src/xalanc/Include/XalanVector.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/Include/XalanVector.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/Include/XalanVector.hpp (original)
+++ xalan/c/trunk/src/xalanc/Include/XalanVector.hpp Sun Aug 31 23:42:06 2008
@@ -25,9 +25,6 @@
 #include <xalanc/Include/PlatformDefinitions.hpp>
 
 
-#include <xalanc/Include/XalanMemoryManagement.hpp>
-#include <xalanc/Include/XalanMemMgrAutoPtr.hpp>
-
 
 #include <cstddef>
 #include <algorithm>
@@ -38,11 +35,14 @@
 
 
 
+#include <xalanc/Include/XalanMemoryManagement.hpp>
+
 
 
 XALAN_CPP_NAMESPACE_BEGIN
 
 
+
 #if defined(_MSC_VER)
 #pragma warning(push)
 #pragma warning(disable: 4100)
@@ -116,7 +116,7 @@
 
     XalanVector(
             MemoryManager&  theManager XALAN_DEFAULT_CONSTRUCTOR_MEMMGR,
-            size_type           initialAllocation = size_type(0)) :
+            size_type       initialAllocation = size_type(0)) :
         m_memoryManager(&theManager),
         m_size(0),
         m_allocation(initialAllocation),
@@ -132,11 +132,10 @@
     {
         typedef XalanVector ThisType;
 
-        XalanMemMgrAutoPtr<ThisType, false> theGuard( theManager , (ThisType*)theManager.allocate(sizeof(ThisType)));
+        XalanAllocationGuard    theGuard(theManager, theManager.allocate(sizeof(ThisType)));
 
-        ThisType* theResult = theGuard.get();
-
-        new (theResult) ThisType(theManager, initialAllocation);
+        ThisType* const     theResult =
+                new (theGuard.get()) ThisType(theManager, initialAllocation);
 
         theGuard.release();
 
@@ -198,11 +197,10 @@
     {
         typedef XalanVector ThisType;
 
-        XalanMemMgrAutoPtr<ThisType, false> theGuard( theManager , (ThisType*)theManager.allocate(sizeof(ThisType)));
-
-        ThisType* theResult = theGuard.get();
+        XalanAllocationGuard    theGuard(theManager, theManager.allocate(sizeof(ThisType)));
 
-        new (theResult) ThisType(theFirst, theLast, theManager);
+        ThisType* const     theResult =
+                new (theGuard.get()) ThisType(theFirst, theLast, theManager);
 
         theGuard.release();
 
@@ -864,10 +862,12 @@
         invariants();
     }
 
-    const MemoryManager*
+    const MemoryManager&
     getMemoryManager() const
     {
-        return m_memoryManager;
+        assert (m_memoryManager != 0);
+
+        return *m_memoryManager;
     }
 
     MemoryManager&

Modified: xalan/c/trunk/src/xalanc/NLS/en_US/XalanMsg_en_US.xlf
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/NLS/en_US/XalanMsg_en_US.xlf?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/NLS/en_US/XalanMsg_en_US.xlf (original)
+++ xalan/c/trunk/src/xalanc/NLS/en_US/XalanMsg_en_US.xlf Sun Aug 31 23:42:06 2008
@@ -519,19 +519,19 @@
 		<target>'{0}' has an invalid '{1}' attribute.</target>
 </trans-unit>
 
-<trans-unit id="AttributeMustBe_2Params">
-		<source>The attribute value must be '{0}' or '{1}'.</source>
-		<target>The attribute value must be '{0}' or '{1}'.</target>
+<trans-unit id="AttributeMustBe_3Params">
+		<source>The value of the attribute '{0}' must be '{1}' or '{2}'.</source>
+		<target>The value of the attribute '{0}' must be '{1}' or '{2}'.</target>
 </trans-unit>
 
 <trans-unit id="StylesheetHasWrapperlessTemplate">
-		<source>The stylesheet already has a wrapperless template.</source>
-		<target>The stylesheet already has a wrapperless template.</target>
+		<source>The stylesheet already has a literal result element template.</source>
+		<target>The stylesheet already has a literal result element template.</target>
 </trans-unit>
 
-<trans-unit id="StylesheetHasDuplicateNamedTemplate">
-		<source>The stylesheet already has a template with this name.</source>
-		<target>The stylesheet already has a template with this name.</target>
+<trans-unit id="StylesheetHasDuplicateNamedTemplate_1Param">
+		<source>The stylesheet already has a template with the expanded name '{0}'.</source>
+		<target>The stylesheet already has a template with the expanded name '{0}'.</target>
 </trans-unit>
 
 <trans-unit id="UnknownXSLTToken_1Param">
@@ -740,8 +740,13 @@
 </trans-unit>
 
 <trans-unit id="CantLoadReqDocument_1Param">
-		<source>Cannot load requested document: '{0}'.</source>
-		<target>Cannot load requested document: '{0}'.</target>
+		<source>The document '{0}' could not be loaded.</source>
+		<target>The document '{0}' could not be loaded.</target>
+</trans-unit>
+
+<trans-unit id="CantLoadReqDocument_2Param">
+		<source>The document '{0}' could not be loaded.  (Base URI: '{1}')</source>
+		<target>The document '{0}' could not be loaded.  (Base URI: '{1}')</target>
 </trans-unit>
 
 <trans-unit id="ElementRequiresAttribute_2Param">

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/AttributeListImpl.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/AttributeListImpl.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/AttributeListImpl.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/AttributeListImpl.cpp Sun Aug 31 23:42:06 2008
@@ -230,6 +230,8 @@
 	return &*m_AttributeVector[index]->m_Value.begin();
 }
 
+
+
 const XMLCh*
 AttributeListImpl::	getValue(const char* const /*name*/) const
 {
@@ -238,13 +240,8 @@
     return 0;
 }
 
-#if defined(XALAN_NEEDS_EXPLICIT_TEMPLATE_INSTANTIATION)
-bool
-AttributeListImpl::NameCompareFunctor::operator()(const AttributeVectorEntry*	theEntry) const
-{
-	return equals(&*theEntry->m_Name.begin(), m_name);
-}
-#else
+
+
 struct NameCompareFunctor
 {
 	NameCompareFunctor(const XMLCh*		theName) :
@@ -262,7 +259,6 @@
 
 	const XMLCh* const	m_name;
 };
-#endif
 
 
 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/AttributeListImpl.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/AttributeListImpl.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/AttributeListImpl.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/AttributeListImpl.hpp Sun Aug 31 23:42:06 2008
@@ -151,23 +151,6 @@
 	// This vector will hold the entries.
 	typedef XalanVector<AttributeVectorEntry*>			AttributeVectorType;
 
-#if defined(XALAN_NEEDS_EXPLICIT_TEMPLATE_INSTANTIATION)
-	struct NameCompareFunctor
-	{
-		NameCompareFunctor(const XMLCh*		theName) :
-			m_name(theName)
-		{
-		}
-
-		bool
-		operator()(const AttributeVectorEntry*	theEntry) const;
-
-	private:
-
-		const XMLCh* const	m_name;
-	};
-#endif
-
 private:
 
 	// This is not implemented.

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/AttributesImpl.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/AttributesImpl.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/AttributesImpl.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/AttributesImpl.cpp Sun Aug 31 23:42:06 2008
@@ -252,19 +252,6 @@
 
 
 
-#if defined(XALAN_NEEDS_EXPLICIT_TEMPLATE_INSTANTIATION)
-bool
-AttributesImpl::NameCompareFunctor::operator()(const AttributeVectorEntryExtended*	theEntry) const
-{
-	return equals(&*theEntry->m_Name.begin(), m_qname);
-}
-
-bool
-AttributesImpl::URIAndLocalNameCompareFunctor::operator()(const AttributeVectorEntryExtended*	theEntry) const
-{
-	return equals(&*theEntry->m_uri.begin(), m_uri) && equals(&*theEntry->m_localName.begin(), m_localName) ;
-}
-#else
 struct NameCompareFunctor
 {
 	NameCompareFunctor(const XMLCh*		theQName) :
@@ -306,7 +293,6 @@
 	const XMLCh* const	m_uri;
 	const XMLCh* const	m_localName;
 };
-#endif
 
 
 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/AttributesImpl.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/AttributesImpl.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/AttributesImpl.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/AttributesImpl.hpp Sun Aug 31 23:42:06 2008
@@ -207,42 +207,6 @@
 	// This vector will hold the entries.
 	typedef XalanVector<AttributeVectorEntryExtended*>		AttributesVectorType;
 
-#if defined(XALAN_NEEDS_EXPLICIT_TEMPLATE_INSTANTIATION)
-	struct NameCompareFunctor
-	{
-		NameCompareFunctor(const XMLCh*		theQName) :
-			m_qname(theQName)
-		{
-		}
-
-		bool
-		operator()(const AttributeVectorEntryExtended*	theEntry) const;
-
-	private:
-
-		const XMLCh* const	m_qname;
-	};
-
-	struct URIAndLocalNameCompareFunctor
-	{
-		URIAndLocalNameCompareFunctor(
-				const XMLCh*	theURI,
-				const XMLCh*	theLocalName) :
-			m_uri(theURI),
-			m_localName(theLocalName)
-		{
-		}
-
-		bool
-		operator()(const AttributeVectorEntryExtended*	theEntry) const;
-
-	private:
-
-		const XMLCh* const	m_uri;
-		const XMLCh* const	m_localName;
-	};
-#endif
-
 private:
 
 	// This is not implemented.

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.cpp Sun Aug 31 23:42:06 2008
@@ -25,7 +25,10 @@
 #include <cmath>
 #include <cstdio>
 #include <cstdlib>
-
+#if defined(XALAN_WINDOWS)
+#include <clocale>
+#include <cstring>
+#endif
 
 
 #include <algorithm>
@@ -424,8 +427,6 @@
 {
 	const XalanDOMString::size_type		theStringLength = length(theString);
 
-	// $$$ ToDo: In Java-land, any failing of this
-	// assertion would result in an exception being thrown.
 	assert(theStartIndex <= theStringLength);
 
 	if (theStartIndex == theStringLength)
@@ -746,6 +747,39 @@
 
 
 
+template <class Type, class SizeType, class FunctionType>
+int
+doCollationCompare(
+			const Type*		theLHS,
+			const Type*		theRHS,
+			FunctionType	theTransformFunction)
+{
+    SizeType	i = 0;
+
+    Type  theLHSChar;
+    Type  theRHSChar;
+
+	for (;;)
+	{
+        theLHSChar = theTransformFunction(theLHS[i]);
+        theRHSChar = theTransformFunction(theRHS[i]);
+
+        if (theLHS == static_cast<Type>(0) ||
+            theLHSChar != theRHSChar)
+        {
+            break;
+        }
+        else
+        {
+            ++i;
+        }
+	}
+
+    return theLHSChar - theRHSChar;
+}
+
+
+
 XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(int)
 compare(
 			const CharVectorType&	theLHS,
@@ -812,6 +846,28 @@
 
 
 
+#if defined(XALAN_WINDOWS)
+static _locale_t   s_locale;
+#endif
+
+XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(int)
+collationCompare(
+            const XalanDOMChar*     theLHS,
+            const XalanDOMChar*     theRHS)
+{
+#if defined(XALAN_WINDOWS)
+    return _wcscoll_l(theLHS, theRHS, s_locale);
+#else
+	return doCollationCompare(
+				theLHS,
+				theRHS,
+				makeXalanDOMCharIdentityTransform());
+#endif
+}
+
+
+
+
 template <class Type, class SizeType, class FunctionType>
 bool
 doEquals(
@@ -1832,4 +1888,25 @@
 }
 
 
+
+void
+DOMStringHelper::initialize(MemoryManager&  /* theMemoryManager */)
+{
+#if defined(XALAN_WINDOWS)
+    s_locale = _create_locale(LC_COLLATE, "");
+#endif
+}
+
+
+
+void
+DOMStringHelper::terminate()
+{
+#if defined(XALAN_WINDOWS)
+    _free_locale(s_locale);
+#endif
+}
+
+
+
 XALAN_CPP_NAMESPACE_END

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.hpp Sun Aug 31 23:42:06 2008
@@ -643,6 +643,13 @@
 
     typedef void (FormatterListener::*MemberFunctionPtr)(const XMLCh* const, const FormatterListener::size_type);
 
+
+    static void
+    initialize(MemoryManager&    theMemoryManager);
+
+    static void
+    terminate();
+
     static void
     NumberToCharacters(
             double              theValue,
@@ -1890,13 +1897,10 @@
  * @see operator<()
  * @see compare()
  */
-inline int
+XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(int)
 collationCompare(
             const XalanDOMChar*     theLHS,
-            const XalanDOMChar*     theRHS)
-{
-    return collationCompare(theLHS, length(theLHS), theRHS, length(theRHS));
-}
+            const XalanDOMChar*     theRHS);
 
 
 
@@ -1915,7 +1919,7 @@
             const XalanDOMString&   theLHS,
             const XalanDOMString&   theRHS)
 {
-    return collationCompare(toCharArray(theLHS), length(theLHS), toCharArray(theRHS), length(theRHS));
+    return collationCompare(theLHS.c_str(), theRHS.c_str());
 }
 
 
@@ -1933,7 +1937,7 @@
             const XalanDOMChar*     theLHS,
             const XalanDOMString&   theRHS)
 {
-    return collationCompare(theLHS, length(theLHS), toCharArray(theRHS), length(theRHS));
+    return collationCompare(theLHS, theRHS.c_str());
 }
 
 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/ExecutionContext.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/ExecutionContext.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/ExecutionContext.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/ExecutionContext.cpp Sun Aug 31 23:42:06 2008
@@ -24,8 +24,8 @@
 
 
 
-ExecutionContext::ExecutionContext(MemoryManager&   m_memoryManager) :
-    m_memoryManager(m_memoryManager),
+ExecutionContext::ExecutionContext(MemoryManager&   theMemoryManager) :
+    m_memoryManager(theMemoryManager),
     m_hasPreserveOrStripConditions(false)
 {
 }

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/ExecutionContext.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/ExecutionContext.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/ExecutionContext.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/ExecutionContext.hpp Sun Aug 31 23:42:06 2008
@@ -23,8 +23,16 @@
 // Base include file.  Must be first.
 #include <xalanc/PlatformSupport/PlatformSupportDefinitions.hpp>
 
+
+
 #include <xalanc/Include/XalanMemoryManagement.hpp>
 
+
+
+#include "xalanc/PlatformSupport/ProblemListenerBase.hpp"
+
+
+
 XALAN_DECLARE_XERCES_CLASS(Locator)
 
 
@@ -46,53 +54,31 @@
 //
 // An abstract class which provides support for execution.
 //
-class XALAN_PLATFORMSUPPORT_EXPORT ExecutionContext
+class XALAN_PLATFORMSUPPORT_EXPORT ExecutionContext : public ProblemListenerBase
 {
 public:
 
-	ExecutionContext(MemoryManager&     m_memoryManager);
+	ExecutionContext(MemoryManager&     theMemoryManager);
 
 	virtual
 	~ExecutionContext();
 
-	/**
-	 * Report an error and throw an exception.
-	 * 
-	 * @param msg The text of the message.
-	 * @param sourceNode The source node where the error occurred.  May be 0.
-	 * @param locator A Locator to determine where the error occurred.  May be 0.
-	 */
-	virtual void
-	error(
-			const XalanDOMString&	msg,
-			const XalanNode* 		sourceNode = 0,
-			const LocatorType* 		locator = 0) const = 0;
 
-	/**
-	 * Report a warning
-	 * 
-	 * @param msg The text of the message.
-	 * @param sourceNode The source node where the warning occurred.  May be 0.
-	 * @param locator A Locator to determine where the warning occurred.  May be 0.
-	 */
+    // These interfaces are inherited from ProblemListenerBase
 	virtual void
-	warn(
+	problem(
+			eSource		            source,
+			eClassification			classification,
 			const XalanDOMString&	msg,
-			const XalanNode* 		sourceNode = 0,
-			const LocatorType* 		locator = 0) const = 0;
+            const Locator*          locator,
+			const XalanNode*		sourceNode) = 0;
 
-	/**
-	 * Output a message.
-	 * 
-	 * @param msg The text of the message.
-	 * @param sourceNode The source node where the message occurred.  May be 0.
-	 * @param locator A Locator to determine where the message occurred.  May be 0.
-	 */
 	virtual void
-	message(
+	problem(
+            eSource                 source,
+            eClassification         classification,
 			const XalanDOMString&	msg,
-			const XalanNode* 		sourceNode = 0,
-			const LocatorType* 		locator = 0) const = 0;
+			const XalanNode*		sourceNode) = 0;
 
     bool
     hasPreserveOrStripSpaceConditions() const
@@ -111,22 +97,22 @@
     shouldStripSourceNode(const XalanText&  node) = 0;
 
     MemoryManager&
-    getMemoryManager()
+    getMemoryManager() const
     {
         return m_memoryManager;
     }
 
     MemoryManager&
-    getExceptionMemoryManager()
+    getExceptionMemoryManager() const
     {
         return *m_memoryManager.getExceptionMemoryManager();
     }
 
 protected:
 
-    MemoryManager&  m_memoryManager;
+    mutable MemoryManager&  m_memoryManager;
 
-    bool            m_hasPreserveOrStripConditions;
+    bool                    m_hasPreserveOrStripConditions;
 };
 
 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/PlatformSupportInit.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/PlatformSupportInit.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/PlatformSupportInit.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/PlatformSupportInit.cpp Sun Aug 31 23:42:06 2008
@@ -21,6 +21,7 @@
 
 
 #include "DoubleSupport.hpp"
+#include "DOMStringHelper.hpp"
 #include "XalanMessageLoader.hpp"
 #include "XalanTranscodingServices.hpp"
 
@@ -60,10 +61,12 @@
 
 
 void
-PlatformSupportInit::initialize(MemoryManagerType&      theManager)
+PlatformSupportInit::initialize(MemoryManager&  theManager)
 {
     DoubleSupport::initialize();
 
+    DOMStringHelper::initialize(theManager);
+
     XalanMessageLoader::initialize(theManager);
 
     XalanTranscodingServices::initialize(theManager);
@@ -78,6 +81,8 @@
 
     XalanMessageLoader::terminate();
 
+    DOMStringHelper::terminate();
+
     DoubleSupport::terminate();
 }
 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/PrintWriter.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/PrintWriter.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/PrintWriter.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/PrintWriter.hpp Sun Aug 31 23:42:06 2008
@@ -45,7 +45,7 @@
 	 */
 	PrintWriter( bool	fAutoFlush = false, MemoryManagerType& theManager XALAN_DEFAULT_MEMMGR);
 
-    MemoryManagerType& 
+    MemoryManager& 
     getMemoryManager()
     {
         return m_memoryManager;
@@ -161,9 +161,9 @@
 
 protected:
 
-	const bool						m_fAutoFlush;
+	const bool		m_fAutoFlush;
 
-    MemoryManagerType&              m_memoryManager;
+    MemoryManager&  m_memoryManager;
 
 	// Some static strings to help derived classes...
 	static const XalanDOMChar	s_trueString[];

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/URISupport.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/URISupport.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/URISupport.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/URISupport.cpp Sun Aug 31 23:42:06 2008
@@ -70,10 +70,11 @@
 
 
 URISupport::URLAutoPtrType
-URISupport::getURLFromString(const XalanDOMChar*	urlString,
-                             MemoryManagerType&     theManager)
+URISupport::getURLFromString(
+            const XalanDOMChar*     urlString,
+            MemoryManager&          theManager)
 {
-	URLAutoPtrType	url(new (&theManager)XMLURLType(&theManager));
+	URLAutoPtrType	url(new (&theManager) XMLURLType(&theManager));
 
     XalanDOMString normalizedURL(theManager);
 
@@ -127,20 +128,17 @@
 			XALAN_USING_XERCES(XMLPlatformUtils)
 
 			// Assume it's a file specification...
-#if _XERCES_VERSION >= 20300
 			XALAN_USING_XERCES(MemoryManager)
 
             MemoryManager&  theMemoryManager = theNormalizedURI.getMemoryManager();
 
             const ArrayJanitor<XMLCh>	theFullPathGuard(
                         XMLPlatformUtils::getFullPath(
-                            c_wstr(urlString),
+                            urlString,
                             &theMemoryManager),
                         &theMemoryManager);
-#else
-			const ArrayJanitor<XMLCh>	theFullPathGuard(XMLPlatformUtils::getFullPath(c_wstr(urlString)));
-#endif
-			const XalanDOMChar* const	theFullPath = theFullPathGuard.get();
+
+            const XalanDOMChar* const	theFullPath = theFullPathGuard.get();
 			assert(theFullPath != 0);
 
 			const XalanDOMString::size_type		theFullPathLength =
@@ -182,7 +180,7 @@
 			XalanDOMString::size_type	baseLen,
 			XalanDOMString&				theNormalizedURI)
 {
-    MemoryManagerType& theMemoryManager = theNormalizedURI.getMemoryManager();
+    MemoryManager&  theMemoryManager = theNormalizedURI.getMemoryManager();
 
 	XalanDOMString	context(base, theMemoryManager, baseLen);
 	XalanDOMString	url(urlString, theMemoryManager, urlStringLen);
@@ -223,7 +221,37 @@
 
 
 
-const XalanDOMChar	URISupport::InvalidURIException::m_type[] = 
+URISupport::InvalidURIException::InvalidURIException(
+            const XalanDOMString&	theMessage,
+            MemoryManager&          theManager,
+            const Locator*          theLocator) :
+	XSLException(
+        theMessage,
+        theManager,
+        theLocator)
+{
+}
+
+
+
+URISupport::InvalidURIException::InvalidURIException(
+            const XalanDOMString&	theMessage,
+            MemoryManager&          theManager) :
+	XSLException(
+        theMessage,
+        theManager)
+{
+}
+
+
+
+URISupport::InvalidURIException::~InvalidURIException()
+{
+}
+
+
+
+static const XalanDOMChar   s_type[] = 
 {	
 	XalanUnicode::charLetter_I,
 	XalanUnicode::charLetter_n,
@@ -249,16 +277,10 @@
 
 
 
-URISupport::InvalidURIException::InvalidURIException(const XalanDOMString&	theMessage,
-                                                     MemoryManagerType&      theManager) :
-	XSLException(theMessage,theManager)
-{
-}
-
-
-
-URISupport::InvalidURIException::~InvalidURIException()
+const XalanDOMChar*
+URISupport::InvalidURIException::getType() const
 {
+    return s_type;
 }
 
 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/URISupport.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/URISupport.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/URISupport.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/URISupport.hpp Sun Aug 31 23:42:06 2008
@@ -275,20 +275,27 @@
 		 *
 		 * @param theMessage the error message
 		 */
-		InvalidURIException(const XalanDOMString&	theMessage,
-                            MemoryManagerType&      theManager);
+		InvalidURIException(
+            const XalanDOMString&	theMessage,
+            MemoryManager&          theManager,
+            const Locator*          theLocator);
+
+		/**
+		 * Construct an InvalidURIException.
+		 *
+		 * @param theMessage the error message
+		 */
+		InvalidURIException(
+            const XalanDOMString&	theMessage,
+            MemoryManager&          theManager);
 
 		virtual
 		~InvalidURIException();
 
 		virtual const XalanDOMChar*
-		getType() const
-		{
-			return m_type;
-		}
+		getType() const;
 
 	private:
-		static const XalanDOMChar	m_type[];
 	};
 
 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XSLException.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XSLException.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XSLException.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XSLException.cpp Sun Aug 31 23:42:06 2008
@@ -29,48 +29,40 @@
 
 XALAN_CPP_NAMESPACE_BEGIN
 
-static const XalanDOMChar	s_dummy = 0;
 
-XSLException::XSLException(
-		const XalanDOMString&	theMessage,
-		const XalanDOMString&	theURI,
-		XalanFileLoc			theLineNumber,
-		XalanFileLoc			theColumnNumber,
-        MemoryManager&          theManager) :
-	m_message(theMessage, theManager),
-	m_uri(theURI, theManager),
-	m_lineNumber(theLineNumber),
-	m_columnNumber(theColumnNumber),
-    m_memoryManager(theManager)
-{
-}
+
+static const XalanDOMChar	s_dummy = 0;
 
 
 
 XSLException::XSLException(
-			const LocatorType&		theLocator,
 			const XalanDOMString&	theMessage,
-            MemoryManager&          theManager) :
+            MemoryManager&          theManager,
+            const Locator*		    theLocator) :
     m_memoryManager(theManager),
 	m_message(theMessage, theManager),
-	m_uri(
-        theLocator.getSystemId() == 0 ? &s_dummy : theLocator.getSystemId(),
+    m_uri(
+        XalanLocator::getSystemId(
+            theLocator,
+            &s_dummy),
         theManager),
-	m_lineNumber(theLocator.getLineNumber()),
-	m_columnNumber(theLocator.getColumnNumber())
+	m_lineNumber(XalanLocator::getLineNumber(theLocator)),
+	m_columnNumber(XalanLocator::getColumnNumber(theLocator)),
+    m_formatted(false)
 {
 }
 
 
 
 XSLException::XSLException(
-		const XalanDOMString&	theMessage,
-        MemoryManager&          theManager) :
+			const XalanDOMString&	theMessage,
+            MemoryManager&          theManager) :
     m_memoryManager(theManager),
 	m_message(theMessage, theManager),
-	m_uri(theManager),
-	m_lineNumber(XalanLocator::getUnknownValue()),
-	m_columnNumber(XalanLocator::getUnknownValue())
+    m_uri(),
+    m_lineNumber(XalanLocator::getUnknownValue()),
+	m_columnNumber(XalanLocator::getUnknownValue()),
+    m_formatted(true)
 {
 }
 
@@ -81,7 +73,8 @@
 	m_message(other.m_message, m_memoryManager),
 	m_uri(other.m_uri, m_memoryManager),
 	m_lineNumber(other.m_lineNumber),
-	m_columnNumber(other.m_columnNumber)
+	m_columnNumber(other.m_columnNumber),
+    m_formatted(other.m_formatted)
 {
 }
 
@@ -96,13 +89,20 @@
 void
 XSLException::defaultFormat(XalanDOMString&		theBuffer) const
 {
-	defaultFormat(
-        m_message,
-        m_uri,
-        m_lineNumber,
-        m_columnNumber,
-        getType(),
-        theBuffer);
+    if (m_formatted == true)
+    {
+        theBuffer.assign(m_message);
+    }
+    else
+    {
+	    defaultFormat(
+            m_message,
+            m_uri,
+            m_lineNumber,
+            m_columnNumber,
+            getType(),
+            theBuffer);
+    }
 }
 
 
@@ -125,14 +125,14 @@
 
     if (theTypeLength != 0)
     {
-	    theBuffer.append(theType, theTypeLength);
-	    theBuffer += XalanDOMChar(XalanUnicode::charColon);
-	    theBuffer += XalanDOMChar(XalanUnicode::charSpace);
+        theBuffer.append(theType, theTypeLength);
+        theBuffer += XalanDOMChar(XalanUnicode::charColon);
+        theBuffer += XalanDOMChar(XalanUnicode::charSpace);
     }
 
-	theBuffer.append(theMessage, theMessageLength);
-	theBuffer += XalanDOMChar(XalanUnicode::charSpace);
-	theBuffer += XalanDOMChar(XalanUnicode::charLeftParenthesis);
+    theBuffer.append(theMessage, theMessageLength);
+    theBuffer += XalanDOMChar(XalanUnicode::charSpace);
+    theBuffer += XalanDOMChar(XalanUnicode::charLeftParenthesis);
 
     XalanDOMString  theMessageBuffer(theBuffer.getMemoryManager());
     XalanDOMString  theLineNumberBuffer(theBuffer.getMemoryManager());
@@ -182,7 +182,7 @@
 
 
     theBuffer.append(theMessageBuffer);
-	theBuffer += XalanDOMChar(XalanUnicode::charRightParenthesis);
+    theBuffer += XalanDOMChar(XalanUnicode::charRightParenthesis);
 }
 
 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XSLException.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XSLException.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XSLException.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XSLException.hpp Sun Aug 31 23:42:06 2008
@@ -35,6 +35,7 @@
 
 
 typedef XERCES_CPP_NAMESPACE_QUALIFIER Locator	LocatorType;
+XALAN_USING_XERCES(Locator)
 
 
 
@@ -42,43 +43,29 @@
 {
 public:
 
-	/**
+    /**
 	 * Constructor
-	 * 
-	 * @param theMessage message to write when exception thrown
-	 * @param theURI the URI of the related document, if known
-	 * @param theLineNumber the line number of the related document.
-	 * @param theColumnNumber the column number of the related document.
-	 * @param theType type of exception, default is "XSLException"
+	 *
+	 * @param theMessage The message to display when exception thrown
+	 * @param theManager The MemoryManager instance to use.
+	 * @param theLocator The locator instance for error reporting, if any.
 	 */
 	XSLException(
 			const XalanDOMString&	theMessage,
-			const XalanDOMString&	theURI,
-			XalanFileLoc			theLineNumber,
-			XalanFileLoc			theColumnNumber,
-            MemoryManager&          theManager);
-	/**
-	 * Constructor
-	 * 
-	 * @param theLocator The locator instance for error reporting.
-	 * @param theMessage message to write when exception thrown
-	 * @param theType type of exception, default is "XSLException"
-	 */
-	XSLException(
-			const LocatorType&		theLocator,
-			const XalanDOMString&	theMessage,
-            MemoryManager&          theManager);
-	/**
-	 * Constructor
+            MemoryManager&          theManager,
+            const Locator*		    theLocator);
+
+    /**
+	 * Constructor.  Use this constructor when the message has 
+     * already been formatted.
 	 * 
-	 * @param theMessage message to write when exception thrown
-	 * @param theType type of exception, default is "XSLException"
+	 * @param theMessage The message to display when exception thrown
+	 * @param theManager The MemoryManager instance to use.
 	 */
 	XSLException(
 			const XalanDOMString&	theMessage,
             MemoryManager&          theManager);
 
-
 	XSLException(const XSLException&	other);
 
 	virtual
@@ -181,17 +168,17 @@
 			const XalanDOMChar*		theType,
 			XalanDOMString&			theBuffer)
 	{
-		assert(theMessage != 0 && theURI != 0 && theType != 0);
+		assert(theMessage != 0);
 
 		defaultFormat(
 			theMessage,
 			XalanDOMString::length(theMessage),
 			theURI,
-			XalanDOMString::length(theURI),
+            theURI == 0 ? 0 : XalanDOMString::length(theURI),
 			theLineNumber,
 			theColumnNumber,
 			theType,
-			XalanDOMString::length(theType),
+			theType == 0 ? 0 : XalanDOMString::length(theType),
 			theBuffer);
 	}
 
@@ -218,6 +205,9 @@
 
 	const XalanFileLoc		m_lineNumber;
 	const XalanFileLoc	    m_columnNumber;
+
+    // When true, the message has already formatted.
+    const bool              m_formatted;
 };
 
 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanCollationServices.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanCollationServices.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanCollationServices.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanCollationServices.hpp Sun Aug 31 23:42:06 2008
@@ -52,16 +52,12 @@
 		{
 		}
 
-		// Const version is suitable for use by
-		// multiple threads.
 		virtual int
 		operator()(
 			const XalanDOMChar*		theLHS,
 			const XalanDOMChar*		theRHS,
 			eCaseOrder				theCaseOrder = eDefault) const = 0;
 
-		// Const version is suitable for use by
-		// multiple threads.
 		virtual int
 		operator()(
 			const XalanDOMChar*		theLHS,

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringHashTable.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringHashTable.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringHashTable.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringHashTable.cpp Sun Aug 31 23:42:06 2008
@@ -27,23 +27,24 @@
 
 #include "DOMStringHelper.hpp"
 
-#include <xalanc/Include/XalanMemMngArrayAllocate.hpp>
+
 
 XALAN_CPP_NAMESPACE_BEGIN
 
 
 
 XalanDOMStringHashTable::XalanDOMStringHashTable(
-            MemoryManagerType& theManager,
-            size_t      theBucketCount,
-            size_t      theBucketSize) :
+            MemoryManager&  theManager,
+            size_t          theBucketCount,
+            size_t          theBucketSize) :
 
     m_bucketCount(theBucketCount),
     m_bucketSize(theBucketSize),
-    m_buckets(theManager , XalanMemMngArrayAllocate<BucketType>::allocateMemMgr(theBucketCount, theManager), theBucketCount),
+    m_buckets(theManager),
     m_count(0),
     m_collisions(0)
 {
+    m_buckets.resize(theBucketCount);
 }
 
 
@@ -67,7 +68,7 @@
 void
 XalanDOMStringHashTable::getBucketCounts(BucketCountsType&  theVector) const
 {
-    for(size_t i = 0; i < m_bucketCount; ++i)
+    for (size_t i = 0; i < m_bucketCount; ++i)
     {
         const bucket_size_type  size = m_buckets[i].size();
 
@@ -77,20 +78,6 @@
 
 
 
-#if defined(XALAN_NEEDS_EXPLICIT_TEMPLATE_INSTANTIATION)
-bool
-XalanDOMStringHashTable::equalsXalanDOMString::operator()(const XalanDOMString*     theString) const
-{
-    if (m_length != length(*theString))
-    {
-        return false;
-    }
-    else
-    {
-        return equals(m_string, c_wstr(*theString), m_length);
-    }
-}
-#else
 struct
 equalsXalanDOMString
 {
@@ -121,7 +108,6 @@
 
     const XalanDOMString::size_type     m_length;
 };
-#endif
 
 
 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringHashTable.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringHashTable.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringHashTable.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringHashTable.hpp Sun Aug 31 23:42:06 2008
@@ -28,10 +28,6 @@
 #include <xalanc/Include/XalanVector.hpp>
 
 
-#include <xalanc/Include/XalanMemMgrAutoPtr.hpp>
-
-
-
 
 #include <xalanc/XalanDOM/XalanDOMString.hpp>
 
@@ -48,6 +44,8 @@
 	typedef XalanVector<const XalanDOMString*>	BucketType;
 	typedef BucketType::size_type				bucket_size_type;
 	typedef XalanVector<bucket_size_type>		BucketCountsType;
+    typedef ExplicitMemoryManagedConstructionTraits<BucketType>     ConstructionTraits;
+    typedef XalanVector<BucketType, ConstructionTraits>     BucketVectorType;
 
 	enum { eDefaultBucketCount = 101, eDefaultBucketSize = 15 };
 
@@ -179,43 +177,16 @@
 			const XalanDOMString&	theString,
 			size_t					theBucketIndex);
 
-#if defined(XALAN_NEEDS_EXPLICIT_TEMPLATE_INSTANTIATION)
-	struct
-	equalsXalanDOMString
-	{
-		equalsXalanDOMString(
-				const XalanDOMChar*			theString,
-				XalanDOMString::size_type	theLength) :
-			m_string(theString),
-			m_length(theLength)
-		{
-		}
-
-		bool
-		operator()(const XalanDOMString*	theString) const;
-
-	private:
-
-		const XalanDOMChar* const			m_string;
-
-		const XalanDOMString::size_type		m_length;
-	};
-#endif
-
-    MemoryManagerType&
+    MemoryManager&
     getMemoryManager()
     {
-        assert(m_buckets.getMemoryManager() != 0);
-
-        return *m_buckets.getMemoryManager();
+        return m_buckets.getMemoryManager();
     }
 
-    const MemoryManagerType&
+    const MemoryManager&
     getMemoryManager() const
     {
-        assert(m_buckets.getMemoryManager() != 0);
-
-        return *m_buckets.getMemoryManager();
+        return m_buckets.getMemoryManager();
     }
 
 private:
@@ -231,15 +202,15 @@
 
 
 	// Data members...
-	const size_t					m_bucketCount;
+	const size_t            m_bucketCount;
 
-	const bucket_size_type			m_bucketSize;
+	const bucket_size_type  m_bucketSize;
 
-	XalanMemMgrAutoPtrArray<BucketType>	m_buckets;
+	BucketVectorType        m_buckets;
 
-	size_t							m_count;
+	size_t                  m_count;
 
-	size_t					        m_collisions;		
+	size_t                  m_collisions;		
 };
 
 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringPool.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringPool.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringPool.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanDOMStringPool.cpp Sun Aug 31 23:42:06 2008
@@ -30,36 +30,39 @@
 
 
 XalanDOMStringPool::XalanDOMStringPool(
-           MemoryManagerType&   theManager,
-			block_size_type		theBlockSize,
-			bucket_count_type	theBucketCount,
-			bucket_size_type	theBucketSize) :
+            MemoryManager&      theManager,
+			block_size_type     theBlockSize,
+			bucket_count_type   theBucketCount,
+			bucket_size_type    theBucketSize) :
 	m_stringAllocator(theManager, theBlockSize),
 	m_stringCount(0),
 	m_hashTable(theManager, theBucketCount, theBucketSize)
 {
 }
 
+
+
 XalanDOMStringPool*
 XalanDOMStringPool::create(
-                           MemoryManagerType&  theManager,
-                           block_size_type		theBlockSize ,
-                           bucket_count_type	theBucketCount ,
-                           bucket_size_type	theBucketSize )
+            MemoryManager&      theManager,
+            block_size_type     theBlockSize,
+            bucket_count_type   theBucketCount,
+            bucket_size_type    theBucketSize)
 {
     typedef XalanDOMStringPool ThisType;
 
-    XalanMemMgrAutoPtr<ThisType, false> theGuard( theManager , (ThisType*)theManager.allocate(sizeof(ThisType)));
-
-    ThisType* theResult = theGuard.get();
+    XalanAllocationGuard    theGuard(theManager, theManager.allocate(sizeof(ThisType)));
 
-    new (theResult) ThisType(theManager, theBlockSize, theBucketCount, theBucketSize);
+    ThisType* const     theResult =
+        new (theGuard.get()) ThisType(theManager, theBlockSize, theBucketCount, theBucketSize);
 
     theGuard.release();
 
     return theResult;
 }
 
+
+
 XalanDOMStringPool::~XalanDOMStringPool()
 {
 }

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanFStreamOutputStream.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanFStreamOutputStream.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanFStreamOutputStream.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanFStreamOutputStream.cpp Sun Aug 31 23:42:06 2008
@@ -178,7 +178,8 @@
                 XalanDOMString(theBuffer.getMemoryManager())),
             theErrorCode,
             theBuffer),
-        theBuffer.getMemoryManager())
+        theBuffer.getMemoryManager(),
+        0)
 {
 }
 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp Sun Aug 31 23:42:06 2008
@@ -193,7 +193,7 @@
 
 XalanFileOutputStream::XalanFileOutputStream(
             const XalanDOMString&   theFileName,
-            MemoryManagerType&      theManager,
+            MemoryManager&          theManager,
             size_type               theBufferSize) :
     XalanOutputStream(theManager, theBufferSize),
     m_fileName(theFileName, theManager),
@@ -217,6 +217,7 @@
         throw XalanFileOutputStreamOpenException(
                     theFileName,
                     errno,
+                    0,
                     theBuffer);
     }
 #endif
@@ -313,6 +314,7 @@
         throw XalanFileOutputStreamWriteException(
             m_fileName,
             errno,
+            0,
             theBuffer);
     }
 #endif
@@ -330,7 +332,8 @@
 XalanFileOutputStream::XalanFileOutputStreamOpenException::XalanFileOutputStreamOpenException(
         const XalanDOMString&   theFileName,
         int                     theErrorCode,
-        XalanDOMString&         theBuffer) :
+        XalanDOMString&         theBuffer,
+        const Locator*          theLocator) :
     XalanOutputStreamException(
         FormatMessageLocal(
             XalanMessageLoader::getMessage(
@@ -339,7 +342,8 @@
                 theFileName),
             theErrorCode,
             theBuffer),
-        theBuffer.getMemoryManager())
+        theBuffer.getMemoryManager(),
+        theLocator)
 {
 }
 
@@ -353,8 +357,9 @@
 
 XalanFileOutputStream::XalanFileOutputStreamWriteException::XalanFileOutputStreamWriteException(
         const XalanDOMString&   theFileName,
-        int                 theErrorCode,
-        XalanDOMString&     theBuffer) :
+        int                     theErrorCode,
+        XalanDOMString&         theBuffer,
+        const Locator*          theLocator) :
     XalanOutputStreamException(
         FormatMessageLocal(
             XalanMessageLoader::getMessage(
@@ -363,7 +368,8 @@
                 theFileName),
             theErrorCode,
             theBuffer),
-        theBuffer.getMemoryManager())
+        theBuffer.getMemoryManager(),
+        theLocator)
 {
 }
 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanFileOutputStream.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanFileOutputStream.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanFileOutputStream.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanFileOutputStream.hpp Sun Aug 31 23:42:06 2008
@@ -62,13 +62,13 @@
 	 */
     XalanFileOutputStream(
 			const XalanDOMString&	theFileName,
-            MemoryManagerType&      theManager,
+            MemoryManager&          theManager,
 			size_type			    theBufferSize = eDefaultBufferSize);
 
     static XalanFileOutputStream*
     create(
 			const XalanDOMString&	theFileName,
-            MemoryManagerType&      theManager,
+            MemoryManager&          theManager,
 			size_type			    theBufferSize = eDefaultBufferSize);
     virtual
 	~XalanFileOutputStream();
@@ -88,14 +88,8 @@
 		XalanFileOutputStreamOpenException(
 			const XalanDOMString&	theFileName,
 			int						theErrorCode,
-            XalanDOMString&         theBuffer);
-
-        static XalanFileOutputStreamOpenException*
-        create(
-            MemoryManagerType&      theManager,
-            const XalanDOMString&	theFileName,
-			int						theErrorCode,
-            XalanDOMString&         theBuffer);
+            XalanDOMString&         theBuffer,
+            const Locator*          theLocator = 0);
 
 		virtual
 		~XalanFileOutputStreamOpenException();
@@ -107,7 +101,8 @@
 		}
 
 	private:
-		static const XalanDOMChar	m_type[];
+
+        static const XalanDOMChar	m_type[];
 
 	};
 
@@ -125,7 +120,8 @@
 		XalanFileOutputStreamWriteException(
 			const XalanDOMString&	theFileName,
 			int						theErrorCode,
-            XalanDOMString&         theBuffer);
+            XalanDOMString&         theBuffer,
+            const Locator*          theLocator = 0);
 
 		virtual
 		~XalanFileOutputStreamWriteException();

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanLocator.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanLocator.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanLocator.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanLocator.hpp Sun Aug 31 23:42:06 2008
@@ -64,6 +64,22 @@
     virtual XalanFileLoc
     getColumnNumber() const = 0;
 
+    static const XalanDOMChar*
+    getPublicId(
+            const Locator*          theLocator,
+            const XalanDOMChar*     theAlternateId = 0)
+    {
+        return theLocator == 0 ? theAlternateId : theLocator->getPublicId();
+    }
+
+    static const XalanDOMChar*
+    getSystemId(
+            const Locator*          theLocator,
+            const XalanDOMChar*     theAlternateId = 0)
+    {
+        return theLocator == 0 ? theAlternateId : theLocator->getSystemId();
+    }
+
     static XalanFileLoc
     getLineNumber(const ParentType*     theLocator)
     {

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanOutputStream.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanOutputStream.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanOutputStream.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanOutputStream.cpp Sun Aug 31 23:42:06 2008
@@ -140,10 +140,7 @@
             {
                 XalanDOMString theBuffer(theDestination.getMemoryManager());
 
-                throw TranscodingException(theBuffer);
-            }
-            else
-            {
+                throw TranscodingException(theBuffer, 0);
             }
         }
     }
@@ -195,7 +192,7 @@
                 {
                     XalanDOMString theBuffer(theDestination.getMemoryManager());
 
-                    throw TranscodingException(theBuffer);
+                    throw TranscodingException(theBuffer, 0);
                 }
             }
 
@@ -267,13 +264,13 @@
         {
             XalanDOMString theBuffer(getMemoryManager());
 
-            throw UnsupportedEncodingException(theEncoding, theBuffer);
+            throw UnsupportedEncodingException(theEncoding, theBuffer, 0);
         }
         else if (theCode != XalanTranscodingServices::OK)
         {
             XalanDOMString theBuffer(getMemoryManager());
 
-            throw TranscoderInternalFailureException(theEncoding, theBuffer);
+            throw TranscoderInternalFailureException(theEncoding, theBuffer, 0);
         }
 
         assert(m_transcoder != 0);
@@ -425,136 +422,143 @@
 
 
 
-const XalanDOMChar  XalanOutputStream::XalanOutputStreamException::m_type[] = 
-{   
-    XalanUnicode::charLetter_X,
-    XalanUnicode::charLetter_a,
-    XalanUnicode::charLetter_l,
-    XalanUnicode::charLetter_a,
-    XalanUnicode::charLetter_n,
-    XalanUnicode::charLetter_F,
-    XalanUnicode::charLetter_i,
-    XalanUnicode::charLetter_l,
-    XalanUnicode::charLetter_e,
-    XalanUnicode::charLetter_O,
-    XalanUnicode::charLetter_u,
-    XalanUnicode::charLetter_t,
-    XalanUnicode::charLetter_p,
-    XalanUnicode::charLetter_u,
-    XalanUnicode::charLetter_t,
-    XalanUnicode::charLetter_S,
-    XalanUnicode::charLetter_t,
-    XalanUnicode::charLetter_r,
-    XalanUnicode::charLetter_e,
-    XalanUnicode::charLetter_a,
-    XalanUnicode::charLetter_m,
-    XalanUnicode::charLetter_E,
-    XalanUnicode::charLetter_x,
-    XalanUnicode::charLetter_c,
-    XalanUnicode::charLetter_e,
-    XalanUnicode::charLetter_p,
-    XalanUnicode::charLetter_t,
-    XalanUnicode::charLetter_i,
-    XalanUnicode::charLetter_o,
-    XalanUnicode::charLetter_n,
-    0
-};
+XalanOutputStream::XalanOutputStreamException::XalanOutputStreamException(
+            const XalanDOMString&   theMessage,
+            MemoryManager&          theManager,
+            const Locator*          theLocator) :
+    XSLException(
+        theMessage,
+        theManager,
+        theLocator)
+{
+}
 
 
 
 XalanOutputStream::XalanOutputStreamException::XalanOutputStreamException(
             const XalanDOMString&   theMessage,
-            MemoryManagerType&      theManager) :
-    XSLException(theMessage, theManager)
+            MemoryManager&          theManager) :
+    XSLException(
+        theMessage,
+        theManager)
 {
 }
 
 
 
-XalanOutputStream::XalanOutputStreamException::~XalanOutputStreamException()
+    XalanOutputStream::XalanOutputStreamException::XalanOutputStreamException(const XalanOutputStreamException& other):
+    XSLException(other)
 {
 }
 
-const XalanDOMChar  XalanOutputStream::UnknownEncodingException::m_type[] = 
-{   
-    XalanUnicode::charLetter_U,
-    XalanUnicode::charLetter_n,
-    XalanUnicode::charLetter_k,
-    XalanUnicode::charLetter_n,
-    XalanUnicode::charLetter_o,
-    XalanUnicode::charLetter_w,
-    XalanUnicode::charLetter_n,
-    XalanUnicode::charLetter_E,
-    XalanUnicode::charLetter_n,
-    XalanUnicode::charLetter_c,
-    XalanUnicode::charLetter_o,
-    XalanUnicode::charLetter_d,
-    XalanUnicode::charLetter_i,
-    XalanUnicode::charLetter_n,
-    XalanUnicode::charLetter_g,
-    XalanUnicode::charLetter_E,
-    XalanUnicode::charLetter_x,
-    XalanUnicode::charLetter_c,
-    XalanUnicode::charLetter_e,
-    XalanUnicode::charLetter_p,
-    XalanUnicode::charLetter_t,
-    XalanUnicode::charLetter_i,
-    XalanUnicode::charLetter_o,
-    XalanUnicode::charLetter_n,
-    0
-};
 
 
+XalanOutputStream::XalanOutputStreamException::~XalanOutputStreamException()
+{
+}
 
-XalanOutputStream::UnknownEncodingException::UnknownEncodingException(XalanDOMString& theBuffer) :
-    XalanOutputStreamException(
-        XalanMessageLoader::getMessage(
-            theBuffer,
-            XalanMessages::AnErrorOccurredWhileTranscoding),
-     theBuffer.getMemoryManager())
+
+
+const XalanDOMChar*
+XalanOutputStream::XalanOutputStreamException::getType() const
 {
+    static const XalanDOMChar   s_type[] = 
+    {   
+        XalanUnicode::charLetter_X,
+        XalanUnicode::charLetter_a,
+        XalanUnicode::charLetter_l,
+        XalanUnicode::charLetter_a,
+        XalanUnicode::charLetter_n,
+        XalanUnicode::charLetter_F,
+        XalanUnicode::charLetter_i,
+        XalanUnicode::charLetter_l,
+        XalanUnicode::charLetter_e,
+        XalanUnicode::charLetter_O,
+        XalanUnicode::charLetter_u,
+        XalanUnicode::charLetter_t,
+        XalanUnicode::charLetter_p,
+        XalanUnicode::charLetter_u,
+        XalanUnicode::charLetter_t,
+        XalanUnicode::charLetter_S,
+        XalanUnicode::charLetter_t,
+        XalanUnicode::charLetter_r,
+        XalanUnicode::charLetter_e,
+        XalanUnicode::charLetter_a,
+        XalanUnicode::charLetter_m,
+        XalanUnicode::charLetter_E,
+        XalanUnicode::charLetter_x,
+        XalanUnicode::charLetter_c,
+        XalanUnicode::charLetter_e,
+        XalanUnicode::charLetter_p,
+        XalanUnicode::charLetter_t,
+        XalanUnicode::charLetter_i,
+        XalanUnicode::charLetter_o,
+        XalanUnicode::charLetter_n,
+        0
+    };
+
+    return s_type;
 }
 
 
 
-XalanOutputStream::UnknownEncodingException::~UnknownEncodingException()
+const XalanDOMChar*
+XalanOutputStream::UnsupportedEncodingException::getType() const
 {
+    static const XalanDOMChar  s_type[] = 
+    {
+        XalanUnicode::charLetter_U,
+        XalanUnicode::charLetter_n,
+        XalanUnicode::charLetter_s,
+        XalanUnicode::charLetter_u,
+        XalanUnicode::charLetter_p,
+        XalanUnicode::charLetter_p,
+        XalanUnicode::charLetter_o,
+        XalanUnicode::charLetter_r,
+        XalanUnicode::charLetter_t,
+        XalanUnicode::charLetter_e,
+        XalanUnicode::charLetter_d,
+        XalanUnicode::charLetter_E,
+        XalanUnicode::charLetter_n,
+        XalanUnicode::charLetter_c,
+        XalanUnicode::charLetter_o,
+        XalanUnicode::charLetter_d,
+        XalanUnicode::charLetter_i,
+        XalanUnicode::charLetter_n,
+        XalanUnicode::charLetter_g,
+        XalanUnicode::charLetter_E,
+        XalanUnicode::charLetter_x,
+        XalanUnicode::charLetter_c,
+        XalanUnicode::charLetter_e,
+        XalanUnicode::charLetter_p,
+        XalanUnicode::charLetter_t,
+        XalanUnicode::charLetter_i,
+        XalanUnicode::charLetter_o,
+        XalanUnicode::charLetter_n,
+        0
+    };
+
+    return s_type;
 }
 
 
 
-const XalanDOMChar  XalanOutputStream::UnsupportedEncodingException::m_type[] = 
-{   
-    XalanUnicode::charLetter_U,
-    XalanUnicode::charLetter_n,
-    XalanUnicode::charLetter_s,
-    XalanUnicode::charLetter_u,
-    XalanUnicode::charLetter_p,
-    XalanUnicode::charLetter_p,
-    XalanUnicode::charLetter_o,
-    XalanUnicode::charLetter_r,
-    XalanUnicode::charLetter_t,
-    XalanUnicode::charLetter_e,
-    XalanUnicode::charLetter_d,
-    XalanUnicode::charLetter_E,
-    XalanUnicode::charLetter_n,
-    XalanUnicode::charLetter_c,
-    XalanUnicode::charLetter_o,
-    XalanUnicode::charLetter_d,
-    XalanUnicode::charLetter_i,
-    XalanUnicode::charLetter_n,
-    XalanUnicode::charLetter_g,
-    XalanUnicode::charLetter_E,
-    XalanUnicode::charLetter_x,
-    XalanUnicode::charLetter_c,
-    XalanUnicode::charLetter_e,
-    XalanUnicode::charLetter_p,
-    XalanUnicode::charLetter_t,
-    XalanUnicode::charLetter_i,
-    XalanUnicode::charLetter_o,
-    XalanUnicode::charLetter_n,
-    0
-};
+XalanOutputStream::UnsupportedEncodingException::UnsupportedEncodingException(
+            const XalanDOMString&   theEncoding,
+            XalanDOMString&         theBuffer,
+            const Locator*          theLocator) :
+    XalanOutputStreamException(
+        XalanMessageLoader::getMessage(
+            theBuffer,
+            XalanMessages::UnsupportedEncoding_1Param,
+            theEncoding),
+        theBuffer.getMemoryManager(),
+        theLocator),
+   m_encoding(
+       theEncoding, 
+       theBuffer.getMemoryManager())
+{
+}
 
 
 
@@ -583,13 +587,15 @@
 
 XalanOutputStream::TranscoderInternalFailureException::TranscoderInternalFailureException(
             const XalanDOMString&   theEncoding,
-            XalanDOMString&         theBuffer) :
+            XalanDOMString&         theBuffer,
+            const Locator*          theLocator) :
     XalanOutputStreamException(
         XalanMessageLoader::getMessage(
             theBuffer, 
             XalanMessages::UnknownErrorOccurredWhileTranscodingToEncoding_1Param,
             theEncoding),
-        theBuffer.getMemoryManager()),
+        theBuffer.getMemoryManager(),
+        theLocator),
     m_encoding(
         theEncoding,
         theBuffer.getMemoryManager())
@@ -598,18 +604,85 @@
 
 
 
+XalanOutputStream::TranscoderInternalFailureException::TranscoderInternalFailureException(const TranscoderInternalFailureException& other) :
+    XalanOutputStreamException(other),
+    m_encoding(
+        other.m_encoding,
+        other.m_memoryManager)
+{
+}
+
+
+
 XalanOutputStream::TranscoderInternalFailureException::~TranscoderInternalFailureException()
 {
 }
 
 
 
-XalanOutputStream::TranscodingException::TranscodingException(XalanDOMString&   theBuffer) :
+const XalanDOMChar*
+XalanOutputStream::TranscoderInternalFailureException::getType() const
+{
+    static const XalanDOMChar  s_type[] = 
+    {
+        XalanUnicode::charLetter_T,
+        XalanUnicode::charLetter_r,
+        XalanUnicode::charLetter_a,
+        XalanUnicode::charLetter_n,
+        XalanUnicode::charLetter_s,
+        XalanUnicode::charLetter_c,
+        XalanUnicode::charLetter_o,
+        XalanUnicode::charLetter_d,
+        XalanUnicode::charLetter_e,
+        XalanUnicode::charLetter_r,
+        XalanUnicode::charLetter_I,
+        XalanUnicode::charLetter_n,
+        XalanUnicode::charLetter_t,
+        XalanUnicode::charLetter_e,
+        XalanUnicode::charLetter_r,
+        XalanUnicode::charLetter_n,
+        XalanUnicode::charLetter_a,
+        XalanUnicode::charLetter_l,
+        XalanUnicode::charLetter_F,
+        XalanUnicode::charLetter_a,
+        XalanUnicode::charLetter_i,
+        XalanUnicode::charLetter_l,
+        XalanUnicode::charLetter_u,
+        XalanUnicode::charLetter_r,
+        XalanUnicode::charLetter_e,
+        XalanUnicode::charLetter_E,
+        XalanUnicode::charLetter_x,
+        XalanUnicode::charLetter_c,
+        XalanUnicode::charLetter_e,
+        XalanUnicode::charLetter_p,
+        XalanUnicode::charLetter_t,
+        XalanUnicode::charLetter_i,
+        XalanUnicode::charLetter_o,
+        XalanUnicode::charLetter_n,
+        0
+    };
+
+    return s_type;
+}
+
+
+
+XalanOutputStream::TranscodingException::TranscodingException(
+            XalanDOMString&     theBuffer,
+            const Locator*      theLocator) :
     XalanOutputStreamException(
         XalanMessageLoader::getMessage(
             theBuffer,
             XalanMessages::AnErrorOccurredWhileTranscoding),
-        theBuffer.getMemoryManager())
+        theBuffer.getMemoryManager(),
+        theLocator)
+{
+}
+
+
+
+XalanOutputStream::TranscodingException::TranscodingException(const TranscodingException& other) :
+    XalanOutputStreamException(other)
 {
 }
 
@@ -621,4 +694,37 @@
 
 
 
+const XalanDOMChar*
+XalanOutputStream::TranscodingException::getType() const
+{
+    static const XalanDOMChar  s_type[] = 
+    {
+        XalanUnicode::charLetter_T,
+        XalanUnicode::charLetter_r,
+        XalanUnicode::charLetter_a,
+        XalanUnicode::charLetter_n,
+        XalanUnicode::charLetter_s,
+        XalanUnicode::charLetter_c,
+        XalanUnicode::charLetter_o,
+        XalanUnicode::charLetter_d,
+        XalanUnicode::charLetter_i,
+        XalanUnicode::charLetter_n,
+        XalanUnicode::charLetter_g,
+        XalanUnicode::charLetter_E,
+        XalanUnicode::charLetter_x,
+        XalanUnicode::charLetter_c,
+        XalanUnicode::charLetter_e,
+        XalanUnicode::charLetter_p,
+        XalanUnicode::charLetter_t,
+        XalanUnicode::charLetter_i,
+        XalanUnicode::charLetter_o,
+        XalanUnicode::charLetter_n,
+        0
+    };
+
+    return s_type;
+}
+
+
+
 XALAN_CPP_NAMESPACE_END



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