diff options
author | Adrian Kummerlaender | 2014-06-30 19:28:46 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2014-06-30 19:28:46 +0200 |
commit | 437b9d9911a4313a834e1840f8cc8e98ce821ac5 (patch) | |
tree | 7ced2c603c26bc437fd7fc97f7dff38d13324635 /src/function | |
parent | bd39d49464dbd17eb3d4cdbb5784431e43e56fbf (diff) | |
download | InputXSLT-437b9d9911a4313a834e1840f8cc8e98ce821ac5.tar InputXSLT-437b9d9911a4313a834e1840f8cc8e98ce821ac5.tar.gz InputXSLT-437b9d9911a4313a834e1840f8cc8e98ce821ac5.tar.bz2 InputXSLT-437b9d9911a4313a834e1840f8cc8e98ce821ac5.tar.lz InputXSLT-437b9d9911a4313a834e1840f8cc8e98ce821ac5.tar.xz InputXSLT-437b9d9911a4313a834e1840f8cc8e98ce821ac5.tar.zst InputXSLT-437b9d9911a4313a834e1840f8cc8e98ce821ac5.zip |
Switched external text formatter parameter to boost::filesystem::path
* this increases consistency accross all external functions
* enables usage of non-global formatter executables
Diffstat (limited to 'src/function')
-rw-r--r-- | src/function/external_text_formatter.cc | 6 | ||||
-rw-r--r-- | src/function/external_text_formatter.h | 6 | ||||
-rw-r--r-- | src/function/transform.h | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/function/external_text_formatter.cc b/src/function/external_text_formatter.cc index b2f9d33..e7ab1a2 100644 --- a/src/function/external_text_formatter.cc +++ b/src/function/external_text_formatter.cc @@ -43,8 +43,8 @@ inline xercesc::DOMNode* importDocumentElement( namespace InputXSLT { xercesc::DOMDocument* FunctionExternalTextFormatter::constructDocument( - std::string formatterPath, - std::string stdinText + boost::filesystem::path formatterPath, + std::string stdinText ) { xercesc::DOMDocument* const domDocument( xercesc::DOMImplementation::getImplementation()->createDocument( @@ -79,7 +79,7 @@ xercesc::DOMDocument* FunctionExternalTextFormatter::constructDocument( boost::process::status status = formatterProcess.wait(); ResultNodeFacade result(domDocument, rootNode, "output"); - result.setAttribute("formatter", formatterPath); + result.setAttribute("formatter", formatterPath.filename().string()); result.setAttribute("code", std::to_string(status.exit_status())); if ( status.exited() ) { diff --git a/src/function/external_text_formatter.h b/src/function/external_text_formatter.h index 3af1d52..4a2fb7e 100644 --- a/src/function/external_text_formatter.h +++ b/src/function/external_text_formatter.h @@ -1,13 +1,15 @@ #ifndef INPUTXSLT_SRC_FUNCTION_EXTERNAL_TEXT_FORMATTER_H_ #define INPUTXSLT_SRC_FUNCTION_EXTERNAL_TEXT_FORMATTER_H_ +#include <boost/filesystem.hpp> + #include "base.h" namespace InputXSLT { class FunctionExternalTextFormatter : public FunctionBase< FunctionExternalTextFormatter, - std::string, + boost::filesystem::path, std::string > { public: @@ -17,7 +19,7 @@ class FunctionExternalTextFormatter : public FunctionBase< friend FunctionBase; xercesc::DOMDocument* constructDocument( - std::string, + boost::filesystem::path, std::string ); diff --git a/src/function/transform.h b/src/function/transform.h index cda5502..234a1d0 100644 --- a/src/function/transform.h +++ b/src/function/transform.h @@ -3,8 +3,6 @@ #include <xalanc/XSLT/XSLTInputSource.hpp> -#include <boost/filesystem.hpp> - #include "base.h" namespace InputXSLT { |