equal
deleted
inserted
replaced
28 #include <libxml++-2.6/libxml++/libxml++.h> |
28 #include <libxml++-2.6/libxml++/libxml++.h> |
29 |
29 |
30 #include <relpipe/writer/typedefs.h> |
30 #include <relpipe/writer/typedefs.h> |
31 |
31 |
32 #include "Configuration.h" |
32 #include "Configuration.h" |
|
33 #include "XMLDocumentConstructor.h" |
33 |
34 |
34 namespace relpipe { |
35 namespace relpipe { |
35 namespace in { |
36 namespace in { |
36 namespace xmltable { |
37 namespace xmltable { |
37 |
38 |
84 |
85 |
85 void process(std::istream& input, std::ostream& output, Configuration& configuration) { |
86 void process(std::istream& input, std::ostream& output, Configuration& configuration) { |
86 std::shared_ptr<RelationalWriter> writer(Factory::create(output)); |
87 std::shared_ptr<RelationalWriter> writer(Factory::create(output)); |
87 |
88 |
88 xmlpp::DomParser parser; |
89 xmlpp::DomParser parser; |
89 parser.parse_stream(input); |
90 XMLDocumentConstructor documentConstructor(&input, &parser); |
|
91 documentConstructor.process(); |
90 if (configuration.xinclude) parser.get_document()->process_xinclude(true); |
92 if (configuration.xinclude) parser.get_document()->process_xinclude(true); |
91 xmlpp::Element* root = parser.get_document()->get_root_node(); |
93 xmlpp::Element* root = parser.get_document()->get_root_node(); |
92 |
94 |
93 xmlpp::Node::PrefixNsMap ns; |
95 xmlpp::Node::PrefixNsMap ns; |
94 for (int i = 0; i < configuration.namespaceMappings.size(); i++) { |
96 for (int i = 0; i < configuration.namespaceMappings.size(); i++) { |