From 266b408ee53b9bc7db2b1a5c92e62adfd2af6def Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 26 Jun 2014 20:26:32 +0200 Subject: Implemented basic external "write-file" function * accepts a path parameter and the content to be written * removed target parameter form FunctionTransform ** transformation result is now returned as a string *** nodeset return value is planned ** e.g. writing the result to the fs is optional and has to be achieved using FunctionWriteFile * changed "transform" test case accordingly * this marks a paradigm shift and is the continuation of the changes described in 741a70f ** InputXSLT now also implements a output function * added basic io error handling to FunctionReadFile --- src/function/write_file.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/function/write_file.h (limited to 'src/function/write_file.h') diff --git a/src/function/write_file.h b/src/function/write_file.h new file mode 100644 index 0000000..2260055 --- /dev/null +++ b/src/function/write_file.h @@ -0,0 +1,28 @@ +#ifndef INPUTXSLT_SRC_FUNCTION_WRITE_FILE_H_ +#define INPUTXSLT_SRC_FUNCTION_WRITE_FILE_H_ + +#include "base.h" + +namespace InputXSLT { + +class FunctionWriteFile : public FunctionBase< + FunctionWriteFile, + boost::filesystem::path, + std::string +> { + public: + using FunctionBase::FunctionBase; + + protected: + friend FunctionBase; + + xercesc::DOMDocument* constructDocument( + boost::filesystem::path, + std::string + ); + +}; + +} + +#endif // INPUTXSLT_SRC_FUNCTION_WRITE_FILE_H_ -- cgit v1.2.3