Mercurial > projects > dil
comparison src/docgen/page/xmlwriter.d @ 806:bcb74c9b895c
Moved out files in the trunk folder to the root.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Sun, 09 Mar 2008 00:12:19 +0100 |
parents | trunk/src/docgen/page/xmlwriter.d@db7e27b5c180 |
children |
comparison
equal
deleted
inserted
replaced
805:a3fab8b74a7d | 806:bcb74c9b895c |
---|---|
1 /** | |
2 * Author: Jari-Matti Mäkelä | |
3 * License: GPL3 | |
4 */ | |
5 module docgen.page.xmlwriter; | |
6 | |
7 import docgen.page.writer; | |
8 import docgen.misc.textutils; | |
9 import tango.io.FileConduit : FileConduit; | |
10 | |
11 //TODO: this is mostly broken now | |
12 | |
13 /** | |
14 * TODO | |
15 */ | |
16 class XMLWriter : AbstractPageWriter!("xml", 1) { | |
17 this(PageWriterFactory factory, OutputStream[] outputs) { | |
18 super(factory, outputs); | |
19 } | |
20 | |
21 void generateTOC(Module[] modules) { | |
22 // TODO | |
23 print.format(getTemplate("toc")); | |
24 } | |
25 | |
26 void generateModuleSection() { | |
27 // TODO | |
28 print.format(getTemplate("modules")); | |
29 } | |
30 | |
31 void generateListingSection() { | |
32 // TODO | |
33 print.format(getTemplate("listings")); | |
34 } | |
35 | |
36 void generateDepGraphSection() { | |
37 // TODO | |
38 print.format(getTemplate("dependencies")); | |
39 } | |
40 | |
41 void generateIndexSection() { } | |
42 | |
43 void generateLastPage() { } | |
44 | |
45 void generateFirstPage() { } | |
46 | |
47 void addList(char[][] contents, bool ordered) { | |
48 foreach(item; contents) { | |
49 switch(item) { | |
50 case "(": print(ordered ? "<ol>" : "<ul>"); continue; | |
51 case ")": print(ordered ? "</ol>" : "</ul>"); continue; | |
52 default: print("<li>")(xml_escape(item))("</li>"); | |
53 } | |
54 } | |
55 } | |
56 } |