From 426265b91d4533b7aa16d53124ad9b5d0a6862d6 Mon Sep 17 00:00:00 2001 From: Adrian Kummerländer Date: Mon, 19 May 2014 22:14:31 +0200 Subject: 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" --- src/plattform_guard.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/plattform_guard.cc') 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& 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() { -- cgit v1.2.3