diff options
author | Adrian Kummerländer | 2014-05-19 22:14:31 +0200 |
---|---|---|
committer | Adrian Kummerländer | 2014-05-19 22:14:31 +0200 |
commit | 426265b91d4533b7aa16d53124ad9b5d0a6862d6 (patch) | |
tree | 8d42a9e3b27229bad9a194191ca42f32f9717972 /test.cc | |
parent | d19a195985b96701b2ab302538fe24e87e76decf (diff) | |
download | InputXSLT-426265b91d4533b7aa16d53124ad9b5d0a6862d6.tar InputXSLT-426265b91d4533b7aa16d53124ad9b5d0a6862d6.tar.gz InputXSLT-426265b91d4533b7aa16d53124ad9b5d0a6862d6.tar.bz2 InputXSLT-426265b91d4533b7aa16d53124ad9b5d0a6862d6.tar.lz InputXSLT-426265b91d4533b7aa16d53124ad9b5d0a6862d6.tar.xz InputXSLT-426265b91d4533b7aa16d53124ad9b5d0a6862d6.tar.zst InputXSLT-426265b91d4533b7aa16d53124ad9b5d0a6862d6.zip |
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"
Diffstat (limited to 'test.cc')
-rw-r--r-- | test.cc | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -3,6 +3,8 @@ #include "boost/program_options.hpp" +#include <string> +#include <vector> #include <iostream> int main(int ac, char** av) { @@ -11,8 +13,9 @@ int main(int ac, char** av) { ); optionDescription.add_options() - ("transformation", boost::program_options::value<std::string>()->required(), "transformation file") - ("target", boost::program_options::value<std::string>(), "target file") + ("transformation", boost::program_options::value<std::string>()->required(), "transformation file") + ("target", boost::program_options::value<std::string>(), "target file") + ("include", boost::program_options::value<std::vector<std::string>>(), "include paths") ; boost::program_options::variables_map variables; @@ -32,7 +35,13 @@ int main(int ac, char** av) { } if ( variables.count("transformation") ) { - InputXSLT::PlattformGuard plattform; + std::vector<std::string> includePath; + + if ( variables.count("include") ) { + includePath = variables["include"].as<std::vector<std::string>>(); + }; + + InputXSLT::PlattformGuard plattform(includePath); InputXSLT::TransformationFacade transformation( variables["transformation"].as<std::string>() |