From 57506f220f2604f0db979f8976b5aeeb195b9f00 Mon Sep 17 00:00:00 2001 From: Shaun McCance Date: Mon, 19 Feb 2007 17:52:12 +0000 Subject: - 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 --- sandbox/mallard/ChangeLog | 29 ++ sandbox/mallard/html/Makefile | 18 +- sandbox/mallard/spec/TODO | 27 +- sandbox/mallard/spec/mal_app.xml | 2 +- sandbox/mallard/spec/mal_caption.xml | 5 + sandbox/mallard/spec/mal_list_tree.xml | 14 +- sandbox/mallard/spec/mal_table.xml | 779 +++++++++++++++++++++++++++++++- sandbox/mallard/xslt/mal2cache.xsl | 69 ++- sandbox/mallard/xslt/mal2html-block.xsl | 52 ++- sandbox/mallard/xslt/mal2html-css.xsl | 19 +- sandbox/mallard/xslt/mal2html.xsl | 49 +- 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 + + * 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 * 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 '' >> $@.tmp - for file in $(wildcard ../spec/*.xml); do \ - xsltproc ../xslt/mal2cache.xsl $$file >> $@.tmp; \ + echo '' > $@.in + for file in $(specs); do \ + echo "" >> $@.in; \ done - echo '' >> $@.tmp - mv $@.tmp $@ + echo '' >> $@.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.

called Calculator. If an author were to write To start Calculator…, then a reader may confuse this for To start the calculator… 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.

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 inline content.

+ + +

also appears in table

+
+
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 @@ Tree Lists -mal_list_tree = element_list { +mal_list_tree = element list { attribute type { "tree" }, attribute style { text } ?, - element item { - mal_inline +, - mal_list_tree ? - } +, -} + mal_item_tree + +} +mal_item_tree = element item { + mal_inline +, + mal_item_tree * +} + 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 @@ - + + + + + +Tables + + +mal_table = element table { + attribute frame { "all" | "none" | + list { "top"? & "bottom"? & "left"? & "right"? } + } ?, + attribute rules { "all" | "groups" | "none" | + list { ("rows" | "rowgroups")? & ("cols" | "colgroups")? } + } ?, + attribute shade { "all" | "groups" | "none | + list { ("rows" | "rowgroups")? & ("cols" | "colgroups")? } + } ?, + mal_title ?, + ( mal_col + | mal_colgroup + ) ?, + ( mal_tr + | + ( mal_thead ?, + mal_tbody +, + mal_tfoot ?) ), + mal_caption ? +} + + + + +
+ + + + Content +
+ + + + +
+ + + + Attributes +
+ + + + +
+ Examples + +
+ The <code>rules</code> Attribute + +
+ Rows + + +

GNOME 2.6

+

2004-03-15

+

Development

+

Release Notes

+ + +

GNOME 2.8

+

2004-09-15

+

Development

+

Release Notes

+ + +

GNOME 2.10

+

2005-03-09

+

Development

+

Release Notes

+ + +

GNOME 2.12

+

2005-09-07

+

Development

+

Release Notes

+ + +

GNOME 2.14

+

2006-03-15

+

Development

+

Release Notes

+ + +

GNOME 2.16

+

2006-09-06

+

Development

+

Release Notes

+ +]]>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

GNOME 2.6

2004-03-15

Development

Release Notes

GNOME 2.8

2004-09-15

Development

Release Notes

GNOME 2.10

2005-03-09

Development

Release Notes

GNOME 2.12

2005-09-07

Development

Release Notes

GNOME 2.14

2006-03-15

Development

Release Notes

GNOME 2.16

2006-09-06

Development

Release Notes

+
+ +
+ Columns + + +

GNOME 2.6

+

2004-03-15

+

Development

+

Release Notes

+ + +

GNOME 2.8

+

2004-09-15

+

Development

+

Release Notes

+ + +

GNOME 2.10

+

2005-03-09

+

Development

+

Release Notes

+ + +

GNOME 2.12

+

2005-09-07

+

Development

+

Release Notes

+ + +

GNOME 2.14

+

2006-03-15

+

Development

+

Release Notes

+ + +

GNOME 2.16

+

2006-09-06

+

Development

+

Release Notes

+ +]]>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

GNOME 2.6

2004-03-15

Development

Release Notes

GNOME 2.8

2004-09-15

Development

Release Notes

GNOME 2.10

2005-03-09

Development

Release Notes

GNOME 2.12

2005-09-07

Development

Release Notes

GNOME 2.14

2006-03-15

Development

Release Notes

GNOME 2.16

2006-09-06

Development

Release Notes

+
+ +
+ Row Groups + + + +

GNOME 2.6

+

2004-03-15

+

Development

+

Release Notes

+ + +

GNOME 2.8

+

2004-09-15

+

Development

+

Release Notes

+ + + + +

GNOME 2.10

+

2005-03-09

+

Development

+

Release Notes

+ + +

GNOME 2.12

+

2005-09-07

+

Development

+

Release Notes

+ + + + +

GNOME 2.14

+

2006-03-15

+

Development

+

Release Notes

+ + +

GNOME 2.16

+

2006-09-06

+

Development

+

Release Notes

+ + +]]>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

GNOME 2.6

2004-03-15

Development

Release Notes

GNOME 2.8

2004-09-15

Development

Release Notes

GNOME 2.10

2005-03-09

Development

Release Notes

GNOME 2.12

2005-09-07

Development

Release Notes

GNOME 2.14

2006-03-15

Development

Release Notes

GNOME 2.16

2006-09-06

Development

Release Notes

+
+ +
+ Column Groups + + + + + +

GNOME 2.6

+

2004-03-15

+

Development

+

Release Notes

+ + +

GNOME 2.8

+

2004-09-15

+

Development

+

Release Notes

+ + +

GNOME 2.10

+

2005-03-09

+

Development

+

Release Notes

+ + +

GNOME 2.12

+

2005-09-07

+

Development

+

Release Notes

+ + +

GNOME 2.14

+

2006-03-15

+

Development

+

Release Notes

+ + +

GNOME 2.16

+

2006-09-06

+

Development

+

Release Notes

+ +]]>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

GNOME 2.6

2004-03-15

Development

Release Notes

GNOME 2.8

2004-09-15

Development

Release Notes

GNOME 2.10

2005-03-09

Development

Release Notes

GNOME 2.12

2005-09-07

Development

Release Notes

GNOME 2.14

2006-03-15

Development

Release Notes

GNOME 2.16

2006-09-06

Development

Release Notes

+
+
+ +
+ The <code>shade</code> Attribute + +
+ Rows + + +

GNOME 2.6

+

2004-03-15

+

Development

+

Release Notes

+ + +

GNOME 2.8

+

2004-09-15

+

Development

+

Release Notes

+ + +

GNOME 2.10

+

2005-03-09

+

Development

+

Release Notes

+ + +

GNOME 2.12

+

2005-09-07

+

Development

+

Release Notes

+ + +

GNOME 2.14

+

2006-03-15

+

Development

+

Release Notes

+ + +

GNOME 2.16

+

2006-09-06

+

Development

+

Release Notes

+ +]]>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

GNOME 2.6

2004-03-15

Development

Release Notes

GNOME 2.8

2004-09-15

Development

Release Notes

GNOME 2.10

2005-03-09

Development

Release Notes

GNOME 2.12

2005-09-07

Development

Release Notes

GNOME 2.14

2006-03-15

Development

Release Notes

GNOME 2.16

2006-09-06

Development

Release Notes

+
+ +
+ Columns + + +

GNOME 2.6

+

2004-03-15

+

Development

+

Release Notes

+ + +

GNOME 2.8

+

2004-09-15

+

Development

+

Release Notes

+ + +

GNOME 2.10

+

2005-03-09

+

Development

+

Release Notes

+ + +

GNOME 2.12

+

2005-09-07

+

Development

+

Release Notes

+ + +

GNOME 2.14

+

2006-03-15

+

Development

+

Release Notes

+ + +

GNOME 2.16

+

2006-09-06

+

Development

+

Release Notes

+ +]]>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

GNOME 2.6

2004-03-15

Development

Release Notes

GNOME 2.8

2004-09-15

Development

Release Notes

GNOME 2.10

2005-03-09

Development

Release Notes

GNOME 2.12

2005-09-07

Development

Release Notes

GNOME 2.14

2006-03-15

Development

Release Notes

GNOME 2.16

2006-09-06

Development

Release Notes

+
+ +
+ Row Groups + + + +

GNOME 2.6

+

2004-03-15

+

Development

+

Release Notes

+ + +

GNOME 2.8

+

2004-09-15

+

Development

+

Release Notes

+ + + + +

GNOME 2.10

+

2005-03-09

+

Development

+

Release Notes

+ + +

GNOME 2.12

+

2005-09-07

+

Development

+

Release Notes

+ + + + +

GNOME 2.14

+

2006-03-15

+

Development

+

Release Notes

+ + +

GNOME 2.16

+

2006-09-06

+

Development

+

Release Notes

+ + +]]>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

GNOME 2.6

2004-03-15

Development

Release Notes

GNOME 2.8

2004-09-15

Development

Release Notes

GNOME 2.10

2005-03-09

Development

Release Notes

GNOME 2.12

2005-09-07

Development

Release Notes

GNOME 2.14

2006-03-15

Development

Release Notes

GNOME 2.16

2006-09-06

Development

Release Notes

+
+ +
+ Column Groups + + + + + +

GNOME 2.6

+

2004-03-15

+

Development

+

Release Notes

+ + +

GNOME 2.8

+

2004-09-15

+

Development

+

Release Notes

+ + +

GNOME 2.10

+

2005-03-09

+

Development

+

Release Notes

+ + +

GNOME 2.12

+

2005-09-07

+

Development

+

Release Notes

+ + +

GNOME 2.14

+

2006-03-15

+

Development

+

Release Notes

+ + +

GNOME 2.16

+

2006-09-06

+

Development

+

Release Notes

+ +]]>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

GNOME 2.6

2004-03-15

Development

Release Notes

GNOME 2.8

2004-09-15

Development

Release Notes

GNOME 2.10

2005-03-09

Development

Release Notes

GNOME 2.12

2005-09-07

Development

Release Notes

GNOME 2.14

2006-03-15

Development

Release Notes

GNOME 2.16

2006-09-06

Development

Release Notes

+
+
+
+ + + + +
+ + + + Design Notes +
+ + + + +
+ + + + Comparison to HTML +
+ + + + +
+ + + + Comparison to DocBook +
+ +
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 - - - - - - + + + + + + + + - - - - - - + + + + + + + + + + + - - - - - - + + + + + + + + + + + + +
+ + + + + +
+
+ + + + + + + + + + +
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: #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; } @@ -114,6 +117,11 @@ div.title {
+    
+      
+        first-child
+      
+    
     
       
         
@@ -136,6 +144,11 @@ div.title {
 
 
   
+ + + first-child + +
@@ -150,12 +163,6 @@ div.title {
- - cite - - titlecite - - @@ -175,6 +182,11 @@ div.title {
+ + + first-child + +

+ + + first-child + +

@@ -204,6 +221,11 @@ div.title {
+ + + first-child + +
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. + + +html { height: 100%; } body { margin: 0px; direction: ; + 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; } 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:value-of select="mal:title"/> + <xsl:value-of select="/*/mal:title"/>
- +
- + + + + + + + +
+ +
+
+ +
+ +
+
+
+
+ +
+ + + + + + + + +
+ - + + Unmatched element: -- cgit v1.2.1