diff options
author | Adrian Kummerländer | 2014-04-19 18:31:15 +0200 |
---|---|---|
committer | Adrian Kummerländer | 2014-04-19 18:31:15 +0200 |
commit | 3383e24e396431eed7d4ab9f69ff8ffaf12d4925 (patch) | |
tree | 8cedb029eee462dd8145077aee98db593ef6d62d /src/plattform_guard.h | |
parent | 334efe3383c436d61a8e5dd95b923cb0d5db9652 (diff) | |
download | InputXSLT-3383e24e396431eed7d4ab9f69ff8ffaf12d4925.tar InputXSLT-3383e24e396431eed7d4ab9f69ff8ffaf12d4925.tar.gz InputXSLT-3383e24e396431eed7d4ab9f69ff8ffaf12d4925.tar.bz2 InputXSLT-3383e24e396431eed7d4ab9f69ff8ffaf12d4925.tar.lz InputXSLT-3383e24e396431eed7d4ab9f69ff8ffaf12d4925.tar.xz InputXSLT-3383e24e396431eed7d4ab9f69ff8ffaf12d4925.tar.zst InputXSLT-3383e24e396431eed7d4ab9f69ff8ffaf12d4925.zip |
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
Diffstat (limited to 'src/plattform_guard.h')
-rw-r--r-- | src/plattform_guard.h | 24 |
1 files changed, 24 insertions, 0 deletions
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 <xalanc/Include/PlatformDefinitions.hpp> +#include <xercesc/util/PlatformUtils.hpp> + +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_ |