Mercurial > projects > dil
diff trunk/src/docgen/page/xmlwriter.d @ 457:33a4cb255fcc
Cached images, small fixes, reorganizing.
author | Jari-Matti M?kel? <jmjm@iki.fi> |
---|---|
date | Tue, 30 Oct 2007 15:41:30 +0200 |
parents | |
children | db7e27b5c180 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/trunk/src/docgen/page/xmlwriter.d Tue Oct 30 15:41:30 2007 +0200 @@ -0,0 +1,56 @@ +/** + * Author: Jari-Matti Mäkelä + * License: GPL3 + */ +module docgen.page.xmlwriter; + +import docgen.page.writer; +import docgen.misc.textutils; +import tango.io.FileConduit : FileConduit; + +//TODO: this is mostly broken now + +/** + * TODO + */ +class XMLWriter : AbstractPageWriter!(2, "xml") { + this(PageWriterFactory factory, OutputStream[] outputs) { + super(factory, outputs); + } + + void generateTOC(Module[] modules) { + // TODO + print.format(templates["toc"]); + } + + void generateModuleSection() { + // TODO + print.format(templates["modules"]); + } + + void generateListingSection() { + // TODO + print.format(templates["listings"]); + } + + void generateDepGraphSection() { + // TODO + print.format(templates["dependencies"]); + } + + void generateIndexSection() { } + + void generateLastPage() { } + + void generateFirstPage() { } + + void addList(char[][] contents, bool ordered) { + foreach(item; contents) { + switch(item) { + case "(": print(ordered ? "<ol>" : "<ul>"); continue; + case ")": print(ordered ? "</ol>" : "</ul>"); continue; + default: print("<li>")(xml_escape(item))("</li>"); + } + } + } +}