From 3383e24e396431eed7d4ab9f69ff8ffaf12d4925 Mon Sep 17 00:00:00 2001 From: Adrian Kummerländer Date: Sat, 19 Apr 2014 18:31:15 +0200 Subject: Implemented transformation execution function * InputXSLT::PlattformGuard handles xerces and xalan construction and lifetime * InputXSLT::TransformerGuard instantiates PlattformGuard, configurates external functions ** offers execute method for "executing" a XSL tranformation with empty input --- src/plattform_guard.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/plattform_guard.h (limited to 'src/plattform_guard.h') diff --git a/src/plattform_guard.h b/src/plattform_guard.h new file mode 100644 index 0000000..9e99fdc --- /dev/null +++ b/src/plattform_guard.h @@ -0,0 +1,24 @@ +#ifndef INPUTXSLT_SRC_PLATTFORM_GUARD_H_ +#define INPUTXSLT_SRC_PLATTFORM_GUARD_H_ + +#include +#include + +namespace xalan = xalanc_1_11; + +namespace InputXSLT { + +struct PlattformGuard { + PlattformGuard() { + xercesc::XMLPlatformUtils::Initialize(); + xalan::XalanTransformer::initialize(); + } + + ~PlattformGuard() { + xalan::XalanTransformer::terminate(); + } +}; + +} + +#endif // INPUTXSLT_SRC_PLATTFORM_GUARD_H_ -- cgit v1.2.3