diff options
author | Adrian Kummerländer | 2014-04-18 19:51:24 +0200 |
---|---|---|
committer | Adrian Kummerländer | 2014-04-18 19:51:24 +0200 |
commit | 6dd832dd0adb35f63148a0e7bd5bdcfb28516c3b (patch) | |
tree | f0a9709d7d09786585220ff0c27ceae97d7a4b87 /test.cc | |
parent | e886ac3a4f2dacc79cf174b1257146fd91bf6b7c (diff) | |
download | InputXSLT-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.cc | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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"); |