summaryrefslogtreecommitdiff
path: root/sandbox
diff options
context:
space:
mode:
authorShaun McCance <shaunm@src.gnome.org>2007-02-19 17:52:12 +0000
committerShaun McCance <shaunm@src.gnome.org>2007-02-19 17:52:12 +0000
commit57506f220f2604f0db979f8976b5aeeb195b9f00 (patch)
tree369f297cb23abca813673af762bb944f61dc362a /sandbox
parent7f702e4ae048346953641aaebb556630e5ea9f06 (diff)
downloadgnome-doc-utils-57506f220f2604f0db979f8976b5aeeb195b9f00.tar.gz
- Changed RNG for tree lists
* spec/mal_list_tree.xml: - Changed RNG for tree lists * spec/mal_table.xml: * spec/mal_caption.xml: - Added tons of table stuff, tons more to go * spec/TODO: - More outline sketches about the structure of spec pages * spec/mal_app.xml: - Fixed typo * html/Makefile: * xslt/mal2cache.xsl: - Got a basically functional cache * xslt/mal2html.xsl: - Reworked top-level templates a bit * xslt/mal2html-block.xsl: - Style tweaks - Use a first-child class on blocks, to avoid CSS :first-child * xslt/mal2html-css.xsl: - More style tweaks, include table and list CSS svn path=/trunk/; revision=882
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/mallard/ChangeLog29
-rw-r--r--sandbox/mallard/html/Makefile18
-rw-r--r--sandbox/mallard/spec/TODO27
-rw-r--r--sandbox/mallard/spec/mal_app.xml2
-rw-r--r--sandbox/mallard/spec/mal_caption.xml5
-rw-r--r--sandbox/mallard/spec/mal_list_tree.xml14
-rw-r--r--sandbox/mallard/spec/mal_table.xml779
-rw-r--r--sandbox/mallard/xslt/mal2cache.xsl69
-rw-r--r--sandbox/mallard/xslt/mal2html-block.xsl52
-rw-r--r--sandbox/mallard/xslt/mal2html-css.xsl19
-rw-r--r--sandbox/mallard/xslt/mal2html.xsl49
11 files changed, 994 insertions, 69 deletions
diff --git a/sandbox/mallard/ChangeLog b/sandbox/mallard/ChangeLog
index bf16cff..2e45170 100644
--- a/sandbox/mallard/ChangeLog
+++ b/sandbox/mallard/ChangeLog
@@ -1,3 +1,32 @@
+2007-02-19 Shaun McCance <shaunm@gnome.org>
+
+ * spec/mal_list_tree.xml:
+ - Changed RNG for tree lists
+
+ * spec/mal_table.xml:
+ * spec/mal_caption.xml:
+ - Added tons of table stuff, tons more to go
+
+ * spec/TODO:
+ - More outline sketches about the structure of spec pages
+
+ * spec/mal_app.xml:
+ - Fixed typo
+
+ * html/Makefile:
+ * xslt/mal2cache.xsl:
+ - Got a basically functional cache
+
+ * xslt/mal2html.xsl:
+ - Reworked top-level templates a bit
+
+ * xslt/mal2html-block.xsl:
+ - Style tweaks
+ - Use a first-child class on blocks, to avoid CSS :first-child
+
+ * xslt/mal2html-css.xsl:
+ - More style tweaks, include table and list CSS
+
2007-02-09 Shaun McCance <shaunm@gnome.org>
* html/Makefile
diff --git a/sandbox/mallard/html/Makefile b/sandbox/mallard/html/Makefile
index f124581..a56fc2a 100644
--- a/sandbox/mallard/html/Makefile
+++ b/sandbox/mallard/html/Makefile
@@ -1,19 +1,23 @@
-pages=$(patsubst %.xml,%.xhtml, $(notdir $(wildcard ../spec/*.xml)))
+specs=$(filter-out ../spec/legal.xml, $(wildcard ../spec/*.xml))
+pages=$(patsubst %.xml,%.xhtml, $(notdir $(specs)))
all: $(pages) figures mallard.cache
mallard.cache : $(wildcard ../xslt/*.xsl)
- echo '<cache xmlns="http://www.gnome.org/~shaunm/mallard">' >> $@.tmp
- for file in $(wildcard ../spec/*.xml); do \
- xsltproc ../xslt/mal2cache.xsl $$file >> $@.tmp; \
+ echo '<cache xmlns="http://www.gnome.org/~shaunm/mallard">' > $@.in
+ for file in $(specs); do \
+ echo "<page href='$$file'/>" >> $@.in; \
done
- echo '</cache>' >> $@.tmp
- mv $@.tmp $@
+ echo '</cache>' >> $@.in
+ xsltproc ../xslt/mal2cache.xsl $@.in | xmllint --format - > $@
+ rm $@.in
$(pages) : mallard.cache
$(pages) : $(wildcard ../xslt/*.xsl)
$(pages) : %.xhtml : ../spec/%.xml
- xsltproc -o $@ ../xslt/mal2html.xsl $<
+ xsltproc -o $@ \
+ --stringparam mal.cache_file `pwd`/mallard.cache \
+ ../xslt/mal2html.xsl $<
figures:
if [ ! -d figures ]; then mkdir figures; fi
diff --git a/sandbox/mallard/spec/TODO b/sandbox/mallard/spec/TODO
index 7b29306..92479f6 100644
--- a/sandbox/mallard/spec/TODO
+++ b/sandbox/mallard/spec/TODO
@@ -1,17 +1,20 @@
intro text:
- - what it is
- - what it isn't
- - in what elements it's used
- - what content is valid
+- what it is
+- what it isn't
+- in what elements it's used
+- what content is valid, if simple
sections:
- - examples
- - processing expectations
- - html comparison
- - docbook comparison
+- content: Content
+- attributes: Attributes
+- examples: Examples
+- design: Design Notes
+- processing: Processing Expectations
+- html: Comparison to HTML
+- docbook: Comparison to DocBook
display environments:
- - rich display
- - terminal
- - print
- - aural
+- rich display
+- terminal
+- print
+- aural
diff --git a/sandbox/mallard/spec/mal_app.xml b/sandbox/mallard/spec/mal_app.xml
index d33a988..1fe9828 100644
--- a/sandbox/mallard/spec/mal_app.xml
+++ b/sandbox/mallard/spec/mal_app.xml
@@ -37,7 +37,7 @@ this purpose instead.</p>
called <app>Calculator</app>. If an author were to write <quote>To
start <app>Calculator</app>…</quote>, then a reader may confuse this
for <quote>To start the calculator…</quote> with an error. This is
- even more pronounced in language like German, where nouns are always
+ even more pronounced in languages like German, where nouns are always
capitalized.</p>
<p>For this reason, it is recommended that application names marked
diff --git a/sandbox/mallard/spec/mal_caption.xml b/sandbox/mallard/spec/mal_caption.xml
index 2f96787..4de41de 100644
--- a/sandbox/mallard/spec/mal_caption.xml
+++ b/sandbox/mallard/spec/mal_caption.xml
@@ -20,6 +20,11 @@ a short textual description of the contents of the figure, often an
image. Captions are simple block elements that can contain all
general <link xref="mal_inline">inline content</link>.</p>
+<comment>
+ <cite name="Shaun McCance" date="2007-02-02"/>
+ <p>also appears in table</p>
+</comment>
+
<!-- BEGIN examples -->
<section id="examples">
diff --git a/sandbox/mallard/spec/mal_list_tree.xml b/sandbox/mallard/spec/mal_list_tree.xml
index 2027a45..1ca9e9a 100644
--- a/sandbox/mallard/spec/mal_list_tree.xml
+++ b/sandbox/mallard/spec/mal_list_tree.xml
@@ -7,13 +7,15 @@
<title>Tree Lists</title>
<synopsis><code mime="application/relax-ng-compact-syntax">
-mal_list_tree = element_list {
+mal_list_tree = element list {
attribute type { "tree" },
attribute style { text } ?,
- element item {
- <link xref="mal_inline">mal_inline</link> +,
- mal_list_tree ?
- } +,
-}</code></synopsis>
+ mal_item_tree +
+}
+mal_item_tree = element item {
+ <link xref="mal_inline">mal_inline</link> +,
+ mal_item_tree *
+}
+</code></synopsis>
</topic>
diff --git a/sandbox/mallard/spec/mal_table.xml b/sandbox/mallard/spec/mal_table.xml
index b65623e..f09b225 100644
--- a/sandbox/mallard/spec/mal_table.xml
+++ b/sandbox/mallard/spec/mal_table.xml
@@ -1,2 +1,779 @@
-<topic xmlns="http://www.gnome.org/~shaunm/mallard">
+<topic xmlns="http://www.gnome.org/~shaunm/mallard"
+ id="mal_list">
+<info>
+ <link type="guide" xref="mal_block#containers"/>
+</info>
+
+<title>Tables</title>
+
+<synopsis><code mime="application/relax-ng-compact-syntax">
+mal_table = element table {
+ attribute frame { "all" | "none" |
+ list { "top"? &amp; "bottom"? &amp; "left"? &amp; "right"? }
+ } ?,
+ attribute rules { "all" | "groups" | "none" |
+ list { ("rows" | "rowgroups")? &amp; ("cols" | "colgroups")? }
+ } ?,
+ attribute shade { "all" | "groups" | "none |
+ list { ("rows" | "rowgroups")? &amp; ("cols" | "colgroups")? }
+ } ?,
+ <link xref="mal_title">mal_title</link> ?,
+ ( <link xref="mal_col">mal_col</link> + | <link xref="mal_colgroup">mal_colgroup</link> + ) ?,
+ ( <link xref="mal_tr">mal_tr</link> + |
+ ( <link xref="mal_thead">mal_thead</link> ?,
+ <link xref="mal_tbody">mal_tbody</link> +,
+ <link xref="mal_tfoot">mal_tfoot</link> ?) ),
+ <link xref="mal_caption">mal_caption</link> ?
+}
+</code></synopsis>
+
+
+<!-- BEGIN content -->
+<section id="content">
+ <info>
+ <version status="stub"/>
+ </info>
+ <title>Content</title>
+</section>
+<!-- END content -->
+
+
+<!-- BEGIN attributes -->
+<section id="attributes">
+ <info>
+ <version status="stub"/>
+ </info>
+ <title>Attributes</title>
+</section>
+<!-- END attributes -->
+
+
+<!-- BEGIN examples -->
+<section id="examples">
+ <title>Examples</title>
+
+<section id="examples-rules">
+ <title>The <code>rules</code> Attribute</title>
+
+ <section>
+ <title>Rows</title>
+ <code><![CDATA[
+<table frame="all" rules="rows">
+ <tr>
+ <td><p>GNOME 2.6</p></td>
+ <td><p>2004-03-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.5/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.6/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.8</p></td>
+ <td><p>2004-09-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.7/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.8/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.10</p></td>
+ <td><p>2005-03-09</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.9/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.10/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.12</p></td>
+ <td><p>2005-09-07</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.11/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.12/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.14</p></td>
+ <td><p>2006-03-15</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointThirteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.14/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.16</p></td>
+ <td><p>2006-09-06</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointFifteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.16/notes/C/">Release Notes</link></p></td>
+ </tr>
+</table>]]></code>
+ <table frame="all" rules="rows">
+ <tr>
+ <td><p>GNOME 2.6</p></td>
+ <td><p>2004-03-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.5/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.6/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.8</p></td>
+ <td><p>2004-09-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.7/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.8/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.10</p></td>
+ <td><p>2005-03-09</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.9/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.10/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.12</p></td>
+ <td><p>2005-09-07</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.11/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.12/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.14</p></td>
+ <td><p>2006-03-15</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointThirteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.14/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.16</p></td>
+ <td><p>2006-09-06</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointFifteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.16/notes/C/">Release Notes</link></p></td>
+ </tr>
+ </table>
+ </section>
+
+ <section>
+ <title>Columns</title>
+ <code><![CDATA[
+<table frame="all" rules="cols">
+ <tr>
+ <td><p>GNOME 2.6</p></td>
+ <td><p>2004-03-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.5/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.6/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.8</p></td>
+ <td><p>2004-09-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.7/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.8/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.10</p></td>
+ <td><p>2005-03-09</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.9/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.10/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.12</p></td>
+ <td><p>2005-09-07</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.11/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.12/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.14</p></td>
+ <td><p>2006-03-15</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointThirteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.14/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.16</p></td>
+ <td><p>2006-09-06</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointFifteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.16/notes/C/">Release Notes</link></p></td>
+ </tr>
+</table>]]></code>
+ <table frame="all" rules="cols">
+ <tr>
+ <td><p>GNOME 2.6</p></td>
+ <td><p>2004-03-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.5/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.6/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.8</p></td>
+ <td><p>2004-09-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.7/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.8/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.10</p></td>
+ <td><p>2005-03-09</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.9/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.10/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.12</p></td>
+ <td><p>2005-09-07</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.11/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.12/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.14</p></td>
+ <td><p>2006-03-15</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointThirteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.14/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.16</p></td>
+ <td><p>2006-09-06</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointFifteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.16/notes/C/">Release Notes</link></p></td>
+ </tr>
+ </table>
+ </section>
+
+ <section>
+ <title>Row Groups</title>
+ <code><![CDATA[
+<table frame="all" rules="rowgroups cols">
+ <tbody>
+ <tr>
+ <td><p>GNOME 2.6</p></td>
+ <td><p>2004-03-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.5/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.6/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.8</p></td>
+ <td><p>2004-09-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.7/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.8/notes/">Release Notes</link></p></td>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr>
+ <td><p>GNOME 2.10</p></td>
+ <td><p>2005-03-09</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.9/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.10/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.12</p></td>
+ <td><p>2005-09-07</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.11/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.12/notes/C/">Release Notes</link></p></td>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr>
+ <td><p>GNOME 2.14</p></td>
+ <td><p>2006-03-15</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointThirteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.14/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.16</p></td>
+ <td><p>2006-09-06</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointFifteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.16/notes/C/">Release Notes</link></p></td>
+ </tr>
+ </tbody>
+</table>]]></code>
+ <table frame="all" rules="rowgroups cols">
+ <tbody>
+ <tr>
+ <td><p>GNOME 2.6</p></td>
+ <td><p>2004-03-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.5/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.6/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.8</p></td>
+ <td><p>2004-09-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.7/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.8/notes/">Release Notes</link></p></td>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr>
+ <td><p>GNOME 2.10</p></td>
+ <td><p>2005-03-09</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.9/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.10/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.12</p></td>
+ <td><p>2005-09-07</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.11/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.12/notes/C/">Release Notes</link></p></td>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr>
+ <td><p>GNOME 2.14</p></td>
+ <td><p>2006-03-15</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointThirteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.14/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.16</p></td>
+ <td><p>2006-09-06</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointFifteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.16/notes/C/">Release Notes</link></p></td>
+ </tr>
+ </tbody>
+ </table>
+ </section>
+
+ <section>
+ <title>Column Groups</title>
+ <code><![CDATA[
+<table frame="all" rules="rows colgroups">
+ <colgroup><col/></colgroup>
+ <colgroup><col/></colgroup>
+ <colgroup><col/><col/></colgroup>
+ <tr>
+ <td><p>GNOME 2.6</p></td>
+ <td><p>2004-03-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.5/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.6/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.8</p></td>
+ <td><p>2004-09-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.7/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.8/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.10</p></td>
+ <td><p>2005-03-09</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.9/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.10/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.12</p></td>
+ <td><p>2005-09-07</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.11/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.12/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.14</p></td>
+ <td><p>2006-03-15</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointThirteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.14/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.16</p></td>
+ <td><p>2006-09-06</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointFifteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.16/notes/C/">Release Notes</link></p></td>
+ </tr>
+</table>]]></code>
+ <table frame="all" rules="rows colgroups">
+ <colgroup><col/></colgroup>
+ <colgroup><col/></colgroup>
+ <colgroup><col/><col/></colgroup>
+ <tr>
+ <td><p>GNOME 2.6</p></td>
+ <td><p>2004-03-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.5/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.6/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.8</p></td>
+ <td><p>2004-09-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.7/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.8/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.10</p></td>
+ <td><p>2005-03-09</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.9/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.10/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.12</p></td>
+ <td><p>2005-09-07</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.11/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.12/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.14</p></td>
+ <td><p>2006-03-15</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointThirteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.14/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.16</p></td>
+ <td><p>2006-09-06</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointFifteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.16/notes/C/">Release Notes</link></p></td>
+ </tr>
+ </table>
+ </section>
+</section>
+
+<section id="examples-shade">
+ <title>The <code>shade</code> Attribute</title>
+
+ <section>
+ <title>Rows</title>
+ <code><![CDATA[
+<table frame="all" shade="rows">
+ <tr>
+ <td><p>GNOME 2.6</p></td>
+ <td><p>2004-03-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.5/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.6/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.8</p></td>
+ <td><p>2004-09-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.7/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.8/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.10</p></td>
+ <td><p>2005-03-09</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.9/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.10/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.12</p></td>
+ <td><p>2005-09-07</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.11/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.12/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.14</p></td>
+ <td><p>2006-03-15</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointThirteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.14/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.16</p></td>
+ <td><p>2006-09-06</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointFifteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.16/notes/C/">Release Notes</link></p></td>
+ </tr>
+</table>]]></code>
+ <table frame="all" shade="rows">
+ <tr>
+ <td><p>GNOME 2.6</p></td>
+ <td><p>2004-03-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.5/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.6/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.8</p></td>
+ <td><p>2004-09-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.7/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.8/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.10</p></td>
+ <td><p>2005-03-09</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.9/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.10/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.12</p></td>
+ <td><p>2005-09-07</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.11/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.12/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.14</p></td>
+ <td><p>2006-03-15</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointThirteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.14/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.16</p></td>
+ <td><p>2006-09-06</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointFifteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.16/notes/C/">Release Notes</link></p></td>
+ </tr>
+ </table>
+ </section>
+
+ <section>
+ <title>Columns</title>
+ <code><![CDATA[
+<table frame="all" shade="cols">
+ <tr>
+ <td><p>GNOME 2.6</p></td>
+ <td><p>2004-03-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.5/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.6/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.8</p></td>
+ <td><p>2004-09-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.7/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.8/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.10</p></td>
+ <td><p>2005-03-09</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.9/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.10/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.12</p></td>
+ <td><p>2005-09-07</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.11/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.12/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.14</p></td>
+ <td><p>2006-03-15</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointThirteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.14/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.16</p></td>
+ <td><p>2006-09-06</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointFifteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.16/notes/C/">Release Notes</link></p></td>
+ </tr>
+</table>]]></code>
+ <table frame="all" shade="cols">
+ <tr>
+ <td><p>GNOME 2.6</p></td>
+ <td><p>2004-03-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.5/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.6/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.8</p></td>
+ <td><p>2004-09-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.7/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.8/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.10</p></td>
+ <td><p>2005-03-09</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.9/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.10/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.12</p></td>
+ <td><p>2005-09-07</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.11/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.12/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.14</p></td>
+ <td><p>2006-03-15</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointThirteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.14/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.16</p></td>
+ <td><p>2006-09-06</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointFifteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.16/notes/C/">Release Notes</link></p></td>
+ </tr>
+ </table>
+ </section>
+
+ <section>
+ <title>Row Groups</title>
+ <code><![CDATA[
+<table frame="all" shade="rowgroups cols">
+ <tbody>
+ <tr>
+ <td><p>GNOME 2.6</p></td>
+ <td><p>2004-03-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.5/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.6/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.8</p></td>
+ <td><p>2004-09-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.7/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.8/notes/">Release Notes</link></p></td>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr>
+ <td><p>GNOME 2.10</p></td>
+ <td><p>2005-03-09</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.9/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.10/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.12</p></td>
+ <td><p>2005-09-07</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.11/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.12/notes/C/">Release Notes</link></p></td>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr>
+ <td><p>GNOME 2.14</p></td>
+ <td><p>2006-03-15</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointThirteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.14/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.16</p></td>
+ <td><p>2006-09-06</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointFifteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.16/notes/C/">Release Notes</link></p></td>
+ </tr>
+ </tbody>
+</table>]]></code>
+ <table frame="all" shade="rowgroups cols">
+ <tbody>
+ <tr>
+ <td><p>GNOME 2.6</p></td>
+ <td><p>2004-03-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.5/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.6/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.8</p></td>
+ <td><p>2004-09-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.7/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.8/notes/">Release Notes</link></p></td>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr>
+ <td><p>GNOME 2.10</p></td>
+ <td><p>2005-03-09</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.9/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.10/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.12</p></td>
+ <td><p>2005-09-07</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.11/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.12/notes/C/">Release Notes</link></p></td>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr>
+ <td><p>GNOME 2.14</p></td>
+ <td><p>2006-03-15</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointThirteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.14/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.16</p></td>
+ <td><p>2006-09-06</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointFifteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.16/notes/C/">Release Notes</link></p></td>
+ </tr>
+ </tbody>
+ </table>
+ </section>
+
+ <section>
+ <title>Column Groups</title>
+ <code><![CDATA[
+<table frame="all" shade="rows colgroups">
+ <colgroup><col/></colgroup>
+ <colgroup><col/></colgroup>
+ <colgroup><col/><col/></colgroup>
+ <tr>
+ <td><p>GNOME 2.6</p></td>
+ <td><p>2004-03-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.5/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.6/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.8</p></td>
+ <td><p>2004-09-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.7/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.8/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.10</p></td>
+ <td><p>2005-03-09</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.9/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.10/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.12</p></td>
+ <td><p>2005-09-07</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.11/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.12/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.14</p></td>
+ <td><p>2006-03-15</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointThirteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.14/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.16</p></td>
+ <td><p>2006-09-06</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointFifteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.16/notes/C/">Release Notes</link></p></td>
+ </tr>
+</table>]]></code>
+ <table frame="all" shade="rows colgroups">
+ <colgroup><col/></colgroup>
+ <colgroup><col/></colgroup>
+ <colgroup><col/><col/></colgroup>
+ <tr>
+ <td><p>GNOME 2.6</p></td>
+ <td><p>2004-03-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.5/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.6/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.8</p></td>
+ <td><p>2004-09-15</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.7/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.8/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.10</p></td>
+ <td><p>2005-03-09</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.9/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.10/notes/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.12</p></td>
+ <td><p>2005-09-07</p></td>
+ <td><p><link href="http://www.gnome.org/start/2.11/">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.12/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.14</p></td>
+ <td><p>2006-03-15</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointThirteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.14/notes/C/">Release Notes</link></p></td>
+ </tr>
+ <tr>
+ <td><p>GNOME 2.16</p></td>
+ <td><p>2006-09-06</p></td>
+ <td><p><link href="http://live.gnome.org/TwoPointFifteen">Development</link></p></td>
+ <td><p><link href="http://www.gnome.org/start/2.16/notes/C/">Release Notes</link></p></td>
+ </tr>
+ </table>
+ </section>
+</section>
+</section>
+<!-- END examples -->
+
+
+<!-- BEGIN design -->
+<section id="design">
+ <info>
+ <version status="stub"/>
+ </info>
+ <title>Design Notes</title>
+</section>
+<!-- END design -->
+
+
+<!-- BEGIN html -->
+<section id="html">
+ <info>
+ <version status="stub"/>
+ </info>
+ <title>Comparison to HTML</title>
+</section>
+<!-- END html -->
+
+
+<!-- BEGIN docbook -->
+<section id="docbook">
+ <info>
+ <version status="stub"/>
+ </info>
+ <title>Comparison to DocBook</title>
+</section>
+<!-- END docbook -->
+
</topic>
diff --git a/sandbox/mallard/xslt/mal2cache.xsl b/sandbox/mallard/xslt/mal2cache.xsl
index a94e257..de156c4 100644
--- a/sandbox/mallard/xslt/mal2cache.xsl
+++ b/sandbox/mallard/xslt/mal2cache.xsl
@@ -18,32 +18,65 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
xmlns:mal='http://www.gnome.org/~shaunm/mallard'
+ xmlns='http://www.gnome.org/~shaunm/mallard'
version='1.0'>
<xsl:output omit-xml-declaration="yes"/>
-<xsl:template match='mal:guide'>
- <mal:guide id='{@id}'><mal:info>
- <xsl:copy-of select='mal:info/*'/>
- </mal:info>
- <xsl:apply-templates select='mal:section'/>
- </mal:guide>
+<xsl:template match='/mal:cache'>
+ <cache>
+ <xsl:for-each select="mal:page">
+ <xsl:apply-templates select="document(@href)/*">
+ <xsl:with-param name="href" select="@href"/>
+ </xsl:apply-templates>
+ </xsl:for-each>
+ </cache>
</xsl:template>
-<xsl:template match='mal:topic'>
- <mal:topic id='{@id}'><mal:info>
- <xsl:copy-of select='mal:info/*'/>
- </mal:info>
- <xsl:apply-templates select='mal:section'/>
- </mal:topic>
+<xsl:template match="mal:topic">
+ <xsl:param name="href"/>
+ <topic>
+ <xsl:attribute name="id">
+ <xsl:value-of select="@id"/>
+ </xsl:attribute>
+ <xsl:attribute name="href">
+ <xsl:value-of select="$href"/>
+ </xsl:attribute>
+ <xsl:apply-templates/>
+ </topic>
</xsl:template>
-<xsl:template match='mal:section'>
- <mal:section id='{@id}'><mal:info>
- <xsl:copy-of select='mal:info/*'/>
- </mal:info>
- <xsl:apply-templates select='mal:section'/>
- </mal:section>
+<xsl:template match="mal:guide">
+ <xsl:param name="href"/>
+ <guide>
+ <xsl:attribute name="id">
+ <xsl:value-of select="@id"/>
+ </xsl:attribute>
+ <xsl:attribute name="href">
+ <xsl:value-of select="$href"/>
+ </xsl:attribute>
+ <xsl:apply-templates/>
+ </guide>
</xsl:template>
+<xsl:template match="mal:section">
+ <section>
+ <xsl:if test="@id">
+ <xsl:attribute name="id">
+ <xsl:value-of select="@id"/>
+ </xsl:attribute>
+ </xsl:if>
+ </section>
+</xsl:template>
+
+<xsl:template match="mal:title">
+ <xsl:copy-of select="."/>
+</xsl:template>
+
+<xsl:template match="mal:info">
+ <xsl:copy-of select="."/>
+</xsl:template>
+
+<xsl:template match="node() | text()"/>
+
</xsl:stylesheet>
diff --git a/sandbox/mallard/xslt/mal2html-block.xsl b/sandbox/mallard/xslt/mal2html-block.xsl
index c89dc7a..ac145bd 100644
--- a/sandbox/mallard/xslt/mal2html-block.xsl
+++ b/sandbox/mallard/xslt/mal2html-block.xsl
@@ -50,29 +50,27 @@ div.section div.section div.section { margin-top: 1.44em; }
pre.code {
background: url(mallard-icon-code.png) no-repeat top right;
border: solid 2px #eeeeec;
- padding: 1em;
+ padding: 0.5em 1em 0.5em 1em;
}
div.comment {
margin-left: 1.72em;
- padding: 0 1em 1em 1em;
- background-color: #f0dddd;
+ padding: 0.5em 1em 0.5em 1em;
border: solid 2px #f08d8d;
}
-div.comment div.cite { font-style: italic; }
-div.comment div.titlecite { margin-top: 0; }
+div.comment div.cite { margin-top: 0; font-style: italic; }
div.figure {
color: #2e3436;
background-color: #eeeeec;
border: solid 1px #888a85;
margin-left: 1.72em;
- padding: 4px 4px 4px 4px;
+ padding: 4px;
}
div.figure-contents {
color: #000000;
background-color: #ffffff;
border: solid 1px #888a85;
- padding: 0 1em 1em 1em;
+ padding: 0.5em 1em 0.5em 1em;
margin: 0;
text-align: center;
}
@@ -81,10 +79,15 @@ div.figure div.caption { margin: 4px 0 0 0; }
div.synopsis {
color: #2e3436;
+<!--
background-color: #fffcd9;
border-top: solid 2px #a8a68f;
border-bottom: solid 2px #a8a68f;
- padding: 0 1em 1em 1em;
+-->
+ background-color: #eeeeec;
+ border-top: solid 2px #729fcf;
+ border-bottom: solid 2px #729fcf;
+ padding: 0.5em 1em 0.5em 1em;
}
div.synopsis pre.code {
background: none;
@@ -93,7 +96,7 @@ div.synopsis pre.code {
}
div.title {
font-size: 1.2em;
- margin-top: 0.83em;
+ margin-top: 0;
font-weight: bold;
}
</xsl:text>
@@ -114,6 +117,11 @@ div.title {
<xsl:variable name="first" select="node()[1]/self::text()"/>
<xsl:variable name="last" select="node()[last()]/self::text()"/>
<pre class="code">
+ <xsl:if test="not(preceding-sibling::*)">
+ <xsl:attribute name="class">
+ <xsl:text>first-child</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
<xsl:if test="$first">
<xsl:call-template name="util.strip_newlines">
<xsl:with-param name="string" select="$first"/>
@@ -136,6 +144,11 @@ div.title {
<!-- = comment = -->
<xsl:template mode="mal2html.block.mode" match="mal:comment">
<div class="comment">
+ <xsl:if test="not(preceding-sibling::*)">
+ <xsl:attribute name="class">
+ <xsl:text>first-child</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
<xsl:apply-templates mode="mal2html.block.mode"/>
</div>
</xsl:template>
@@ -150,12 +163,6 @@ div.title {
<!-- = comment/cite = -->
<xsl:template mode="mal2html.block.mode" match="mal:comment/mal:cite">
<div class="cite">
- <xsl:attribute name="class">
- <xsl:text>cite</xsl:text>
- <xsl:if test="preceding-sibling::*[1]/self::mal:title">
- <xsl:text> titlecite</xsl:text>
- </xsl:if>
- </xsl:attribute>
<!-- FIXME: i18n -->
<xsl:choose>
<xsl:when test="@name and @date">
@@ -175,6 +182,11 @@ div.title {
<!-- = figure = -->
<xsl:template mode="mal2html.block.mode" match="mal:figure">
<div class="figure">
+ <xsl:if test="not(preceding-sibling::*)">
+ <xsl:attribute name="class">
+ <xsl:text>first-child</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
<xsl:apply-templates mode="mal2html.block.mode" select="mal:title"/>
<div class="figure-contents">
<xsl:apply-templates mode="mal2html.block.mode"
@@ -197,6 +209,11 @@ div.title {
<!-- = p = -->
<xsl:template mode="mal2html.block.mode" match="mal:p">
<p class="p">
+ <xsl:if test="not(preceding-sibling::*)">
+ <xsl:attribute name="class">
+ <xsl:text>first-child</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
<xsl:apply-templates mode="mal2html.inline.mode"/>
</p>
</xsl:template>
@@ -204,6 +221,11 @@ div.title {
<!-- = synopsis = -->
<xsl:template mode="mal2html.block.mode" match="mal:synopsis">
<div class="synopsis">
+ <xsl:if test="not(preceding-sibling::*)">
+ <xsl:attribute name="class">
+ <xsl:text>first-child</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
<xsl:apply-templates mode="mal2html.block.mode"/>
</div>
</xsl:template>
diff --git a/sandbox/mallard/xslt/mal2html-css.xsl b/sandbox/mallard/xslt/mal2html-css.xsl
index 8649bee..c2091ca 100644
--- a/sandbox/mallard/xslt/mal2html-css.xsl
+++ b/sandbox/mallard/xslt/mal2html-css.xsl
@@ -83,15 +83,26 @@ by extension stylesheets to extend or override the CSS.
<xsl:template name="mal2html.css.content">
<xsl:call-template name="mal2html.block.css"/>
<xsl:call-template name="mal2html.inline.css"/>
+ <xsl:call-template name="mal2html.list.css"/>
+ <xsl:call-template name="mal2html.table.css"/>
<xsl:text>
+html { height: 100%; }
body {
margin: 0px;
direction: </xsl:text><xsl:call-template name="l10n.direction"/><xsl:text>;
+ background-color: #eeeeec;
+ padding: 12px;
+ min-height: 100%;
}
-div.body { margin: 0; padding: 12px; max-width: 60em; }
-div { margin: 1em 0 0 0; padding: 0; }
-pre { margin: 1em 0 0 0; padding: 0; }
-p { margin: 1em 0 0 0; padding: 0; }
+div.body {
+ margin: 0;
+ padding: 12px;
+ border: solid 1px #babdb6;
+ max-width: 60em;
+ background-color: #ffffff;
+}
+div, pre, p { margin: 1em 0 0 0; padding: 0; }
+.first-child { margin-top: 0; }
</xsl:text>
<xsl:call-template name="mal2html.css.custom"/>
</xsl:template>
diff --git a/sandbox/mallard/xslt/mal2html.xsl b/sandbox/mallard/xslt/mal2html.xsl
index b44464c..29343d4 100644
--- a/sandbox/mallard/xslt/mal2html.xsl
+++ b/sandbox/mallard/xslt/mal2html.xsl
@@ -32,42 +32,81 @@ REMARK: Describe this module
<xsl:include href="mal2html-block.xsl"/>
<xsl:include href="mal2html-css.xsl"/>
<xsl:include href="mal2html-inline.xsl"/>
+<xsl:include href="mal2html-list.xsl"/>
<xsl:include href="mal2html-media.xsl"/>
+<xsl:include href="mal2html-table.xsl"/>
<xsl:include href="util.xsl"/>
<xsl:param name="mal.extension" select="'.xhtml'"/>
+<xsl:param name="mal.cache_file"/>
+<xsl:variable name="cache" select="document($mal.cache_file)"/>
+<xsl:key name="cache_page" match="$cache//mal:guide | $cache//mal:topic" use="@id"/>
+<xsl:key name="cache_sect" match="$cache//mal:section"
+ use="concat((ancestor::mal:guide | ancesotr::mal:topic)[1]/@id, '#', @id)"/>
-<xsl:template match="/mal:guide | /mal:topic">
+<xsl:template match="/">
<html>
<head>
<title>
- <xsl:value-of select="mal:title"/>
+ <xsl:value-of select="/*/mal:title"/>
</title>
<xsl:call-template name="mal2html.css"/>
</head>
<body>
<div class="body">
- <xsl:apply-templates mode="mal2html.block.mode"/>
+ <xsl:apply-templates/>
</div>
</body>
</html>
</xsl:template>
-<xsl:template mode="mal2html.block.mode" match="mal:section">
+<!-- = guide = -->
+<xsl:template match="mal:guide">
+ <xsl:apply-templates mode="mal2html.block.mode"
+ select="*[not(self::mal:section)]"/>
+ <xsl:for-each select="mal:info/mal:link[@type = 'page']">
+ <xsl:choose>
+ <xsl:when test="not(@xref)"/>
+ <xsl:when test="contains(@xref, '#')">
+ <div>
+ <xsl:value-of select="key('cache_sect', @xref)/mal:title"/>
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <div>
+ <xsl:value-of select="key('cache_page', @xref)/mal:title"/>
+ </div>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ <xsl:apply-templates select="mal:section"/>
+</xsl:template>
+
+<!-- = topic = -->
+<xsl:template match="mal:topic">
+ <xsl:apply-templates mode="mal2html.block.mode"
+ select="*[not(self::mal:section)]"/>
+ <xsl:apply-templates select="mal:section"/>
+</xsl:template>
+
+<!-- = section = -->
+<xsl:template match="mal:section">
<div class="section" id="{@id}">
<xsl:apply-templates mode="mal2html.block.mode"/>
</div>
</xsl:template>
+<!-- = title = -->
<xsl:template mode="mal2html.block.mode" match="mal:title">
<xsl:variable name="depth"
select="count(ancestor::mal:section) + 1"/>
<xsl:element name="{concat('h', $depth)}">
- <xsl:apply-templates/>
+ <xsl:apply-templates mode="mal2html.inline.mode"/>
</xsl:element>
</xsl:template>
+
<xsl:template match="*">
<xsl:message>
<xsl:text>Unmatched element: </xsl:text>