diff options
author | Adrian Kummerlaender | 2014-06-17 21:28:04 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2014-06-17 21:28:04 +0200 |
commit | 0d670478b51c55e44f57995fe3ca8a4585723a6c (patch) | |
tree | 8014505de42d1743599d8076c503e9f3c6e22e8f /src/function/base.h | |
parent | 741a70f5fecc38033832728f4ecc62a6abe328b2 (diff) | |
download | InputXSLT-0d670478b51c55e44f57995fe3ca8a4585723a6c.tar InputXSLT-0d670478b51c55e44f57995fe3ca8a4585723a6c.tar.gz InputXSLT-0d670478b51c55e44f57995fe3ca8a4585723a6c.tar.bz2 InputXSLT-0d670478b51c55e44f57995fe3ca8a4585723a6c.tar.lz InputXSLT-0d670478b51c55e44f57995fe3ca8a4585723a6c.tar.xz InputXSLT-0d670478b51c55e44f57995fe3ca8a4585723a6c.tar.zst InputXSLT-0d670478b51c55e44f57995fe3ca8a4585723a6c.zip |
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
Diffstat (limited to 'src/function/base.h')
-rw-r--r-- | src/function/base.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/function/base.h b/src/function/base.h index 5212d65..5aada0e 100644 --- a/src/function/base.h +++ b/src/function/base.h @@ -96,16 +96,18 @@ class FunctionBase : public xalan::Function { const xalan::Locator* locator, Sequence<Index...> ) const { + XObjectValue valueGetter( + this->include_resolver_->resolve( + locator->getSystemId() + ), + this->include_resolver_ + ); + return this->document_cache_->create( static_cast<Implementation*>( const_cast<FunctionBase*>(this) )->constructDocument( - FilesystemContext( - this->include_resolver_->resolve( - locator->getSystemId() - ) - ), - XObjectValue::get<typename std::tuple_element< + valueGetter.get<typename std::tuple_element< Index, std::tuple<Types...> >::type>(parameters[Index])... |