diff options
author | Adrian Kummerlaender | 2014-07-12 16:15:42 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2014-07-12 16:15:42 +0200 |
commit | 086779c6d3d40f244b6aafd6d402fd29b921a735 (patch) | |
tree | c606a54c92f9b638797a95437adfe0a6fee05030 /src/plattform_guard.cc | |
parent | 141725d681dd69f77e993c3d59d613d1ad7014f9 (diff) | |
download | InputXSLT-086779c6d3d40f244b6aafd6d402fd29b921a735.tar InputXSLT-086779c6d3d40f244b6aafd6d402fd29b921a735.tar.gz InputXSLT-086779c6d3d40f244b6aafd6d402fd29b921a735.tar.bz2 InputXSLT-086779c6d3d40f244b6aafd6d402fd29b921a735.tar.lz InputXSLT-086779c6d3d40f244b6aafd6d402fd29b921a735.tar.xz InputXSLT-086779c6d3d40f244b6aafd6d402fd29b921a735.tar.zst InputXSLT-086779c6d3d40f244b6aafd6d402fd29b921a735.zip |
Implemented external "generate" function
* this function essentially provides the same functionality as FunctionTransform with the addition of directly committing the result to the filesystem
** this is needed if one wants to generate doctype-containing transformations from inside a transformation as "write-file" is not able to infer the doctype of a given xalan::XalanNode pointer
** this is a integral limitation of (at least) XSLT 1.0 as implemented in Apache Xalan
*** a document can of course only have a single document type
*** e.g. we can not include a doctype node in the result tree of FunctionTransform
* implemented test case for FunctionGenerate
* transformation "test.xsl" is shared between the FunctionTransform and FunctionGenerate test cases
* modified README.md accordingly
Diffstat (limited to 'src/plattform_guard.cc')
-rw-r--r-- | src/plattform_guard.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plattform_guard.cc b/src/plattform_guard.cc index cc3c9c0..5d19e32 100644 --- a/src/plattform_guard.cc +++ b/src/plattform_guard.cc @@ -10,6 +10,7 @@ #include "function/write_file.h" #include "function/read_directory.h" #include "function/transform.h" +#include "function/generate.h" #include "function/external_text_formatter.h" namespace InputXSLT { @@ -49,6 +50,12 @@ PlattformGuard::PlattformGuard(const std::vector<std::string>& path): xalan::XalanTransformer::installExternalFunctionGlobal( customNamespace, + xalan::XalanDOMString("generate"), + InputXSLT::FunctionGenerate(&this->include_resolver_) + ); + + xalan::XalanTransformer::installExternalFunctionGlobal( + customNamespace, xalan::XalanDOMString("external-text-formatter"), InputXSLT::FunctionExternalTextFormatter(&this->include_resolver_) ); |