diff options
author | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-01-09 17:00:53 +0100 |
---|---|---|
committer | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-01-09 17:00:53 +0100 |
commit | f37d3cd42eb18433445c2e259cd71a1b2bd67be0 (patch) | |
tree | c4371b1b4e3f578a6d20dc76dd74fb85d6fb901a /src/plugins/html/DemoOutput.cpp | |
parent | 58fed7b74357b82ba55558f91ae13123dc2380eb (diff) |
added non-pretty output of XML serialization, changed DemoOutput accordingly and changed DemoOutputTest to have some kind of automatic inspection instead of visual inspection.
Diffstat (limited to 'src/plugins/html/DemoOutput.cpp')
-rw-r--r-- | src/plugins/html/DemoOutput.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/html/DemoOutput.cpp b/src/plugins/html/DemoOutput.cpp index 69f2756..4cadf12 100644 --- a/src/plugins/html/DemoOutput.cpp +++ b/src/plugins/html/DemoOutput.cpp @@ -29,12 +29,12 @@ namespace ousia { namespace html { void DemoHTMLTransformer::writeHTML(Handle<model::Document> doc, - std::ostream &out) + std::ostream &out, bool pretty) { Manager &mgr = doc->getManager(); // Create an XML object tree for the document first. Rooted<xml::Element> html{new xml::Element{ - mgr, {nullptr}, "html", {{"xlmns", "http://www.w3.org/1999/xhtml"}}}}; + mgr, {nullptr}, "html"}}; // add the head Element Rooted<xml::Element> head{new xml::Element{mgr, html, "head"}}; html->addChild(head); @@ -78,7 +78,7 @@ void DemoHTMLTransformer::writeHTML(Handle<model::Document> doc, body->addChild(book); // After the content has been transformed, we serialize it. - html->serialize(out, "<!DOCTYPE html>"); + html->serialize(out, "<!DOCTYPE html>", pretty); } /** |