summaryrefslogtreecommitdiff
path: root/src/plugins/html/DemoOutput.hpp
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-01-08 15:17:40 +0100
committerBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-01-08 15:17:40 +0100
commit33b92b72ed160f22dc627e841d5f84de4ebc0c6c (patch)
tree597ebe6611f4317901817d05e00d8388e9960bf0 /src/plugins/html/DemoOutput.hpp
parentfd8ce97afb16e17102ec8f109103ed334ad0e939 (diff)
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.
Diffstat (limited to 'src/plugins/html/DemoOutput.hpp')
-rw-r--r--src/plugins/html/DemoOutput.hpp13
1 files changed, 5 insertions, 8 deletions
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 <ostream>
#include <core/model/Document.hpp>
+#include <core/XML.hpp>
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<model::StructuredEntity> sec, std::ostream& out);
- /**
- * This method is to be called recursively to write a paragraph to HTML.
- */
- void writeParagraph(Handle<model::StructuredEntity> par, std::ostream& out,
- bool writePTags = true);
+ Rooted<xml::Element> transformSection(Handle<model::StructuredEntity> sec);
+ Rooted<xml::Element> transformParagraph(Handle<model::StructuredEntity> par);
/**
* This method is to be called recursively to write a list to HTML.
* TODO: Implement