aboutsummaryrefslogtreecommitdiff
path: root/test.cc
diff options
context:
space:
mode:
authorAdrian Kummerländer2014-04-18 19:51:24 +0200
committerAdrian Kummerländer2014-04-18 19:51:24 +0200
commit6dd832dd0adb35f63148a0e7bd5bdcfb28516c3b (patch)
treef0a9709d7d09786585220ff0c27ceae97d7a4b87 /test.cc
parente886ac3a4f2dacc79cf174b1257146fd91bf6b7c (diff)
downloadInputXSLT-6dd832dd0adb35f63148a0e7bd5bdcfb28516c3b.tar
InputXSLT-6dd832dd0adb35f63148a0e7bd5bdcfb28516c3b.tar.gz
InputXSLT-6dd832dd0adb35f63148a0e7bd5bdcfb28516c3b.tar.bz2
InputXSLT-6dd832dd0adb35f63148a0e7bd5bdcfb28516c3b.tar.lz
InputXSLT-6dd832dd0adb35f63148a0e7bd5bdcfb28516c3b.tar.xz
InputXSLT-6dd832dd0adb35f63148a0e7bd5bdcfb28516c3b.tar.zst
InputXSLT-6dd832dd0adb35f63148a0e7bd5bdcfb28516c3b.zip
Implemented basic XML reading capabilities
* command "read-xml-file" reads a XML file and allows it to be transformed by the calling XSLT * this will allow workflows like the following: ** a tranformation reads all the markdown files in a directory ** these markdown files are converted to a xml representation by a external function calling a appropriate C++ markdown parser ** the XML representation of each markdown file is converted to XHTML inside the XSL transformation ** ... and embedded into the output XHTML document ** => all inside a single XSL tranformation *** i.e. it is provided with only a empty dummy XML input file and fetches the actual input by itself * as all current code contained within this repository this is just a quick and dirty proof-of-concept and not in any way good code
Diffstat (limited to 'test.cc')
-rw-r--r--test.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/test.cc b/test.cc
index 28a2cac..bc6f0b2 100644
--- a/test.cc
+++ b/test.cc
@@ -4,6 +4,7 @@
#include <xalanc/XSLT/XSLTInputSource.hpp>
#include "src/read_file_command.h"
+#include "src/read_xml_file_command.h"
int main() {
xercesc::XMLPlatformUtils::Initialize();
@@ -18,7 +19,13 @@ int main() {
transformer.installExternalFunction(
customNamespace,
xalan::XalanDOMString("read-file"),
- FunctionFileRead()
+ FunctionReadFile()
+ );
+
+ transformer.installExternalFunction(
+ customNamespace,
+ xalan::XalanDOMString("read-xml-file"),
+ FunctionReadXmlFile()
);
xalan::XSLTInputSource input("../dummy/in.xml");