diff options
author | Adrian Kummerländer | 2014-05-06 20:12:11 +0200 |
---|---|---|
committer | Adrian Kummerländer | 2014-05-06 20:12:11 +0200 |
commit | e17ba6dde7588f717bc5e79b3cb64cddd73d6173 (patch) | |
tree | 537d9beef3960b31ab39ebf80d30ed56c69166a8 /src | |
parent | 9aad4dffd9c8b0fde534b3abc3c27875547423fa (diff) | |
download | InputXSLT-e17ba6dde7588f717bc5e79b3cb64cddd73d6173.tar InputXSLT-e17ba6dde7588f717bc5e79b3cb64cddd73d6173.tar.gz InputXSLT-e17ba6dde7588f717bc5e79b3cb64cddd73d6173.tar.bz2 InputXSLT-e17ba6dde7588f717bc5e79b3cb64cddd73d6173.tar.lz InputXSLT-e17ba6dde7588f717bc5e79b3cb64cddd73d6173.tar.xz InputXSLT-e17ba6dde7588f717bc5e79b3cb64cddd73d6173.tar.zst InputXSLT-e17ba6dde7588f717bc5e79b3cb64cddd73d6173.zip |
Added basic external read file function test case
* ... as a test of how well we are able to test DOM structures
* required change of constructDocument visibility
Diffstat (limited to 'src')
-rw-r--r-- | src/function/read_directory.h | 3 | ||||
-rw-r--r-- | src/function/read_file.h | 3 | ||||
-rw-r--r-- | src/function/read_xml_file.h | 3 | ||||
-rw-r--r-- | src/support/filesystem_context.cc | 3 | ||||
-rw-r--r-- | src/support/filesystem_context.h | 1 |
5 files changed, 4 insertions, 9 deletions
diff --git a/src/function/read_directory.h b/src/function/read_directory.h index 2c28642..d34a80a 100644 --- a/src/function/read_directory.h +++ b/src/function/read_directory.h @@ -9,9 +9,6 @@ class FunctionReadDirectory : public FunctionBase<FunctionReadDirectory> { public: using FunctionBase<FunctionReadDirectory>::FunctionBase; - protected: - friend FunctionBase<FunctionReadDirectory>; - xercesc::DOMDocument* constructDocument( const FilesystemContext&, const boost::filesystem::path& diff --git a/src/function/read_file.h b/src/function/read_file.h index fd36847..b89263e 100644 --- a/src/function/read_file.h +++ b/src/function/read_file.h @@ -9,9 +9,6 @@ class FunctionReadFile : public FunctionBase<FunctionReadFile> { public: using FunctionBase<FunctionReadFile>::FunctionBase; - protected: - friend FunctionBase<FunctionReadFile>; - xercesc::DOMDocument* constructDocument( const FilesystemContext&, const boost::filesystem::path& diff --git a/src/function/read_xml_file.h b/src/function/read_xml_file.h index 5314b4a..b1d165d 100644 --- a/src/function/read_xml_file.h +++ b/src/function/read_xml_file.h @@ -9,9 +9,6 @@ class FunctionReadXmlFile : public FunctionBase<FunctionReadXmlFile> { public: using FunctionBase<FunctionReadXmlFile>::FunctionBase; - protected: - friend FunctionBase<FunctionReadXmlFile>; - xercesc::DOMDocument* constructDocument( const FilesystemContext&, const boost::filesystem::path& diff --git a/src/support/filesystem_context.cc b/src/support/filesystem_context.cc index 418d159..6ddbf7a 100644 --- a/src/support/filesystem_context.cc +++ b/src/support/filesystem_context.cc @@ -25,6 +25,9 @@ FilesystemContext::FilesystemContext(const xalan::Locator* locator): ).parent_path().string() )) { } +FilesystemContext::FilesystemContext(const std::string& path): + path_(boost::filesystem::canonical(path)) { } + boost::filesystem::path FilesystemContext::resolve( const std::string& path) const { return absolute(this->path_ / path); diff --git a/src/support/filesystem_context.h b/src/support/filesystem_context.h index 05d5862..6322da6 100644 --- a/src/support/filesystem_context.h +++ b/src/support/filesystem_context.h @@ -16,6 +16,7 @@ namespace InputXSLT { class FilesystemContext { public: explicit FilesystemContext(const xalan::Locator*); + explicit FilesystemContext(const std::string&); boost::filesystem::path resolve(const std::string&) const; boost::filesystem::path resolve(const xalan::XalanDOMString&) const; |