From e5ed418907f09bf8905463f42a44593d51159bc9 Mon Sep 17 00:00:00 2001 From: Adrian Kummerländer Date: Fri, 2 May 2014 22:06:37 +0200 Subject: Changed external functions to enable global installation * up until now all external functions were locally installed to a specific XalanTransformer instance contained within a TransformationGuard instance ** this had to change as I planned to add a "execute-transformation" function based on TransformationGuard which would have led to recursive self-instantiation ** global external functions have to be thread-safe * as global external function can not be provided with a reference to a transformation-specific FilesystemFacade instance, the working path is now determined using xalan::Locator ** currently using pointer arithmetics on XMLCh* to remove the "file://" prefix of the URI returned by locator->getSystemId(), may be unsafe * added compilation unit for PlattformGuard as it now contains function installation in addition to plattform lifetime management --- src/function/read_xml_file.h | 4 +--- 1 file changed, 1 insertion(+), 3 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 1df48fb..d7ef440 100644 --- a/src/function/read_xml_file.h +++ b/src/function/read_xml_file.h @@ -10,14 +10,13 @@ #include #include "common.h" -#include "support/filesystem_context.h" #include "support/dom/document_cache.h" namespace InputXSLT { class FunctionReadXmlFile : public xalan::Function { public: - FunctionReadXmlFile(const FilesystemContext&); + FunctionReadXmlFile(); virtual xalan::XObjectPtr execute( xalan::XPathExecutionContext&, @@ -32,7 +31,6 @@ class FunctionReadXmlFile : public xalan::Function { bool operator==(const FunctionReadXmlFile&) const = delete; private: - const FilesystemContext& fs_context_; std::shared_ptr document_cache_; const xalan::XalanDOMString& getError(xalan::XalanDOMString& result) const; -- cgit v1.2.3