diff options
Diffstat (limited to 'project2/xmlPresenter.cpp')
-rw-r--r-- | project2/xmlPresenter.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/project2/xmlPresenter.cpp b/project2/xmlPresenter.cpp index 9cf7a73..dcee298 100644 --- a/project2/xmlPresenter.cpp +++ b/project2/xmlPresenter.cpp @@ -1,16 +1,26 @@ #include "xmlPresenter.h" +#include <libxml/xinclude.h> XmlPresenter::~XmlPresenter() { } XmlPresenter::XmlPresenter(const std::string & group, const std::string & file) : - Presenter(group, file), + present(group + "/" + file + ".xml"), responseRootNodeName(present.get_document()->get_root_node()->get_attribute_value("root")), responseStyle(present.get_document()->get_root_node()->get_attribute_value("style")), contentType(present.get_document()->get_root_node()->get_attribute_value("contenttype")), responseDoc(XmlDocumentPtr(new xmlpp::Document("1.0"))) { + while (xmlXIncludeProcessFlags(present.get_document()->cobj(), XML_PARSE_NOXINCNODE) > 0); + + LoaderBase loader("http://project2.randomdan.homeip.net", true); + loader.supportedStorers.insert(Storer::into(&datasources)); + loader.supportedStorers.insert(Storer::into(&rowSets)); + loader.supportedStorers.insert(Storer::into(&views)); + loader.supportedStorers.insert(Storer::into(¶meterChecks)); + loader.collectAll(this, present.get_document()->get_root_node(), true); + nodeStack.push_back(responseDoc->create_root_node(responseRootNodeName)); xmlNewNs(nodeStack.back()->cobj(), BAD_CAST "http://project2.randomdan.homeip.net", BAD_CAST "project2"); // XSLT Style |