mhoyt 2004/11/15 16:07:56
Modified: c/src/xalanc/XSLT XSLTEngineImpl.cpp
Log:
Set proper document source URI (fixes testXSLT when inputs are specified with
a relative path)
Revision Changes Path
1.25 +12 -3 xml-xalan/c/src/xalanc/XSLT/XSLTEngineImpl.cpp
Index: XSLTEngineImpl.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/XSLTEngineImpl.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- XSLTEngineImpl.cpp 15 Nov 2004 07:52:46 -0000 1.24
+++ XSLTEngineImpl.cpp 16 Nov 2004 00:07:56 -0000 1.25
@@ -538,9 +538,18 @@
XalanDOMString& xmlIdentifier = theGuard1.get();
- if (0 != inputSource.getSystemId())
+ const XalanDOMChar* const theSystemID =
inputSource.getSystemId();
+
+ if (0 != theSystemID)
{
- xmlIdentifier = inputSource.getSystemId();
+ try
+ {
+ URISupport::getURLStringFromString(theSystemID,
xmlIdentifier);
+ }
+ catch(const XERCES_CPP_NAMESPACE_QUALIFIER
XMLException&)
+ {
+ xmlIdentifier = theSystemID;
+ }
}
else
{
@@ -590,7 +599,7 @@
xmlIdentifier),
&xmlIdentifier);
}
-
+
m_xpathEnvSupport.setSourceDocument(xmlIdentifier, theDocument);
sourceTree = theDocument;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]