diff options
author | Adrian Kummerländer | 2014-05-19 22:14:31 +0200 |
---|---|---|
committer | Adrian Kummerländer | 2014-05-19 22:14:31 +0200 |
commit | 426265b91d4533b7aa16d53124ad9b5d0a6862d6 (patch) | |
tree | 8d42a9e3b27229bad9a194191ca42f32f9717972 /src/plattform_guard.cc | |
parent | d19a195985b96701b2ab302538fe24e87e76decf (diff) | |
download | InputXSLT-426265b91d4533b7aa16d53124ad9b5d0a6862d6.tar InputXSLT-426265b91d4533b7aa16d53124ad9b5d0a6862d6.tar.gz InputXSLT-426265b91d4533b7aa16d53124ad9b5d0a6862d6.tar.bz2 InputXSLT-426265b91d4533b7aa16d53124ad9b5d0a6862d6.tar.lz InputXSLT-426265b91d4533b7aa16d53124ad9b5d0a6862d6.tar.xz InputXSLT-426265b91d4533b7aa16d53124ad9b5d0a6862d6.tar.zst InputXSLT-426265b91d4533b7aa16d53124ad9b5d0a6862d6.zip |
Implemented external "resolve-include" function
* resolves paths provided as strings against include paths provided through the newly created "--include" argument of the test executable
* this was implemented to enable central collections of XSLT libraries simmilar to how there are C headers in "/usr/include"
Diffstat (limited to 'src/plattform_guard.cc')
-rw-r--r-- | src/plattform_guard.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plattform_guard.cc b/src/plattform_guard.cc index da3b6d7..820346e 100644 --- a/src/plattform_guard.cc +++ b/src/plattform_guard.cc @@ -10,10 +10,11 @@ #include "function/read_xml_file.h" #include "function/read_directory.h" #include "function/transform.h" +#include "function/resolve_include.h" namespace InputXSLT { -PlattformGuard::PlattformGuard() { +PlattformGuard::PlattformGuard(const std::vector<std::string>& path) { xercesc::XMLPlatformUtils::Initialize(); xalan::XalanTransformer::initialize(); @@ -44,6 +45,12 @@ PlattformGuard::PlattformGuard() { xalan::XalanDOMString("transform"), InputXSLT::FunctionTransform() ); + + xalan::XalanTransformer::installExternalFunctionGlobal( + customNamespace, + xalan::XalanDOMString("resolve-include"), + InputXSLT::FunctionResolveInclude(path) + ); } PlattformGuard::~PlattformGuard() { |