aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2014-10-11 23:18:05 +0200
committerAdrian Kummerlaender2014-10-11 23:18:05 +0200
commit3c166ed07051b78bfcd40c7cabc376060cd96eb9 (patch)
tree1e20f555a0dc54772ff8bf43c0a2a1f1d1913891
parent54900ebb18646b7c6e01103ead559e8cbfa5c947 (diff)
downloadInputXSLT-3c166ed07051b78bfcd40c7cabc376060cd96eb9.tar
InputXSLT-3c166ed07051b78bfcd40c7cabc376060cd96eb9.tar.gz
InputXSLT-3c166ed07051b78bfcd40c7cabc376060cd96eb9.tar.bz2
InputXSLT-3c166ed07051b78bfcd40c7cabc376060cd96eb9.tar.lz
InputXSLT-3c166ed07051b78bfcd40c7cabc376060cd96eb9.tar.xz
InputXSLT-3c166ed07051b78bfcd40c7cabc376060cd96eb9.tar.zst
InputXSLT-3c166ed07051b78bfcd40c7cabc376060cd96eb9.zip
Changed FunctionBase FilesystemContext base to working directory
* this changes filesystem context resolution for external function execution to be relative to the working directory ** this was changed to enable module support in BuildXSLT *** ... which is in turn required as a foundation for extracting the detail transformations into a separate "StaticXSLT" application * added parameter-less FilesystemContext constructor which defaults to the working directory
-rw-r--r--src/function/base.h7
-rw-r--r--src/support/filesystem_context.cc3
-rw-r--r--src/support/filesystem_context.h1
3 files changed, 5 insertions, 6 deletions
diff --git a/src/function/base.h b/src/function/base.h
index d53ae8a..34f0a77 100644
--- a/src/function/base.h
+++ b/src/function/base.h
@@ -120,12 +120,7 @@ class FunctionBase : public xalan::Function {
const xalan::Locator* locator,
Sequence<Index...>
) const {
- const FilesystemContext context(
- IncludeEntityResolver::getPathFromSystemId(
- locator->getSystemId()
- )
- );
-
+ const FilesystemContext context;
XObjectValue valueGetter(&context, this->include_resolver_);
return this->document_cache_->create(
diff --git a/src/support/filesystem_context.cc b/src/support/filesystem_context.cc
index be2cfb0..b726f1b 100644
--- a/src/support/filesystem_context.cc
+++ b/src/support/filesystem_context.cc
@@ -64,6 +64,9 @@ FilesystemContext::FilesystemContext(const boost::filesystem::path& path):
FilesystemContext::FilesystemContext(const std::string& path):
FilesystemContext(boost::filesystem::path(path)) { }
+FilesystemContext::FilesystemContext():
+ path_(workingDirectory) { }
+
boost::filesystem::path FilesystemContext::resolve(
const xalan::XalanDOMString& path) const {
return this->resolve(toString(path));
diff --git a/src/support/filesystem_context.h b/src/support/filesystem_context.h
index c00fe29..eefc4a3 100644
--- a/src/support/filesystem_context.h
+++ b/src/support/filesystem_context.h
@@ -22,6 +22,7 @@ class FilesystemContext {
explicit FilesystemContext(const boost::filesystem::path&);
explicit FilesystemContext(const std::string&);
+ FilesystemContext();
boost::filesystem::path resolve(const xalan::XalanDOMString&) const;
boost::filesystem::path resolve(const boost::filesystem::path&) const;