From 6dd832dd0adb35f63148a0e7bd5bdcfb28516c3b Mon Sep 17 00:00:00 2001 From: Adrian Kummerländer Date: Fri, 18 Apr 2014 19:51:24 +0200 Subject: 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 --- test.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'test.cc') diff --git a/test.cc b/test.cc index 28a2cac..bc6f0b2 100644 --- a/test.cc +++ b/test.cc @@ -4,6 +4,7 @@ #include #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"); -- cgit v1.2.3