You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sh...@apache.org on 2012/09/22 08:03:43 UTC

svn commit: r1388736 - /xalan/c/trunk/src/xalanc/PlatformSupport/XalanLocator.hpp

Author: shathaway
Date: Sat Sep 22 06:03:43 2012
New Revision: 1388736

URL: http://svn.apache.org/viewvc?rev=1388736&view=rev
Log:
XALANC-733 Fix XalanLocator.hpp wrapper

Modified:
    xalan/c/trunk/src/xalanc/PlatformSupport/XalanLocator.hpp

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/XalanLocator.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/XalanLocator.hpp?rev=1388736&r1=1388735&r2=1388736&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/XalanLocator.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/XalanLocator.hpp Sat Sep 22 06:03:43 2012
@@ -67,17 +67,19 @@ public:
     static const XalanDOMChar*
     getPublicId(
             const Locator*          theLocator,
-            const XalanDOMChar*     theAlternateId = 0)
+            const XalanDOMChar*     theAlternateId = &s_dczero)
     {
-        return theLocator == 0 ? theAlternateId : theLocator->getPublicId();
+        return theLocator == 0 ? theAlternateId : (theLocator->getPublicId() ?
+            theLocator->getPublicId() : theAlternateId);
     }
 
     static const XalanDOMChar*
     getSystemId(
             const Locator*          theLocator,
-            const XalanDOMChar*     theAlternateId = 0)
+            const XalanDOMChar*     theAlternateId = &s_dczero)
     {
-        return theLocator == 0 ? theAlternateId : theLocator->getSystemId();
+        return theLocator == 0 ? theAlternateId : (theLocator->getSystemId() ?
+            theLocator->getPublicId() : theAlternateId);
     }
 
     static XalanFileLoc
@@ -122,6 +124,8 @@ private:
 
     XalanLocator&
     operator=(const XalanLocator&);
+
+    const static XalanDOMChar s_dczero = 0;
 };
 
 



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