From 437b9d9911a4313a834e1840f8cc8e98ce821ac5 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Mon, 30 Jun 2014 19:28:46 +0200 Subject: Switched external text formatter parameter to boost::filesystem::path * this increases consistency accross all external functions * enables usage of non-global formatter executables --- src/function/external_text_formatter.cc | 6 +++--- src/function/external_text_formatter.h | 6 ++++-- src/function/transform.h | 2 -- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/function') 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 + #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 -#include - #include "base.h" namespace InputXSLT { -- cgit v1.2.3