diff options
Diffstat (limited to 'src/support')
-rw-r--r-- | src/support/filesystem_context.cc | 4 | ||||
-rw-r--r-- | src/support/filesystem_context.h | 2 | ||||
-rw-r--r-- | src/support/type/xobject_value.cc | 11 |
3 files changed, 16 insertions, 1 deletions
diff --git a/src/support/filesystem_context.cc b/src/support/filesystem_context.cc index 21548a5..183af13 100644 --- a/src/support/filesystem_context.cc +++ b/src/support/filesystem_context.cc @@ -57,4 +57,8 @@ boost::filesystem::path FilesystemContext::resolve( } } +boost::filesystem::path FilesystemContext::getBase() const { + return this->path_; +} + } diff --git a/src/support/filesystem_context.h b/src/support/filesystem_context.h index 2088c6b..f3875a3 100644 --- a/src/support/filesystem_context.h +++ b/src/support/filesystem_context.h @@ -26,6 +26,8 @@ class FilesystemContext { boost::filesystem::path resolve(const xalan::XalanDOMString&) const; boost::filesystem::path resolve(const boost::filesystem::path&) const; + boost::filesystem::path getBase() const; + private: const boost::filesystem::path path_; diff --git a/src/support/type/xobject_value.cc b/src/support/type/xobject_value.cc index a788e8e..9bb6648 100644 --- a/src/support/type/xobject_value.cc +++ b/src/support/type/xobject_value.cc @@ -9,6 +9,7 @@ #include <string> #include "support/xalan_string.h" +#include "support/xerces_string_guard.h" namespace InputXSLT { @@ -73,7 +74,15 @@ xalan::XSLTInputSource XObjectValue::get<xalan::XSLTInputSource>( this->get<boost::filesystem::path>(ptr).string().data() ); } else { - return xalan::XSLTInputSource(node); + xalan::XSLTInputSource source(node); + + source.setSystemId( + *XercesStringGuard<XMLCh>( + this->filesystem_context_.getBase().string() + ) + ); + + return source; } } |