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 [6/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...

Modified: xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTDateTime.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTDateTime.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTDateTime.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTDateTime.cpp Sun Aug 31 23:42:06 2008
@@ -170,12 +170,13 @@
 {
     if (args.size() != 0)
     {
-        XalanDOMString theResult(executionContext.getMemoryManager());
-
-        executionContext.error(getError(theResult), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
-    XPathExecutionContext::GetAndReleaseCachedString    theGuard(executionContext);
+    const GetCachedString   theGuard(executionContext);
 
     XalanDOMString&     theResult = theGuard.get();
     

Modified: xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTMath.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTMath.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTMath.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTMath.cpp Sun Aug 31 23:42:06 2008
@@ -132,9 +132,10 @@
 {
     if (args.size() != 1)
     {
-        const XPathExecutionContext::GetCachedString    theGuard(executionContext);
-
-        executionContext.error(getError(theGuard.get()), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(args[0].null() == false);
@@ -179,9 +180,10 @@
 {
     if (args.size() != 1)
     {
-        const XPathExecutionContext::GetCachedString    theGuard(executionContext);
-
-        executionContext.error(getError(theGuard.get()), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(args[0].null() == false);
@@ -280,9 +282,10 @@
 {
     if (args.size() != 1)
     {
-        const XPathExecutionContext::GetCachedString    theGuard(executionContext);
-
-        executionContext.error(getError(theGuard.get()), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(args[0].null() == false);
@@ -325,9 +328,10 @@
 {
     if (args.size() != 1)
     {
-        const XPathExecutionContext::GetCachedString    theGuard(executionContext);
-
-        executionContext.error(getError(theGuard.get()), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(args[0].null() == false);
@@ -370,9 +374,10 @@
 {
     if (args.size() != 1)
     {
-        const XPathExecutionContext::GetCachedString    theGuard(executionContext);
-
-        executionContext.error(getError(theGuard.get()), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(args[0].null() == false);
@@ -415,9 +420,10 @@
 {
     if (args.empty() == false)
     {
-        const XPathExecutionContext::GetCachedString    theGuard(executionContext);
-
-        executionContext.error(getError(theGuard.get()), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
 #if defined(XALAN_STRICT_ANSI_HEADERS)
@@ -470,9 +476,10 @@
 {
     if (args.size() != 1)
     {
-        const XPathExecutionContext::GetCachedString    theGuard(executionContext);
-
-        executionContext.error(getError(theGuard.get()), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(args[0].null() == false);
@@ -518,9 +525,10 @@
 {
     if (args.size() != 1)
     {
-        const XPathExecutionContext::GetCachedString    theGuard(executionContext);
-
-        executionContext.error(getError(theGuard.get()), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(args[0].null() == false);
@@ -565,9 +573,10 @@
 {
     if (args.size() != 1)
     {
-        const XPathExecutionContext::GetCachedString    theGuard(executionContext);
-
-        executionContext.error(getError(theGuard.get()), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(args[0].null() == false);
@@ -613,9 +622,10 @@
 {
     if (args.size() != 2)
     {
-        const XPathExecutionContext::GetCachedString    theGuard(executionContext);
-
-        executionContext.error(getError(theGuard.get()), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(args[0].null() == false && args[1].null() == false);
@@ -1023,9 +1033,10 @@
 {
     if (args.size() != 2)
     {
-        const XPathExecutionContext::GetCachedString    theGuard(executionContext);
-
-        executionContext.error(getError(theGuard.get()), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(args[0].null() == false && args[1].null() == false);
@@ -1120,9 +1131,10 @@
 {
     if (args.size() != 1)
     {
-        const XPathExecutionContext::GetCachedString    theGuard(executionContext);
-
-        executionContext.error(getError(theGuard.get()), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(args[0].null() == false);
@@ -1166,9 +1178,10 @@
 {
     if (args.size() != 1)
     {
-        const XPathExecutionContext::GetCachedString    theGuard(executionContext);
-
-        executionContext.error(getError(theGuard.get()), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(args[0].null() == false);
@@ -1212,9 +1225,10 @@
 {
     if (args.size() != 1)
     {
-        const XPathExecutionContext::GetCachedString    theGuard(executionContext);
-
-        executionContext.error(getError(theGuard.get()), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(args[0].null() == false);
@@ -1260,9 +1274,10 @@
 {
     if (args.size() != 2)
     {
-        const XPathExecutionContext::GetCachedString    theGuard(executionContext);
-
-        executionContext.error(getError(theGuard.get()), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(args[0].null() == false && args[1].null() == false);
@@ -1309,9 +1324,10 @@
 {
     if (args.size() != 1)
     {
-        const XPathExecutionContext::GetCachedString    theGuard(executionContext);
-
-        executionContext.error(getError(theGuard.get()), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(args[0].null() == false);
@@ -1357,9 +1373,10 @@
 {
     if (args.size() != 1)
     {
-        const XPathExecutionContext::GetCachedString    theGuard(executionContext);
-
-        executionContext.error(getError(theGuard.get()), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(args[0].null() == false);
@@ -1403,9 +1420,10 @@
 {
     if (args.size() != 1)
     {
-        const XPathExecutionContext::GetCachedString    theGuard(executionContext);
-
-        executionContext.error(getError(theGuard.get()), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(args[0].null() == false);

Modified: xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTSet.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTSet.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTSet.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTSet.cpp Sun Aug 31 23:42:06 2008
@@ -42,9 +42,10 @@
 {
 	if (args.size() != 2)
 	{
-        XalanDOMString theResult(executionContext.getMemoryManager());
-
-		executionContext.error(getError(theResult), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
 	}
 
 	assert(args[0].null() == false && args[1].null() == false);
@@ -162,9 +163,10 @@
 {
 	if (args.size() != 2)
 	{
-        XalanDOMString theResult(executionContext.getMemoryManager());
-
-		executionContext.error(getError(theResult), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
 	}
 
 	return findNodes(executionContext, args, LeadingCompareFunctor(executionContext));
@@ -205,9 +207,10 @@
 {
 	if (args.size() != 2)
 	{
-        XalanDOMString theResult(executionContext.getMemoryManager());
-
-		executionContext.error(getError(theResult), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
 	}
 
 	return findNodes(executionContext, args, TrailingCompareFunctor(executionContext));

Modified: xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTString.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTString.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTString.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTString.cpp Sun Aug 31 23:42:06 2008
@@ -75,11 +75,10 @@
 
     if (theSize != 2 && theSize != 3)
     {
-        XPathExecutionContext::GetAndReleaseCachedString    theGuard(executionContext);
-
-        XalanDOMString&     theBuffer = theGuard.get();
-
-        executionContext.error(getError(theBuffer), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(
@@ -99,7 +98,7 @@
     }
     else
     {
-        XPathExecutionContext::GetAndReleaseCachedString    theGuard(executionContext);
+        const GetCachedString   theGuard(executionContext);
 
         XalanDOMString&     theResult = theGuard.get();
 
@@ -180,12 +179,11 @@
             const LocatorType*              locator) const
 {
     if (args.size() != 1)
-    {        
-        XPathExecutionContext::GetAndReleaseCachedString    theGuard(executionContext);
-
-        XalanDOMString&     theBuffer = theGuard.get();
-
-        executionContext.error(getError(theBuffer), context, locator);
+    {
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(args[0].null() == false);
@@ -199,7 +197,7 @@
     }
     else
     {
-        XPathExecutionContext::GetAndReleaseCachedString    theGuard(executionContext);
+        const GetCachedString   theGuard(executionContext);
 
         XalanDOMString&     theResult = theGuard.get();
 
@@ -237,11 +235,10 @@
 
     if (theSize != 1 && theSize != 2)
     {
-        XPathExecutionContext::GetAndReleaseCachedString    theGuard(executionContext);
-
-        XalanDOMString&     theBuffer = theGuard.get();
-
-        executionContext.error(getError(theBuffer), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(
@@ -258,7 +255,7 @@
     }
     else
     {
-        XPathExecutionContext::GetAndReleaseCachedString    theGuard(executionContext);
+        const GetCachedString   theGuard(executionContext);
 
         XalanDOMString&     theResult = theGuard.get();
 
@@ -345,11 +342,10 @@
 
     if (theSize != 2 && theSize != 3)
     {
-        XPathExecutionContext::GetAndReleaseCachedString    theGuard(executionContext);
-
-        XalanDOMString&     theBuffer = theGuard.get();
-
-        executionContext.error(getError(theBuffer), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(
@@ -370,12 +366,13 @@
     {
         return executionContext.getXObjectFactory().createStringReference(s_emptyString);
     }   
-    
-    XPathExecutionContext::GetAndReleaseCachedString theGuard(executionContext);
-    XalanDOMString &theResult = theGuard.get();
 
-    XPathExecutionContext::GetAndReleaseCachedString theGuard1(executionContext);
-    XalanDOMString &theBuffer = theGuard1.get();
+    const GetCachedString   theGuard(executionContext);
+
+    XalanDOMString&     theResult = theGuard.get();
+
+    const GetCachedString   theGuard1(executionContext);
+    XalanDOMString&     theBuffer = theGuard1.get();
 
     XALAN_USING_STD(find)
 
@@ -479,9 +476,10 @@
 
     if (theSize != 1 && theSize != 2)
     {
-        const XPathExecutionContext::GetCachedString    theGuard(executionContext);
-
-        executionContext.error(getError(theGuard.get()), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(
@@ -640,12 +638,14 @@
         {
             const XPathExecutionContext::GetCachedString    theGuard(executionContext);
 
-            executionContext.error(
+            executionContext.problem(
+                XPathExecutionContext::eXPath,
+                XPathExecutionContext::eError,
                 XalanMessageLoader::getMessage(
                     theGuard.get(),
-                    XalanMessages::InvalidURI),
-                context, 
-                locator);
+                    XalanMessages::InvalidURI), 
+                locator,
+                context);
         }
 
         curChar = highHexChar;

Modified: xalan/c/trunk/src/xalanc/XalanExtensions/FunctionDifference.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanExtensions/FunctionDifference.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanExtensions/FunctionDifference.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanExtensions/FunctionDifference.cpp Sun Aug 31 23:42:06 2008
@@ -53,10 +53,10 @@
 {
     if (args.size() != 2)
     {
-        XPathExecutionContext::GetAndReleaseCachedString theGuard(executionContext);
-        XalanDOMString& theBuffer = theGuard.get();
-
-        executionContext.error(getError(theBuffer), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(args[0].null() == false && args[1].null() == false);

Modified: xalan/c/trunk/src/xalanc/XalanExtensions/FunctionDistinct.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanExtensions/FunctionDistinct.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanExtensions/FunctionDistinct.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanExtensions/FunctionDistinct.cpp Sun Aug 31 23:42:06 2008
@@ -66,9 +66,10 @@
 {
     if (args.size() != 1)
     {
-        XPathExecutionContext::GetAndReleaseCachedString    theGuard(executionContext);
-
-        executionContext.error(getError(theGuard.get()), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(args[0].null() == false);
@@ -87,14 +88,12 @@
     }
     else if (theLength > 1)
     {
-        typedef XPathExecutionContext::GetAndReleaseCachedString    GetAndReleaseCachedString;
-
-        GetAndReleaseCachedString   theGuard(executionContext);
+        const GetCachedString   theGuard(executionContext);
 
-        XalanDOMString&             theCachedString = theGuard.get();
+        XalanDOMString&         theCachedString = theGuard.get();
 
 
-        typedef XalanSet<XalanDOMString>                    SetType;
+        typedef XalanSet<XalanDOMString>    SetType;
 
         SetType     theStrings(executionContext.getMemoryManager());
 

Modified: xalan/c/trunk/src/xalanc/XalanExtensions/FunctionEvaluate.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanExtensions/FunctionEvaluate.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanExtensions/FunctionEvaluate.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanExtensions/FunctionEvaluate.cpp Sun Aug 31 23:42:06 2008
@@ -111,9 +111,10 @@
 {
     if (args.size() != 1)
     {
-        XPathExecutionContext::GetAndReleaseCachedString theString(executionContext);
-
-        executionContext.error(getError(theString.get()), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(args[0].null() == false);
@@ -139,12 +140,14 @@
             {
                 const XPathExecutionContext::GetCachedString    theString(executionContext);
 
-                executionContext.warn(
+                executionContext.problem(
+                    XPathExecutionContext::eXPath,
+                    XPathExecutionContext::eWarning,
                     XalanMessageLoader::getMessage(
                         theString.get(),
                         XalanMessages::NoPrefixResolverAvailable),
-                    context,
-                    locator);
+                    locator,
+                    context);
 
                 resolverNode = 0;
             }

Modified: xalan/c/trunk/src/xalanc/XalanExtensions/FunctionHasSameNodes.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanExtensions/FunctionHasSameNodes.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanExtensions/FunctionHasSameNodes.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanExtensions/FunctionHasSameNodes.cpp Sun Aug 31 23:42:06 2008
@@ -53,9 +53,10 @@
 {
     if (args.size() != 2)
     {
-        XPathExecutionContext::GetAndReleaseCachedString    theGuard(executionContext);
-
-        executionContext.error(getError(theGuard.get()), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(args[0].null() == false && args[1].null() == false);

Modified: xalan/c/trunk/src/xalanc/XalanExtensions/FunctionIntersection.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanExtensions/FunctionIntersection.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanExtensions/FunctionIntersection.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanExtensions/FunctionIntersection.cpp Sun Aug 31 23:42:06 2008
@@ -53,9 +53,10 @@
 {
     if (args.size() != 2)
     {
-        XalanDOMString theResult(executionContext.getMemoryManager());
-
-        executionContext.error(getError(theResult), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(args[0].null() == false && args[1].null() == false);

Modified: xalan/c/trunk/src/xalanc/XalanExtensions/FunctionNodeSet.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanExtensions/FunctionNodeSet.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanExtensions/FunctionNodeSet.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanExtensions/FunctionNodeSet.cpp Sun Aug 31 23:42:06 2008
@@ -135,9 +135,10 @@
 {
     if (args.size() != 1)
     {
-        XalanDOMString  theError(executionContext.getMemoryManager());
-
-        executionContext.error(getError(theError), context, locator);
+        generalError(
+            executionContext,
+            context,
+            locator);
     }
 
     assert(args[0].null() == false);
@@ -154,14 +155,16 @@
     }
     else
     {
-        const XPathExecutionContext::GetAndReleaseCachedString  theGuard(executionContext);
+        const GetCachedString   theGuard(executionContext);
 
         XalanDOMString&     theMessage = theGuard.get();
 
-        executionContext.warn(
+        executionContext.problem(
+            XPathExecutionContext::eXPath,
+            XPathExecutionContext::eWarning,
             getInvalidArgumentTypeError(theMessage),
-            context,
-            locator);
+            locator,
+            context);
 
         return args[0];
     }

Modified: xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformer.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformer.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformer.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformer.cpp Sun Aug 31 23:42:06 2008
@@ -122,6 +122,7 @@
     m_externalSchemaLocation(m_memoryManager),
     m_externalNoNamespaceSchemaLocation(m_memoryManager),
     m_problemListener(0),
+    m_errorStream(0),
 #if defined(XALAN_NO_STD_NAMESPACE)
     m_warningStream(&cerr),
 #else

Modified: xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformer.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformer.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformer.hpp (original)
+++ xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformer.hpp Sun Aug 31 23:42:06 2008
@@ -873,10 +873,36 @@
     setOmitMETATag(eOmitMETATag     value);
 
     /**
+     * Set the ostream instance for reporting errors.  The default
+     * is a null pointer, so errors are not reported.  If there is 
+     * a user-installed ProblemListener instance, this is not used, as
+     * all such warnings and messages are handled by the that
+     * ProblemListener.
+     *
+     * @param theStream A pointer to the ostream instance.
+     */
+    void
+    setErrorStream(StreamType*  theStream)
+    {
+        m_errorStream = theStream;
+    }
+
+    /**
+     * Get the current error stream ostream instance.
+     *
+     * @return A pointer to the instance.  Can be a null pointer.
+     */
+    StreamType*
+    getErrorStream() const
+    {
+        return m_errorStream;
+    }
+
+    /**
      * Set the ostream instance for reporting warnings and messages.  The default
-     * is std::cerr.  If set to 0, no warnings or messages will be written.  If
-     * there is a user-installed ProblemListener instance, this is not used, as
-     * all such warnings and messages are handled by the user's ProblemListener.
+     * is std::cerr.  If set to a null pointer, no warnings or messages are written.
+     * If there is a user-installed ProblemListener instance, this is not used, as
+     * all such warnings and messages are handled by the that ProblemListener.
      *
      * @param theStream A pointer to the ostream instance.
      */
@@ -889,7 +915,7 @@
     /**
      * Get the current warning stream ostream instance.
      *
-     * @return A pointer to the instance.  Can be 0.
+     * @return A pointer to the instance.  Can be a null pointer.
      */
     StreamType*
     getWarningStream() const
@@ -1065,6 +1091,8 @@
 
     ProblemListener*                        m_problemListener;
 
+    StreamType*                             m_errorStream;
+
     StreamType*                             m_warningStream;
 
     XalanDOMString                          m_outputEncoding;

Modified: xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformerOutputStream.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformerOutputStream.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformerOutputStream.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformerOutputStream.cpp Sun Aug 31 23:42:06 2008
@@ -76,7 +76,8 @@
             XalanMessageLoader::getMessage(
                 theBuffer,
                 XalanMessages::NumberBytesWrittenDoesNotEqual),
-            getMemoryManager());
+            getMemoryManager(),
+            0);
     }
 }
 

Modified: xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformerProblemListener.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformerProblemListener.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformerProblemListener.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformerProblemListener.cpp Sun Aug 31 23:42:06 2008
@@ -41,7 +41,7 @@
 
 
 XalanTransformerProblemListener::XalanTransformerProblemListener(
-            MemoryManagerType& theManager,
+            MemoryManager&  theManager,
 			StreamType*		theWarningStream,
 			PrintWriter*	thePrintWriter) :
 	ProblemListener(),
@@ -60,16 +60,16 @@
 
 
 void
-XalanTransformerProblemListener::setPrintWriter(PrintWriter*	thePrintWriter)
+XalanTransformerProblemListener::setPrintWriter(PrintWriter*    pw)
 {
-	m_problemListener.setPrintWriter(thePrintWriter);
+    m_problemListener.setPrintWriter(pw);
 }
 
 
 
 void
 XalanTransformerProblemListener::problem(
-			eProblemSource				source,
+            eSource                     source,
 			eClassification				classification, 
 			const XalanNode*			sourceNode,
 			const ElemTemplateElement*	styleNode,
@@ -96,7 +96,7 @@
 
 		DOMStringPrintWriter	thePrintWriter(m_warningString);
 
-		ProblemListenerDefault::problem(
+		ProblemListenerDefault::defaultFormat(
 			thePrintWriter,
 			source,
 			classification,
@@ -113,4 +113,75 @@
 
 
 
+void
+XalanTransformerProblemListener::problem(
+            eSource                     source,
+			eClassification				classification, 
+			const XalanDOMString&		msg,
+            const Locator*              locator,
+			const XalanNode*			sourceNode)
+{
+	if (classification == eERROR)
+	{
+		m_problemListener.problem(
+			source,
+			classification,
+			msg,
+            locator,
+            sourceNode);
+	}
+	else if (m_warningStream != 0)
+	{
+        m_warningString.erase();
+
+		DOMStringPrintWriter	thePrintWriter(m_warningString);
+
+		ProblemListenerDefault::defaultFormat(
+			thePrintWriter,
+			source,
+			classification,
+			msg,
+            locator,
+            sourceNode);
+
+		*m_warningStream << m_warningString;
+	}
+}
+
+
+
+void
+XalanTransformerProblemListener::problem(
+            eSource                     source,
+			eClassification				classification, 
+			const XalanDOMString&		msg,
+			const XalanNode*			sourceNode)
+{
+	if (classification == eERROR)
+	{
+		m_problemListener.problem(
+			source,
+			classification,
+			msg,
+            sourceNode);
+	}
+	else if (m_warningStream != 0)
+	{
+        m_warningString.erase();
+
+		DOMStringPrintWriter	thePrintWriter(m_warningString);
+
+		ProblemListenerDefault::defaultFormat(
+			thePrintWriter,
+			source,
+			classification,
+			msg,
+            sourceNode);
+
+		*m_warningStream << m_warningString;
+	}
+}
+
+
+
 XALAN_CPP_NAMESPACE_END

Modified: xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformerProblemListener.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformerProblemListener.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformerProblemListener.hpp (original)
+++ xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformerProblemListener.hpp Sun Aug 31 23:42:06 2008
@@ -35,6 +35,10 @@
 
 
 // Xalan header files.
+#include <xalanc/XalanDOM/XalanDOMString.hpp>
+
+
+
 #include <xalanc/XSLT/ProblemListenerDefault.hpp>
 
 
@@ -54,21 +58,21 @@
 #endif
 
 	XalanTransformerProblemListener(
-            MemoryManagerType&  theManager,
-			StreamType*		    theStream,
-			PrintWriter*	    thePrintWriter);
+            MemoryManager&  theManager,
+			StreamType*		theStream,
+			PrintWriter*	thePrintWriter);
 
 	virtual
 	~XalanTransformerProblemListener();
 
 	// These methods are inherited from ProblemListener ...
-	
+
 	virtual void
-	setPrintWriter(PrintWriter*		pw);
+	setPrintWriter(PrintWriter*     pw);
 
 	virtual void
 	problem(
-			eProblemSource				source,
+            eSource                     source,
 			eClassification				classification,
 			const XalanNode*			sourceNode,
 			const ElemTemplateElement*	styleNode,
@@ -77,6 +81,21 @@
 			XalanFileLoc				lineNo,
 			XalanFileLoc				charOffset);
 
+	virtual void
+	problem(
+            eSource                 source,
+			eClassification			classification,
+			const XalanDOMString&	msg,
+            const Locator*          locator,
+			const XalanNode*		sourceNode);
+
+	virtual void
+	problem(
+            eSource                 source,
+            eClassification         classification,
+			const XalanDOMString&   msg,
+			const XalanNode*		sourceNode);
+
 private:
 
     //not implemented

Modified: xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesLiaisonXalanDOMStringPool.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesLiaisonXalanDOMStringPool.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesLiaisonXalanDOMStringPool.cpp (original)
+++ xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesLiaisonXalanDOMStringPool.cpp Sun Aug 31 23:42:06 2008
@@ -31,22 +31,25 @@
 {
 }
 
+
+
 XercesLiaisonXalanDOMStringPool*
 XercesLiaisonXalanDOMStringPool::    create(MemoryManagerType& theManager)
 {
     typedef XercesLiaisonXalanDOMStringPool 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);
+    ThisType* const     theResult =
+        new (theGuard.get()) ThisType(theManager);
 
     theGuard.release();
 
     return theResult;
 }
 
+
+
 XercesLiaisonXalanDOMStringPool::~XercesLiaisonXalanDOMStringPool()
 {
 }

Modified: xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesParserLiaison.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesParserLiaison.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesParserLiaison.cpp (original)
+++ xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesParserLiaison.cpp Sun Aug 31 23:42:06 2008
@@ -593,7 +593,11 @@
     {
         // We call warning() because we don't want the execution
         // context to potentially throw an exception.
-        m_executionContext->warn(theMessage);
+        m_executionContext->problem(
+            ExecutionContext::eXMLParser,
+            ExecutionContext::eWarning,
+            theMessage,
+            0);
     }
     else
     {
@@ -623,7 +627,11 @@
     {
         // We call warn() because we don't want the execution
         // context to potentially throw an exception.
-        m_executionContext->warn(theMessage);
+        m_executionContext->problem(
+            ExecutionContext::eXMLParser,
+            ExecutionContext::eWarning,
+            theMessage,
+            0);
     }
     else
     {
@@ -654,7 +662,11 @@
 
     if (m_executionContext != 0)
     {
-        m_executionContext->warn(theMessage);
+        m_executionContext->problem(
+            ExecutionContext::eXMLParser,
+            ExecutionContext::eWarning,
+            theMessage,
+            0);
     }
     else
     {

Modified: xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesParserLiaison.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesParserLiaison.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesParserLiaison.hpp (original)
+++ xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesParserLiaison.hpp Sun Aug 31 23:42:06 2008
@@ -673,11 +673,7 @@
 		m_buildMaps = newState;
 	}
 
-#if XERCES_VERSION_MAJOR >= 2
 	typedef XERCES_CPP_NAMESPACE_QUALIFIER XercesDOMParser 	DOMParserType;
-#else
-	typedef XERCES_CPP_NAMESPACE_QUALIFIER DOMParser		DOMParserType;
-#endif
 
 protected:
 



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