From 7bd543e220c806177d805a8f4fbc13e951fe5788 Mon Sep 17 00:00:00 2001 From: Adrian Kummerländer Date: Fri, 16 May 2014 22:25:39 +0200 Subject: Added XObjectPtr parameter to FunctionTransform * the given XObject is passed to the called transformation ** this was done to enable templates to pass information to each other ** this should support any type usable in a XPath context to be passed as an argument * expanded FunctionTransform test case accordingly --- src/function/base.h | 2 +- src/function/transform.cc | 3 ++- src/function/transform.h | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/function') diff --git a/src/function/base.h b/src/function/base.h index b74a7d8..8145924 100644 --- a/src/function/base.h +++ b/src/function/base.h @@ -81,7 +81,7 @@ class FunctionBase : public xalan::Function { result.assign(std::string( "The function expects " + std::to_string(std::tuple_size::value) + - " argument(s) of type string." + " argument(s)" ).data()); return result; diff --git a/src/function/transform.cc b/src/function/transform.cc index be06037..4f9aecc 100644 --- a/src/function/transform.cc +++ b/src/function/transform.cc @@ -38,7 +38,8 @@ xercesc::DOMDocument* FunctionTransform::constructDocument( ); const int result = transformation.generate( - targetPath.string() + targetPath.string(), + std::get<2>(arguments) ); if ( result == 0 ) { diff --git a/src/function/transform.h b/src/function/transform.h index 2be8925..f010596 100644 --- a/src/function/transform.h +++ b/src/function/transform.h @@ -8,7 +8,8 @@ namespace InputXSLT { class FunctionTransform : public FunctionBase< FunctionTransform, std::string, - std::string + std::string, + xalan::XObjectPtr > { public: using FunctionBase::FunctionBase; -- cgit v1.2.3