From 0d670478b51c55e44f57995fe3ca8a4585723a6c Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Tue, 17 Jun 2014 21:28:04 +0200 Subject: Added context awareness to XObjectValue casting logic * added support for defining boost::filesystem::path as a external function parameter ** boost::filesystem::path parameters are resolved against the appropriate FilesystemContext and IncludeEntityResolver instances * xalan::XSLTInputSource parameter source paths are also resolved * removed need for passing a reference FilesystemContext to "constructDocument" methods ** they now only accept the parameters of the external function implemented by them ** all path resolution logic is wrapped by the newly created XObjectValue class * converted XObjectValue namespace into class ** the "get" template method is now a template member method ** this was needed to enable value casting logic to access the appropriate FilesystemContext and IncludeEntityResolver instances * this commit marks the next step towards the goals defined in 741a70f --- src/function/read_file.cc | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'src/function/read_file.cc') diff --git a/src/function/read_file.cc b/src/function/read_file.cc index 1ea76c7..96e677f 100644 --- a/src/function/read_file.cc +++ b/src/function/read_file.cc @@ -49,18 +49,7 @@ inline std::string readPlainFile(const boost::filesystem::path& filePath) { namespace InputXSLT { xercesc::DOMDocument* FunctionReadFile::constructDocument( - const FilesystemContext& fsContext, - std::string rawPath -) { - boost::filesystem::path filePath(fsContext.resolve(rawPath)); - - if ( !(boost::filesystem::exists(filePath) && - boost::filesystem::is_regular_file(filePath)) ) { - if ( auto resolvedPath = this->include_resolver_->resolve(rawPath) ) { - filePath = *resolvedPath; - } - } - + boost::filesystem::path filePath) { xercesc::DOMDocument* const domDocument( xercesc::DOMImplementation::getImplementation()->createDocument( nullptr, -- cgit v1.2.3