From 33b92b72ed160f22dc627e841d5f84de4ebc0c6c Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Thu, 8 Jan 2015 15:17:40 +0100 Subject: Changed the DemoOutput algorithm as suggested by Andreas: We first transform the document graph to an XML tree and the XML tree in turn has the methods to serialize to XML text, or, in this case, XHTML text. --- src/plugins/html/DemoOutput.hpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/plugins/html/DemoOutput.hpp') diff --git a/src/plugins/html/DemoOutput.hpp b/src/plugins/html/DemoOutput.hpp index ca9bcd2..70a5daa 100644 --- a/src/plugins/html/DemoOutput.hpp +++ b/src/plugins/html/DemoOutput.hpp @@ -33,6 +33,7 @@ #include #include +#include namespace ousia { namespace html { @@ -40,15 +41,11 @@ namespace html { class DemoHTMLTransformer { private: /** - * This method is to be called recursively to write a chapter, section or - * subsection to HTML. + * These methods are called recursively to transform a document to an XML + * tree. */ - void writeSection(Handle sec, std::ostream& out); - /** - * This method is to be called recursively to write a paragraph to HTML. - */ - void writeParagraph(Handle par, std::ostream& out, - bool writePTags = true); + Rooted transformSection(Handle sec); + Rooted transformParagraph(Handle par); /** * This method is to be called recursively to write a list to HTML. * TODO: Implement -- cgit v1.2.3