diff options
author | Adrian Kummerländer | 2014-05-14 20:55:51 +0200 |
---|---|---|
committer | Adrian Kummerländer | 2014-05-14 20:55:51 +0200 |
commit | 5fbca0993146982ab1dbb0d352c1e15e40b3de22 (patch) | |
tree | 7f47a339fb61d5c8423162482494eafd95cc654d /src/support/filesystem_context.cc | |
parent | 943768ad437011756395b86958399992e6822604 (diff) | |
download | InputXSLT-5fbca0993146982ab1dbb0d352c1e15e40b3de22.tar InputXSLT-5fbca0993146982ab1dbb0d352c1e15e40b3de22.tar.gz InputXSLT-5fbca0993146982ab1dbb0d352c1e15e40b3de22.tar.bz2 InputXSLT-5fbca0993146982ab1dbb0d352c1e15e40b3de22.tar.lz InputXSLT-5fbca0993146982ab1dbb0d352c1e15e40b3de22.tar.xz InputXSLT-5fbca0993146982ab1dbb0d352c1e15e40b3de22.tar.zst InputXSLT-5fbca0993146982ab1dbb0d352c1e15e40b3de22.zip |
Moved responsibility for argument conversion to FunctionBase descendants
* external functions may expect arguments with a type different from boost::filesystem::path so they are only provided raw string values
* moved xalan string conversion logic into separate compilation unit
Diffstat (limited to 'src/support/filesystem_context.cc')
-rw-r--r-- | src/support/filesystem_context.cc | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/support/filesystem_context.cc b/src/support/filesystem_context.cc index 30502b3..8395046 100644 --- a/src/support/filesystem_context.cc +++ b/src/support/filesystem_context.cc @@ -3,22 +3,9 @@ #include <algorithm> #include <iterator> +#include "support/xalan_string.h" #include "support/xerces_string_guard.h" -namespace { - -inline std::string xalanToString(const xalan::XalanDOMString& text) { - xalan::CharVectorType castHelper; - text.transcode(castHelper); - - return std::string( - castHelper.begin(), - castHelper.end() - 1 - ); -} - -} - namespace InputXSLT { FilesystemContext::FilesystemContext(const xalan::Locator* locator): @@ -38,7 +25,7 @@ boost::filesystem::path FilesystemContext::resolve( boost::filesystem::path FilesystemContext::resolve( const xalan::XalanDOMString& path) const { - return this->resolve(xalanToString(path)); + return this->resolve(toString(path)); } void FilesystemContext::iterate( @@ -78,7 +65,7 @@ void FilesystemContext::iterate( const xalan::XalanDOMString& path, std::function<void(const boost::filesystem::path&)> func ) const { - this->iterate(xalanToString(path), func); + this->iterate(toString(path), func); } } |