xalan-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbert...@apache.org
Subject svn commit: r683504 - /xalan/c/trunk/src/xalanc/PlatformSupport/XSLException.cpp
Date Thu, 07 Aug 2008 05:00:48 GMT
Author: dbertoni
Date: Wed Aug  6 22:00:47 2008
New Revision: 683504

URL: http://svn.apache.org/viewvc?rev=683504&view=rev
Log:
Fixed bug with formatting an error with no URI.

Modified:
    xalan/c/trunk/src/xalanc/PlatformSupport/XSLException.cpp

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XSLException.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XSLException.cpp?rev=683504&r1=683503&r2=683504&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XSLException.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XSLException.cpp Wed Aug  6 22:00:47 2008
@@ -134,9 +134,6 @@
 	theBuffer += XalanDOMChar(XalanUnicode::charSpace);
 	theBuffer += XalanDOMChar(XalanUnicode::charLeftParenthesis);
 
-    // Assume we have reasonable locator information.
-    XalanMessages::Codes    theMessageID = XalanMessages::InEntity_3Param;
-
     XalanDOMString  theMessageBuffer(theBuffer.getMemoryManager());
     XalanDOMString  theLineNumberBuffer(theBuffer.getMemoryManager());
     XalanDOMString  theColumnNumberBuffer(theBuffer.getMemoryManager());
@@ -147,30 +144,42 @@
         // that the column number will also be unknown.
         if (theURILength == 0)
         {
-            theMessageID = XalanMessages::InUnknownEntity;
+            XalanMessageLoader::getMessage(
+                theMessageBuffer,
+                XalanMessages::InUnknownEntity);
         }
         else
         {
-            theMessageID = XalanMessages::InEntity_1Param;
+            XalanMessageLoader::getMessage(
+                theMessageBuffer,
+                XalanMessages::InEntity_1Param,
+                theURI);
         }
     }
     else
     {
+        NumberToDOMString(theLineNumber, theLineNumberBuffer);
+        NumberToDOMString(theColumnNumber, theColumnNumberBuffer);
+
         if (theURILength == 0)
         {
-            theMessageID = XalanMessages::InUnknownEntity_2Param;
+            XalanMessageLoader::getMessage(
+                theMessageBuffer,
+                XalanMessages::InUnknownEntity_2Param,
+                theLineNumberBuffer.c_str(),
+                theColumnNumberBuffer.c_str());
+        }
+        else
+        {
+            XalanMessageLoader::getMessage(
+                theMessageBuffer,
+                XalanMessages::InEntity_3Param,
+                theURI,
+                theLineNumberBuffer.c_str(),
+                theColumnNumberBuffer.c_str());
         }
-
-        NumberToDOMString(theLineNumber, theLineNumberBuffer);
-        NumberToDOMString(theColumnNumber, theColumnNumberBuffer);
     }
 
-    XalanMessageLoader::getMessage(
-        theMessageBuffer,
-        theMessageID,
-        theURI,
-        theLineNumberBuffer.c_str(),
-        theColumnNumberBuffer.c_str());
 
     theBuffer.append(theMessageBuffer);
 	theBuffer += XalanDOMChar(XalanUnicode::charRightParenthesis);



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


Mime
View raw message