From 29a9fb20b4c8414f2590886e43ae86794a53db89 Mon Sep 17 00:00:00 2001 From: Adrian Kummerländer Date: Sun, 20 Apr 2014 13:09:32 +0200 Subject: Implemented support for modifying external function base path * one expects a read-file function to work relative to the directory the transformation is located and not to the executable's location ** from the perspective of the user the transformation is the application, not the actual executable * removed PlattformGuard struct from TransformerGuard (now TransformerFacade) * TransformerFacade is instatiated with the appropriate relative working path ** i.e. it will have to be instantiated for every directory containing one or more transformations --- src/function/read_xml_file.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/function/read_xml_file.h') diff --git a/src/function/read_xml_file.h b/src/function/read_xml_file.h index 1556764..c755852 100644 --- a/src/function/read_xml_file.h +++ b/src/function/read_xml_file.h @@ -9,13 +9,15 @@ #include #include -#include "utility.h" +#include + +#include "common.h" namespace InputXSLT { class FunctionReadXmlFile : public xalan::Function { public: - FunctionReadXmlFile(); + FunctionReadXmlFile(const std::string&); FunctionReadXmlFile(const FunctionReadXmlFile&); virtual xalan::XObjectPtr execute( @@ -31,6 +33,7 @@ class FunctionReadXmlFile : public xalan::Function { bool operator==(const FunctionReadXmlFile&) const = delete; private: + const std::string path_; mutable xalan::XercesParserLiaison parser_; const xalan::XalanDOMString& getError(xalan::XalanDOMString& result) const; -- cgit v1.2.3