From 2c89112141530617b51af8c41211c2507ec8c738 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Wed, 20 Aug 2014 22:28:15 +0200 Subject: Setting the correct work directory in FunctionExternalCommand * changed the XObjectValue constructor to accept a pointer to FilesystemContext instead of instantiating the context by itself * the FilesystemContext is now instantiated in the "callConstructDocument" member method of "FunctionBase" ** a const reference to FilesystemContext is passed to all "constructDocument" member method implementations * the FilesystemContext is currently only used by FunctionExternal command to set the correct work directory in "boost::process::context" ** this is required so calling external commands from inside a stylesheet works as expected *** i.e. from inside the directory the stylesheet is located in * modified all remaining external function implementations accordingly --- src/function/generate.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/function/generate.cc') diff --git a/src/function/generate.cc b/src/function/generate.cc index df5e65b..f9cd449 100644 --- a/src/function/generate.cc +++ b/src/function/generate.cc @@ -15,9 +15,10 @@ namespace InputXSLT { DomDocumentCache::document_ptr FunctionGenerate::constructDocument( - xalan::XSLTInputSource inputSource, - xalan::XSLTInputSource transformationSource, - boost::filesystem::path targetPath + const FilesystemContext&, + xalan::XSLTInputSource inputSource, + xalan::XSLTInputSource transformationSource, + boost::filesystem::path targetPath ) const { DomDocumentCache::document_ptr domDocument( DomDocumentCache::createDocument("content") -- cgit v1.2.3