aboutsummaryrefslogtreecommitdiff
path: root/src/function
diff options
context:
space:
mode:
authorAdrian Kummerländer2014-05-16 22:25:39 +0200
committerAdrian Kummerländer2014-05-16 22:25:39 +0200
commit7bd543e220c806177d805a8f4fbc13e951fe5788 (patch)
tree0fe8746d3ae922340a8fed56db7e112cd63dc811 /src/function
parentec6abad74348e9b577e1dd63b41d65263bb0334a (diff)
downloadInputXSLT-7bd543e220c806177d805a8f4fbc13e951fe5788.tar
InputXSLT-7bd543e220c806177d805a8f4fbc13e951fe5788.tar.gz
InputXSLT-7bd543e220c806177d805a8f4fbc13e951fe5788.tar.bz2
InputXSLT-7bd543e220c806177d805a8f4fbc13e951fe5788.tar.lz
InputXSLT-7bd543e220c806177d805a8f4fbc13e951fe5788.tar.xz
InputXSLT-7bd543e220c806177d805a8f4fbc13e951fe5788.tar.zst
InputXSLT-7bd543e220c806177d805a8f4fbc13e951fe5788.zip
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
Diffstat (limited to 'src/function')
-rw-r--r--src/function/base.h2
-rw-r--r--src/function/transform.cc3
-rw-r--r--src/function/transform.h3
3 files changed, 5 insertions, 3 deletions
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<argument_tuple>::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;