aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdrian Kummerlaender2014-06-28 18:09:48 +0200
committerAdrian Kummerlaender2014-06-28 18:09:48 +0200
commit299d0f6fa3fbd1bfd8d1d6d452e9d055973d0e0e (patch)
tree6612a030c8d866da3613973b2dd0aa9811d039ae /src
parentcd2a6c17ab1108e2bf01125b65292014c002db95 (diff)
downloadInputXSLT-299d0f6fa3fbd1bfd8d1d6d452e9d055973d0e0e.tar
InputXSLT-299d0f6fa3fbd1bfd8d1d6d452e9d055973d0e0e.tar.gz
InputXSLT-299d0f6fa3fbd1bfd8d1d6d452e9d055973d0e0e.tar.bz2
InputXSLT-299d0f6fa3fbd1bfd8d1d6d452e9d055973d0e0e.tar.lz
InputXSLT-299d0f6fa3fbd1bfd8d1d6d452e9d055973d0e0e.tar.xz
InputXSLT-299d0f6fa3fbd1bfd8d1d6d452e9d055973d0e0e.tar.zst
InputXSLT-299d0f6fa3fbd1bfd8d1d6d452e9d055973d0e0e.zip
Added input parameter to FunctionTransform
* the external "transform" function now expects a input document as its first parameter ** this input parameter is resolved and passed as input to the transformation ** changed and expanded test case accordingly * because of xalan internal problem this currently only supports input DOMs loaded directly from the fs ** passing result trees or node sets analog to how the transformation may be passed into the function leads to parsing and assert failures ** parsing node-based input DOMs using xalanc::XalanTransformer::parseSource produces errors concerning base entity resolution ** if the error capacitor instance is temporarily disabled it works correctly as long as one doesn't try to access the input document *** this causes a assert failure in the XPath implementation (seems to be related to XALANC-540)
Diffstat (limited to 'src')
-rw-r--r--src/function/transform.cc2
-rw-r--r--src/function/transform.h2
-rw-r--r--src/transformation_facade.h2
3 files changed, 4 insertions, 2 deletions
diff --git a/src/function/transform.cc b/src/function/transform.cc
index 9cf806f..bc71125 100644
--- a/src/function/transform.cc
+++ b/src/function/transform.cc
@@ -31,6 +31,7 @@ inline std::function<void(const ErrorCapacitor::error_cache&)> handleErrors(
namespace InputXSLT {
xercesc::DOMDocument* FunctionTransform::constructDocument(
+ xalan::XSLTInputSource inputSource,
xalan::XSLTInputSource transformationSource,
xalan::XObjectPtr parameterObject
) {
@@ -50,6 +51,7 @@ xercesc::DOMDocument* FunctionTransform::constructDocument(
if ( auto transformation = TransformationFacade::try_create(
handleErrors(result),
+ inputSource,
transformationSource,
this->include_resolver_
) ) {
diff --git a/src/function/transform.h b/src/function/transform.h
index ee88529..cda5502 100644
--- a/src/function/transform.h
+++ b/src/function/transform.h
@@ -12,6 +12,7 @@ namespace InputXSLT {
class FunctionTransform : public FunctionBase<
FunctionTransform,
xalan::XSLTInputSource,
+ xalan::XSLTInputSource,
xalan::XObjectPtr
> {
public:
@@ -22,6 +23,7 @@ class FunctionTransform : public FunctionBase<
xercesc::DOMDocument* constructDocument(
xalan::XSLTInputSource,
+ xalan::XSLTInputSource,
xalan::XObjectPtr
);
diff --git a/src/transformation_facade.h b/src/transformation_facade.h
index 00a5785..eb134cd 100644
--- a/src/transformation_facade.h
+++ b/src/transformation_facade.h
@@ -20,8 +20,6 @@ class TransformationFacade {
public:
typedef std::unique_ptr<TransformationFacade> ptr;
- class input;
-
template <typename... Arguments>
static ptr try_create(
const std::function<void(const ErrorCapacitor::error_cache&)>&,