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/support/type/xobject_value.h | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'src/support/type/xobject_value.h') diff --git a/src/support/type/xobject_value.h b/src/support/type/xobject_value.h index bb602a4..cfc259d 100644 --- a/src/support/type/xobject_value.h +++ b/src/support/type/xobject_value.h @@ -4,13 +4,26 @@ #include #include "common.h" +#include "support/filesystem_context.h" +#include "support/include_entity_resolver.h" namespace InputXSLT { -namespace XObjectValue { - template - Type get(const xalan::XObjectPtr&); -} +class XObjectValue { + public: + XObjectValue( + const boost::filesystem::path&, + const IncludeEntityResolver* + ); + + template + Type get(const xalan::XObjectPtr&) const; + + private: + const FilesystemContext filesystem_context_; + const IncludeEntityResolver* const include_resolver_; + +}; } -- cgit v1.2.3