XALANC-733 Fix XalanLocator.hpp wrapper
diff --git a/src/xalanc/PlatformSupport/XalanLocator.hpp b/src/xalanc/PlatformSupport/XalanLocator.hpp
index 4f4b198..f99509e 100644
--- a/src/xalanc/PlatformSupport/XalanLocator.hpp
+++ b/src/xalanc/PlatformSupport/XalanLocator.hpp
@@ -67,17 +67,19 @@
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 @@
XalanLocator&
operator=(const XalanLocator&);
+
+ const static XalanDOMChar s_dczero = 0;
};