summaryrefslogtreecommitdiff
path: root/sandbox
diff options
context:
space:
mode:
authorShaun McCance <shaunm@src.gnome.org>2007-03-14 22:21:53 +0000
committerShaun McCance <shaunm@src.gnome.org>2007-03-14 22:21:53 +0000
commitc1808a69bb33de53a55b59be4cbe7d8bb6e8da65 (patch)
tree8880a2f65b194cde730e0df77427f63ce69fa3b5 /sandbox
parent8e8226f100da96a879efbfd5c49d78f86276a0ba (diff)
downloadgnome-doc-utils-c1808a69bb33de53a55b59be4cbe7d8bb6e8da65.tar.gz
- Updated guide and seealso links
* xslt/mal2html-page.xsl: - Updated guide and seealso links * xslt/mal2html-block.xsl: * xslt/mal2html-css.xsl: * xslt/theme.xml: - Some color and style adjustments * spec/mal_app.xml: * spec/mal_cmd.xml: * spec/mal_code.xml: * spec/mal_em.xml: * spec/mal_file.xml: * spec/mal_gui.xml: * spec/mal_input.xml: * spec/mal_key.xml: * spec/mal_link.xml: * spec/mal_output.xml: * spec/mal_quote.xml: * spec/mal_sys.xml: * spec/mal_var.xml: - Ubiquitous linking * spec/mallard.xml: * spec/mal_p.xml: * spec/mal_table.xml: - Minor corrections svn path=/trunk/; revision=901
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/mallard/ChangeLog30
-rw-r--r--sandbox/mallard/spec/mal_app.xml2
-rw-r--r--sandbox/mallard/spec/mal_cmd.xml2
-rw-r--r--sandbox/mallard/spec/mal_code.xml4
-rw-r--r--sandbox/mallard/spec/mal_em.xml2
-rw-r--r--sandbox/mallard/spec/mal_file.xml2
-rw-r--r--sandbox/mallard/spec/mal_gui.xml2
-rw-r--r--sandbox/mallard/spec/mal_input.xml1
-rw-r--r--sandbox/mallard/spec/mal_key.xml1
-rw-r--r--sandbox/mallard/spec/mal_link.xml24
-rw-r--r--sandbox/mallard/spec/mal_output.xml1
-rw-r--r--sandbox/mallard/spec/mal_p.xml6
-rw-r--r--sandbox/mallard/spec/mal_quote.xml1
-rw-r--r--sandbox/mallard/spec/mal_sys.xml1
-rw-r--r--sandbox/mallard/spec/mal_table.xml2
-rw-r--r--sandbox/mallard/spec/mal_var.xml1
-rw-r--r--sandbox/mallard/spec/mallard.xml1
-rw-r--r--sandbox/mallard/xslt/mal2html-block.xsl42
-rw-r--r--sandbox/mallard/xslt/mal2html-css.xsl16
-rw-r--r--sandbox/mallard/xslt/mal2html-page.xsl358
-rw-r--r--sandbox/mallard/xslt/theme.xml28
21 files changed, 411 insertions, 116 deletions
diff --git a/sandbox/mallard/ChangeLog b/sandbox/mallard/ChangeLog
index 8842e94..5dc449e 100644
--- a/sandbox/mallard/ChangeLog
+++ b/sandbox/mallard/ChangeLog
@@ -1,3 +1,33 @@
+2007-03-14 Shaun McCance <shaunm@gnome.org>
+
+ * xslt/mal2html-page.xsl:
+ - Updated guide and seealso links
+
+ * xslt/mal2html-block.xsl:
+ * xslt/mal2html-css.xsl:
+ * xslt/theme.xml:
+ - Some color and style adjustments
+
+ * spec/mal_app.xml:
+ * spec/mal_cmd.xml:
+ * spec/mal_code.xml:
+ * spec/mal_em.xml:
+ * spec/mal_file.xml:
+ * spec/mal_gui.xml:
+ * spec/mal_input.xml:
+ * spec/mal_key.xml:
+ * spec/mal_link.xml:
+ * spec/mal_output.xml:
+ * spec/mal_quote.xml:
+ * spec/mal_sys.xml:
+ * spec/mal_var.xml:
+ - Ubiquitous linking
+
+ * spec/mallard.xml:
+ * spec/mal_p.xml:
+ * spec/mal_table.xml:
+ - Minor corrections
+
2007-03-02 Shaun McCance <shaunm@gnome.org>
* spec/10minutes.xml:
diff --git a/sandbox/mallard/spec/mal_app.xml b/sandbox/mallard/spec/mal_app.xml
index 1fe9828..4ff1eb4 100644
--- a/sandbox/mallard/spec/mal_app.xml
+++ b/sandbox/mallard/spec/mal_app.xml
@@ -2,6 +2,7 @@
id="mal_app">
<info>
<link type="guide" xref="mal_inline"/>
+ <link type="seealso" xref="mal_link#ubiquitous"/>
<version number="0.1" date="2007-02-08" status="review"/>
<credit type="author" name="Shaun McCance" email="shaunm@gnome.org"/>
<copyright year="2007" name="Shaun McCance"/>
@@ -12,6 +13,7 @@
<synopsis><code mime="application/relax-ng-compact-syntax">
mal_app = element app {
+ <link xref="mal_link#ubiquitous">mal_link_attr</link>?,
<link xref="mal_inline#simple">mal_inline_simple</link>+
}
</code></synopsis>
diff --git a/sandbox/mallard/spec/mal_cmd.xml b/sandbox/mallard/spec/mal_cmd.xml
index 218d022..7043203 100644
--- a/sandbox/mallard/spec/mal_cmd.xml
+++ b/sandbox/mallard/spec/mal_cmd.xml
@@ -3,6 +3,7 @@
<info>
<link type="guide" xref="mal_inline"/>
<link type="seealso" xref="mal_screen"/>
+ <link type="seealso" xref="mal_link#ubiquitous"/>
<version number="0.1" date="2007-02-05" status="incomplete"/>
<credit type="author" name="Shaun McCance" email="shaunm@gnome.org"/>
<copyright year="2007" name="Shaun McCance"/>
@@ -13,6 +14,7 @@
<synopsis><code mime="application/relax-ng-compact-syntax">
mal_cmd = element cmd {
+ <link xref="mal_link#ubiquitous">mal_link_attr</link>?,
<link xref="mal_inline#simple">mal_inline_simple</link>+
}
</code></synopsis>
diff --git a/sandbox/mallard/spec/mal_code.xml b/sandbox/mallard/spec/mal_code.xml
index 4cfe00f..ab738fb 100644
--- a/sandbox/mallard/spec/mal_code.xml
+++ b/sandbox/mallard/spec/mal_code.xml
@@ -3,6 +3,7 @@
<info>
<link type="guide" xref="mal_block#simple"/>
<link type="guide" xref="mal_inline"/>
+ <link type="seealso" xref="mal_link#ubiquitous"/>
<version number="0.1" date="2007-02-21" status="stub"/>
</info>
@@ -10,15 +11,14 @@
<synopsis><code mime="application/relax-ng-compact-syntax">
mal_code_block = element code {
- <link xref="mal_attr">mal_attr_common</link>,
attribute mime { text },
<link xref="mal_inline">mal_inline</link>+
}</code></synopsis>
<synopsis><code>
mal_code_inline = element code {
- <link xref="mal_attr">mal_attr_common</link>,
attribute mime { text },
+ <link xref="mal_link#ubiquitous">mal_link_attr</link>?,
<link xref="mal_inline">mal_inline_simple</link>+
}</code></synopsis>
diff --git a/sandbox/mallard/spec/mal_em.xml b/sandbox/mallard/spec/mal_em.xml
index 53417df..293cd2d 100644
--- a/sandbox/mallard/spec/mal_em.xml
+++ b/sandbox/mallard/spec/mal_em.xml
@@ -2,6 +2,7 @@
id="mal_em">
<info>
<link type="guide" xref="mal_inline"/>
+ <link type="seealso" xref="mal_link#ubiquitous"/>
<version number="0.1" date="2007-02-21" status="stub"/>
</info>
@@ -9,6 +10,7 @@
<synopsis><code mime="application/relax-ng-compact-syntax">
mal_em = element em {
+ <link xref="mal_link#ubiquitous">mal_link_attr</link>?,
<link xref="mal_inline#simple">mal_inline_simple</link>+
}
</code></synopsis>
diff --git a/sandbox/mallard/spec/mal_file.xml b/sandbox/mallard/spec/mal_file.xml
index f460bb0..7a79d2c 100644
--- a/sandbox/mallard/spec/mal_file.xml
+++ b/sandbox/mallard/spec/mal_file.xml
@@ -2,6 +2,7 @@
id="mal_file">
<info>
<link type="guide" xref="mal_inline"/>
+ <link type="seealso" xref="mal_link#ubiquitous"/>
<version number="0.1" date="2007-02-21" status="stub"/>
</info>
@@ -9,6 +10,7 @@
<synopsis><code mime="application/relax-ng-compact-syntax">
mal_file = element file {
+ <link xref="mal_link#ubiquitous">mal_link_attr</link>?,
<link xref="mal_inline#simple">mal_inline_simple</link>+
}
</code></synopsis>
diff --git a/sandbox/mallard/spec/mal_gui.xml b/sandbox/mallard/spec/mal_gui.xml
index 767357b..25af6e5 100644
--- a/sandbox/mallard/spec/mal_gui.xml
+++ b/sandbox/mallard/spec/mal_gui.xml
@@ -2,6 +2,7 @@
id="mal_gui">
<info>
<link type="guide" xref="mal_inline"/>
+ <link type="seealso" xref="mal_link#ubiquitous"/>
<version number="0.1" date="2007-02-21" status="stub"/>
</info>
@@ -10,6 +11,7 @@
<synopsis><code mime="application/relax-ng-compact-syntax">
mal_gui = element gui {
attribute type { "check" | "radio" | "menuitem" }?,
+ <link xref="mal_link#ubiquitous">mal_link_attr</link>?,
( mal_gui + |
<link xref="mal_inline#simple">mal_inline_simple</link> + )
}
diff --git a/sandbox/mallard/spec/mal_input.xml b/sandbox/mallard/spec/mal_input.xml
index 7806032..30b5c18 100644
--- a/sandbox/mallard/spec/mal_input.xml
+++ b/sandbox/mallard/spec/mal_input.xml
@@ -2,6 +2,7 @@
id="mal_input">
<info>
<link type="guide" xref="mal_inline"/>
+ <link type="seealso" xref="mal_link#ubiquitous"/>
<version number="0.1" date="2007-02-21" status="stub"/>
</info>
diff --git a/sandbox/mallard/spec/mal_key.xml b/sandbox/mallard/spec/mal_key.xml
index 2e611e6..8458199 100644
--- a/sandbox/mallard/spec/mal_key.xml
+++ b/sandbox/mallard/spec/mal_key.xml
@@ -2,6 +2,7 @@
id="mal_key">
<info>
<link type="guide" xref="mal_inline"/>
+ <link type="seealso" xref="mal_link#ubiquitous"/>
<version number="0.1" date="2007-02-21" status="stub"/>
</info>
diff --git a/sandbox/mallard/spec/mal_link.xml b/sandbox/mallard/spec/mal_link.xml
index 10b887a..2bc47e8 100644
--- a/sandbox/mallard/spec/mal_link.xml
+++ b/sandbox/mallard/spec/mal_link.xml
@@ -7,4 +7,28 @@
<title>Hyperlinks</title>
+<synopsis><code mime="application/relax-ng-compact-syntax">
+mal_link = element link {
+ ( attribute xref { text },
+ <link xref="mal_inline#simple">mal_inline_simple</link> ?
+ ) |
+ ( attribute href { text },
+ <link xref="mal_inline#simple">mal_inline_simple</link>
+ )
+}
+</code></synopsis>
+
+<!-- BEGIN ubiquitous -->
+<section id="ubiquitous">
+ <title>Ubiquitous Linking</title>
+
+ <synopsis><code mime="application/relax-ng-compact-syntax">
+mal_link_attr = (
+ attribute xref { text } |
+ attribute href { text } )
+</code></synopsis>
+
+</section>
+<!-- END ubiquitous -->
+
</topic>
diff --git a/sandbox/mallard/spec/mal_output.xml b/sandbox/mallard/spec/mal_output.xml
index 0490e65..3d7ae7a 100644
--- a/sandbox/mallard/spec/mal_output.xml
+++ b/sandbox/mallard/spec/mal_output.xml
@@ -2,6 +2,7 @@
id="mal_output">
<info>
<link type="guide" xref="mal_inline"/>
+ <link type="seealso" xref="mal_link#ubiquitous"/>
<version number="0.1" date="2007-02-21" status="stub"/>
</info>
diff --git a/sandbox/mallard/spec/mal_p.xml b/sandbox/mallard/spec/mal_p.xml
index 0e78284..135359b 100644
--- a/sandbox/mallard/spec/mal_p.xml
+++ b/sandbox/mallard/spec/mal_p.xml
@@ -18,7 +18,7 @@ element. The <code>p</code> element creates a paragraph in the formatted
outout.</p>
<comment>
- <cite><name>Shaun McCance</name><date>2007-01-25</date></cite>
+ <cite name="Shaun McCance" date="2007-01-25"/>
<p>Add some more description.</p>
</comment>
@@ -27,7 +27,7 @@ outout.</p>
<section id="examples" status="tentative">
<title>Examples</title>
<comment>
- <cite><name>Shaun McCance</name><date>2007-01-25</date></cite>
+ <cite name="Shaun McCance" date="2007-01-25"/>
<p>Add examples.</p>
</comment>
</section>
@@ -38,7 +38,7 @@ outout.</p>
<section id="processing" status="tentative">
<title>Processing Expectations</title>
<comment>
- <cite><name>Shaun McCance</name><date>2007-01-25</date></cite>
+ <cite name="Shaun McCance" date="2007-01-25"/>
<p>Add processing expectations. Very basic. Mention margins and
indentation as means of demarkating paragraphs. Explicitly mention
the no-block-nesting thing.</p>
diff --git a/sandbox/mallard/spec/mal_quote.xml b/sandbox/mallard/spec/mal_quote.xml
index 779c694..eed644c 100644
--- a/sandbox/mallard/spec/mal_quote.xml
+++ b/sandbox/mallard/spec/mal_quote.xml
@@ -2,6 +2,7 @@
id="mal_quote">
<info>
<link type="guide" xref="mal_inline"/>
+ <link type="seealso" xref="mal_link#ubiquitous"/>
<version number="0.1" date="2007-02-21" status="stub"/>
</info>
diff --git a/sandbox/mallard/spec/mal_sys.xml b/sandbox/mallard/spec/mal_sys.xml
index 75d4e12..41660c7 100644
--- a/sandbox/mallard/spec/mal_sys.xml
+++ b/sandbox/mallard/spec/mal_sys.xml
@@ -2,6 +2,7 @@
id="mal_sys">
<info>
<link type="guide" xref="mal_inline"/>
+ <link type="seealso" xref="mal_link#ubiquitous"/>
<version number="0.1" date="2007-02-21" status="stub"/>
</info>
diff --git a/sandbox/mallard/spec/mal_table.xml b/sandbox/mallard/spec/mal_table.xml
index f09b225..e1520ec 100644
--- a/sandbox/mallard/spec/mal_table.xml
+++ b/sandbox/mallard/spec/mal_table.xml
@@ -1,5 +1,5 @@
<topic xmlns="http://www.gnome.org/~shaunm/mallard"
- id="mal_list">
+ id="mal_table">
<info>
<link type="guide" xref="mal_block#containers"/>
</info>
diff --git a/sandbox/mallard/spec/mal_var.xml b/sandbox/mallard/spec/mal_var.xml
index 70ea31b..fd5139d 100644
--- a/sandbox/mallard/spec/mal_var.xml
+++ b/sandbox/mallard/spec/mal_var.xml
@@ -2,6 +2,7 @@
id="mal_var">
<info>
<link type="guide" xref="mal_inline"/>
+ <link type="seealso" xref="mal_link#ubiquitous"/>
<version number="0.1" date="2007-02-21" status="stub"/>
</info>
diff --git a/sandbox/mallard/spec/mallard.xml b/sandbox/mallard/spec/mallard.xml
index ed43e05..777d48b 100644
--- a/sandbox/mallard/spec/mallard.xml
+++ b/sandbox/mallard/spec/mallard.xml
@@ -5,6 +5,7 @@
<link type="page" xref="explore"/>
<link type="page" xref="principles"/>
<link type="page" xref="spec"/>
+ <copyright year="2007" name="Shaun McCance"/>
<version number="0.1" date="2007-02-22" status="stub"/>
</info>
diff --git a/sandbox/mallard/xslt/mal2html-block.xsl b/sandbox/mallard/xslt/mal2html-block.xsl
index e5b8be9..b2c4b72 100644
--- a/sandbox/mallard/xslt/mal2html-block.xsl
+++ b/sandbox/mallard/xslt/mal2html-block.xsl
@@ -36,32 +36,14 @@ REMARK: Describe this template
-->
<xsl:template name="mal2html.block.css">
<xsl:text>
-h1.title, h2.title, h3.title, h4.title, h5.title, h6.title, h7.title, div.title {
+div.title {
color: </xsl:text>
<xsl:call-template name="theme.get_color">
<xsl:with-param name="id" select="'text-light'"/>
</xsl:call-template>
<xsl:text>;
- margin: 0;
-}
-h1.title, h2.title {
- border-bottom: solid 1px </xsl:text>
- <xsl:call-template name="theme.get_color">
- <xsl:with-param name="id" select="'gray-medium'"/>
- </xsl:call-template>
- <xsl:text>;
+ font-weight: bold;
}
-h1.title { font-size: 1.72em; }
-h2.title { font-size: 1.44em; }
-h3.title { font-size: 1.2em; }
-h4.title { font-size: 1em; }
-h5.title { font-size: 1em; }
-h6.title { font-size: 1em; }
-h7.title { font-size: 1em; }
-div.title { font-weight: bold; }
-div.section { margin-top: 2em; clear: both; }
-div.section div.section { margin-top: 1.72em; margin-left: 1.72em; }
-div.section div.section div.section { margin-top: 1.44em; }
pre.code {
<!-- FIXME: theme -->
background: url(mallard-icon-code.png) no-repeat top right;
@@ -73,19 +55,21 @@ pre.code {
padding: 0.5em 1em 0.5em 1em;
}
div.comment {
- margin-left: 1.72em;
- padding: 0.5em 1em 0.5em 1em;
+ padding: 0.5em;
border: solid 2px </xsl:text>
<xsl:call-template name="theme.get_color">
- <xsl:with-param name="id" select="'red-dark'"/>
+ <xsl:with-param name="id" select="'red-border'"/>
</xsl:call-template>
<xsl:text>;
background-color: </xsl:text>
<xsl:call-template name="theme.get_color">
- <xsl:with-param name="id" select="'red-light'"/>
+ <xsl:with-param name="id" select="'red-background'"/>
</xsl:call-template>
<xsl:text>;
}
+div.comment div.comment {
+ margin: 1em 0 0 1em;
+}
div.comment div.cite { margin: 0; font-style: italic; }
div.figure {
@@ -96,12 +80,12 @@ div.figure {
<xsl:text>;
border: solid 1px </xsl:text>
<xsl:call-template name="theme.get_color">
- <xsl:with-param name="id" select="'gray-dark'"/>
+ <xsl:with-param name="id" select="'gray-border'"/>
</xsl:call-template>
<xsl:text>;
background-color: </xsl:text>
<xsl:call-template name="theme.get_color">
- <xsl:with-param name="id" select="'gray-medium'"/>
+ <xsl:with-param name="id" select="'gray-background'"/>
</xsl:call-template>
<xsl:text>;
margin-left: 1.72em;
@@ -115,7 +99,7 @@ div.figure-contents {
<xsl:text>;
border: solid 1px </xsl:text>
<xsl:call-template name="theme.get_color">
- <xsl:with-param name="id" select="'gray-dark'"/>
+ <xsl:with-param name="id" select="'gray-border'"/>
</xsl:call-template>
<xsl:text>;
background-color: </xsl:text>
@@ -135,12 +119,12 @@ div.synopsis {
border-bottom: solid 2px;
border-color: </xsl:text>
<xsl:call-template name="theme.get_color">
- <xsl:with-param name="id" select="'blue-dark'"/>
+ <xsl:with-param name="id" select="'blue-border'"/>
</xsl:call-template>
<xsl:text>;
background-color: </xsl:text>
<xsl:call-template name="theme.get_color">
- <xsl:with-param name="id" select="'gray-light'"/>
+ <xsl:with-param name="id" select="'gray-background'"/>
</xsl:call-template>
<xsl:text>;
padding: 0.5em 1em 0.5em 1em;
diff --git a/sandbox/mallard/xslt/mal2html-css.xsl b/sandbox/mallard/xslt/mal2html-css.xsl
index 144774e..fcdcc2f 100644
--- a/sandbox/mallard/xslt/mal2html-css.xsl
+++ b/sandbox/mallard/xslt/mal2html-css.xsl
@@ -89,7 +89,21 @@ by extension stylesheets to extend or override the CSS.
<xsl:text>
div, pre, p { margin: 1em 0 0 0; padding: 0; }
.first-child { margin-top: 0; }
-a { text-decoration: none; }
+a {
+ text-decoration: none;
+ color: </xsl:text>
+ <xsl:call-template name="theme.get_color">
+ <xsl:with-param name="id" select="'link'"/>
+ </xsl:call-template>
+ <xsl:text>;
+}
+a:visited {
+ color: </xsl:text>
+ <xsl:call-template name="theme.get_color">
+ <xsl:with-param name="id" select="'link-visited'"/>
+ </xsl:call-template>
+ <xsl:text>;
+}
a:hover { text-decoration: underline; }
</xsl:text>
<xsl:call-template name="mal2html.css.custom"/>
diff --git a/sandbox/mallard/xslt/mal2html-page.xsl b/sandbox/mallard/xslt/mal2html-page.xsl
index c1b5b41..895b34a 100644
--- a/sandbox/mallard/xslt/mal2html-page.xsl
+++ b/sandbox/mallard/xslt/mal2html-page.xsl
@@ -60,7 +60,7 @@ REMARK: Describe this template
<xsl:variable name="id">
<xsl:choose>
<xsl:when test="$node/self::mal:section">
- <xsl:value-of select="concat(ancestor::mal:topic[1]/@id, '#', @id)"/>
+ <xsl:value-of select="concat((ancestor::mal:guide[1] | ancestor::mal:topic[1])[1]/@id, '#', @id)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@id"/>
@@ -71,11 +71,9 @@ REMARK: Describe this template
<xsl:variable name="pagelinks"
select="$cache//*[mal:info/mal:link[@type = 'page'][@xref = $id]]"/>
<xsl:variable name="guidelinks"
- select="mal:info/mal:link[@type = 'guide']"/>
+ select="$node/mal:info/mal:link[@type = 'guide']"/>
<xsl:if test="$pagelinks or $guidelinks">
- <div class="guidelinks">
- <!-- FIXME: i18n and text sucks -->
- <div class="title">More About</div>
+ <ul class="guidelinks">
<xsl:for-each select="$pagelinks">
<xsl:variable name="position">
<xsl:choose>
@@ -129,7 +127,7 @@ REMARK: Describe this template
</xsl:call-template>
</xsl:for-each>
</xsl:for-each>
- </div>
+ </ul>
</xsl:if>
<!-- END guidelinks -->
</xsl:template>
@@ -160,7 +158,7 @@ REMARK: Describe this template
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <div>
+ <li>
<xsl:attribute name="class">
<xsl:text>guidelink</xsl:text>
<xsl:choose>
@@ -186,7 +184,7 @@ REMARK: Describe this template
<xsl:with-param name="xref" select="$xref"/>
</xsl:call-template>
</a>
- </div>
+ </li>
</xsl:template>
@@ -313,50 +311,218 @@ REMARK: Describe this template
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="mal.link.target">
+ <xsl:with-param name="xref" select="$xref"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <div>
+ <xsl:attribute name="class">
+ <xsl:text>pagelink</xsl:text>
+ <xsl:choose>
+ <xsl:when test="$position = 'only'">
+ <xsl:text> pagelink-only</xsl:text>
+ </xsl:when>
+ <xsl:when test="$position = 'first'">
+ <xsl:text> pagelink-first</xsl:text>
+ </xsl:when>
+ <xsl:when test="$position = 'last'">
+ <xsl:text> pagelink-last</xsl:text>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ <!-- FIXME: call a common linkifier? -->
+ <div class="title">
+ <xsl:call-template name="mal.link.content">
+ <xsl:with-param name="node" select="."/>
+ <xsl:with-param name="xref" select="$xref"/>
+ </xsl:call-template>
+ </div>
+ <xsl:for-each select="$cache">
+ <xsl:variable name="desc"
+ select="key('cache_key', $linkid)/mal:info/mal:desc[1]"/>
+ <xsl:if test="$desc">
+ <div class="desc">
+ <!-- FIXME: should desc contain inline or block? -->
+ <xsl:apply-templates mode="mal2html.inline.mode" select="$desc/node()"/>
+ </div>
+ </xsl:if>
+ </xsl:for-each>
+ </div>
+ </a>
+</xsl:template>
+
+
+<!--**==========================================================================
+mal2html.page.seealsolinks
+Outputs the automatic seealso links from a page related pages
+$node: The #{topic} or #{section} element containing the links
+
+REMARK: Describe this template
+-->
+<xsl:template name="mal2html.page.seealsolinks">
+ <xsl:param name="node" select="."/>
+ <xsl:variable name="id">
+ <xsl:choose>
+ <xsl:when test="$node/self::mal:section">
+ <xsl:value-of select="concat(ancestor::mal:topic[1]/@id, '#', @id)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@id"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <!-- FIXME: // is slow -->
+ <xsl:variable name="inlinks"
+ select="$cache//*[mal:info/mal:link[@type = 'seealso'][@xref = $id]]"/>
+ <xsl:variable name="outlinks"
+ select="$node/mal:info/mal:link[@type = 'seealso']"/>
+ <xsl:if test="$inlinks or $outlinks">
+ <div class="seealsolinks">
+ <!-- FIXME: i18n -->
+ <div class="title">See Also</div>
+ <xsl:for-each select="$inlinks">
+ <xsl:call-template name="mal2html.page.seealsolink">
+ <xsl:with-param name="node" select="$node"/>
+ <xsl:with-param name="page" select="."/>
+ <xsl:with-param name="position">
+ <xsl:choose>
+ <xsl:when test="last() = 1 and count($outlinks) = 0">
+ <xsl:text>only</xsl:text>
+ </xsl:when>
+ <xsl:when test="position() = 1">
+ <xsl:text>first</xsl:text>
+ </xsl:when>
+ <xsl:when test="position() = last() and count($outlinks) = 0">
+ <xsl:text>last</xsl:text>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:for-each>
+ <xsl:for-each select="$outlinks">
+ <xsl:variable name="linkid">
+ <xsl:choose>
+ <xsl:when test="contains(@xref, '#')">
+ <xsl:value-of select="@xref"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="concat(@xref, '#', @xref)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="position">
+ <xsl:choose>
+ <xsl:when test="last() = 1 and count($inlinks) = 0">
+ <xsl:text>only</xsl:text>
+ </xsl:when>
+ <xsl:when test="position() = 1 and count($inlinks) = 0">
+ <xsl:text>first</xsl:text>
+ </xsl:when>
+ <xsl:when test="position() = last()">
+ <xsl:text>last</xsl:text>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:for-each select="$cache">
+ <xsl:call-template name="mal2html.page.seealsolink">
+ <xsl:with-param name="node" select="$node"/>
+ <xsl:with-param name="page" select="key('cache_key', $linkid)"/>
+ <xsl:with-param name="position" select="$position"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:for-each>
+ </div>
+ </xsl:if>
+ <!-- END guidelinks -->
+</xsl:template>
+
+
+<!--**==========================================================================
+mal2html.page.seealsolink
+Outputs an automatic link block for a seealso link
+$node: The #{topic} or #{section} element containing the link
+$page: The element from the cache file of the page being linked to
+$position: The position of this link in the list, either 'first', 'last', or ''
+
+REMARK: Describe this template
+-->
+<xsl:template name="mal2html.page.seealsolink">
+ <xsl:param name="node" select="."/>
+ <xsl:param name="page"/>
+ <xsl:param name="position"/>
+ <xsl:variable name="xref">
+ <xsl:choose>
+ <xsl:when test="$page/self::mal:section">
+ <xsl:value-of select="($page/ancestor::mal:guide | $page/ancestor::mal:topic)[1]/@id"/>
+ <xsl:text>#</xsl:text>
+ <xsl:value-of select="$page/@id"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$page/@id"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
<div>
<xsl:attribute name="class">
- <xsl:text>pagelink</xsl:text>
+ <xsl:text>seealsolink</xsl:text>
<xsl:choose>
<xsl:when test="$position = 'only'">
- <xsl:text> pagelink-only</xsl:text>
+ <xsl:text> seealsolink-only</xsl:text>
</xsl:when>
<xsl:when test="$position = 'first'">
- <xsl:text> pagelink-first</xsl:text>
+ <xsl:text> seealsolink-first</xsl:text>
</xsl:when>
<xsl:when test="$position = 'last'">
- <xsl:text> pagelink-last</xsl:text>
+ <xsl:text> seealsolink-last</xsl:text>
</xsl:when>
</xsl:choose>
</xsl:attribute>
- <!-- FIXME: call a common linkifier? -->
- <div class="title">
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="mal.link.target">
- <xsl:with-param name="xref" select="$xref"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:call-template name="mal.link.content">
- <xsl:with-param name="node" select="."/>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="mal.link.target">
<xsl:with-param name="xref" select="$xref"/>
</xsl:call-template>
- </a>
- </div>
- <xsl:for-each select="$cache">
- <xsl:variable name="desc"
- select="key('cache_key', $linkid)/mal:info/mal:desc[1]"/>
- <xsl:if test="$desc">
- <div class="desc">
- <!-- FIXME: should desc contain inline or block? -->
- <xsl:apply-templates mode="mal2html.inline.mode" select="$desc/node()"/>
- </div>
- </xsl:if>
- </xsl:for-each>
+ </xsl:attribute>
+ <xsl:call-template name="mal.link.content">
+ <xsl:with-param name="node" select="."/>
+ <xsl:with-param name="xref" select="$xref"/>
+ </xsl:call-template>
+ </a>
</div>
</xsl:template>
<!--**==========================================================================
+mal2html.page.sidebar
+Outputs the sidebar for a structural element
+$node: A #{topic}, #{guide}, or #{section} element
+
+REMARK: Describe this template
+-->
+<xsl:template name="mal2html.page.sidebar">
+ <xsl:param name="node" select="."/>
+ <xsl:variable name="guidelinks">
+ <xsl:call-template name="mal2html.page.guidelinks">
+ <xsl:with-param name="node" select="$node"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="seealsolinks">
+ <xsl:call-template name="mal2html.page.seealsolinks">
+ <xsl:with-param name="node" select="$node"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="$guidelinks or $seealsolinks">
+ <div class="sidebar">
+ <xsl:copy-of select="$guidelinks"/>
+ <xsl:copy-of select="$seealsolinks"/>
+ </div>
+ </xsl:if>
+</xsl:template>
+
+
+<!--**==========================================================================
mal2html.page.css
Outputs CSS that controls the appearance of page elements
@@ -366,11 +532,11 @@ REMARK: Describe this template
<xsl:text>
html { height: 100%; }
body {
- margin: 0px;
direction: </xsl:text><xsl:call-template name="l10n.direction"/><xsl:text>;
+ margin: 0px;
background-color: </xsl:text>
<xsl:call-template name="theme.get_color">
- <xsl:with-param name="id" select="'gray-light'"/>
+ <xsl:with-param name="id" select="'gray-background'"/>
</xsl:call-template>
<xsl:text>;
padding: 12px;
@@ -389,12 +555,12 @@ div.version {
max-width: 60em;
border: solid 1px </xsl:text>
<xsl:call-template name="theme.get_color">
- <xsl:with-param name="id" select="'gray-dark'"/>
+ <xsl:with-param name="id" select="'gray-border'"/>
</xsl:call-template>
<xsl:text>;
background-color: </xsl:text>
<xsl:call-template name="theme.get_color">
- <xsl:with-param name="id" select="'yellow-light'"/>
+ <xsl:with-param name="id" select="'yellow-background'"/>
</xsl:call-template>
<xsl:text>;
}
@@ -408,7 +574,7 @@ div.body {
min-height: 20em;
border: solid 1px </xsl:text>
<xsl:call-template name="theme.get_color">
- <xsl:with-param name="id" select="'gray-medium'"/>
+ <xsl:with-param name="id" select="'gray-border'"/>
</xsl:call-template>
<xsl:text>;
background-color: </xsl:text>
@@ -425,14 +591,35 @@ div.copyrights {
</xsl:call-template>
<xsl:text>;
}
-div.pagelinks {
- margin-left: 1em;
-}
-div.pagelink-first, div.pagelink-only {
- margin-top: 0;
+div.section { margin-top: 2em; clear: both; }
+div.section div.section { margin-top: 1.72em; margin-left: 1.72em; }
+div.section div.section div.section { margin-top: 1.44em; }
+div.header {
+ margin: 0;
+ color: </xsl:text>
+ <xsl:call-template name="theme.get_color">
+ <xsl:with-param name="id" select="'text-light'"/>
+ </xsl:call-template>
+ <xsl:text>;
+ border-bottom: solid 1px </xsl:text>
+ <xsl:call-template name="theme.get_color">
+ <xsl:with-param name="id" select="'gray-border'"/>
+ </xsl:call-template>
+ <xsl:text>;
}
+div.section div.section div.header { border: none; }
+h1, h2, h3, h4, h5, h6, h7 { margin: 0; }
+h1.title { font-size: 1.72em; }
+h2.title { font-size: 1.44em; }
+h3.title { font-size: 1.2em; }
+h4.title { font-size: 1em; }
+h5.title { font-size: 1em; }
+h6.title { font-size: 1em; }
+h7.title { font-size: 1em; }
+
div.pagelink div.title {
font-size: 1em;
+ color: inherit;
}
div.pagelink div.desc {
margin-top: 0.2em;
@@ -442,27 +629,66 @@ div.pagelink div.desc {
</xsl:call-template>
<xsl:text>;
}
-div.guidelinks {
- float: right;
- width: 10em;
- margin-top: -1px;
- padding: 0.5em 1em 0.5em 0.5em;
+div.pagelink {
+ margin: 0;
+ padding: 0.5em;
border: solid 1px </xsl:text>
<xsl:call-template name="theme.get_color">
- <xsl:with-param name="id" select="'gray-medium'"/>
+ <xsl:with-param name="id" select="'background'"/>
+ </xsl:call-template>
+ <xsl:text>;
+}
+div.pagelink:hover {
+ border-color: </xsl:text>
+ <xsl:call-template name="theme.get_color">
+ <xsl:with-param name="id" select="'blue-medium'"/>
</xsl:call-template>
<xsl:text>;
background-color: </xsl:text>
<xsl:call-template name="theme.get_color">
- <xsl:with-param name="id" select="'gray-light'"/>
+ <xsl:with-param name="id" select="'blue-light'"/>
</xsl:call-template>
<xsl:text>;
}
-div.guidelinks div.title {
+div.sidebar { margin: 0; }
+ul.guidelinks {
+ display: block;
+ margin: 0;
+ text-align: right;
+}
+li.guidelink { display: inline; }
+li.guidelink::before {
+ content: ' • ';
+ color: </xsl:text>
+ <xsl:call-template name="theme.get_color">
+ <xsl:with-param name="id" select="'gray-dark'"/>
+ </xsl:call-template>
+ <xsl:text>;
+}
+li.guidelink-first::before, li.guidelink-only::before {
+ content: '';
+}
+
+
+div.sidebar div.title {
font-size: 1em;
+ font-weight: normal;
+ display: inline;
}
-div.guidelink {
- margin: 0;
+div.seealsolinks { margin: 0; }
+div.seealsolink {
+ display: inline;
+}
+div.seealsolink::before {
+ content: ' • ';
+ color: </xsl:text>
+ <xsl:call-template name="theme.get_color">
+ <xsl:with-param name="id" select="'gray-dark'"/>
+ </xsl:call-template>
+ <xsl:text>;
+}
+div.seealsolink-first::before, div.seealsolink-only::before {
+ content: ' : ';
}
</xsl:text>
</xsl:template>
@@ -539,9 +765,11 @@ div.guidelink {
<!-- = guide = -->
<xsl:template match="mal:guide">
- <xsl:apply-templates mode="mal2html.block.mode"
- select="mal:title | mal:subtitle"/>
- <xsl:call-template name="mal2html.page.guidelinks"/>
+ <div class="header">
+ <xsl:apply-templates mode="mal2html.block.mode"
+ select="mal:title | mal:subtitle"/>
+ </div>
+ <xsl:call-template name="mal2html.page.sidebar"/>
<div class="contents">
<xsl:apply-templates
mode="mal2html.block.mode"
@@ -553,9 +781,11 @@ div.guidelink {
<!-- = topic = -->
<xsl:template match="mal:topic">
- <xsl:apply-templates mode="mal2html.block.mode"
- select="mal:title | mal:subtitle"/>
- <xsl:call-template name="mal2html.page.guidelinks"/>
+ <div class="header">
+ <xsl:apply-templates mode="mal2html.block.mode"
+ select="mal:title | mal:subtitle"/>
+ </div>
+ <xsl:call-template name="mal2html.page.sidebar"/>
<div class="contents">
<xsl:apply-templates
mode="mal2html.block.mode"
@@ -567,9 +797,11 @@ div.guidelink {
<!-- = section = -->
<xsl:template match="mal:section">
<div class="section" id="{@id}">
- <xsl:apply-templates mode="mal2html.block.mode"
- select="mal:title | mal:subtitle"/>
- <xsl:call-template name="mal2html.page.guidelinks"/>
+ <div class="header">
+ <xsl:apply-templates mode="mal2html.block.mode"
+ select="mal:title | mal:subtitle"/>
+ </div>
+ <xsl:call-template name="mal2html.page.sidebar"/>
<div class="contents">
<xsl:apply-templates
mode="mal2html.block.mode"
diff --git a/sandbox/mallard/xslt/theme.xml b/sandbox/mallard/xslt/theme.xml
index 1ace77d..355857f 100644
--- a/sandbox/mallard/xslt/theme.xml
+++ b/sandbox/mallard/xslt/theme.xml
@@ -2,26 +2,20 @@
<theme xmlns="http://www.gnome.org/~shaunm/gnome-doc-utils/theme">
<color id="background" value="#ffffff"/>
- <color id="link" value="#1f5b99"/>
- <color id="link-visited" value="#991f73"/>
+ <color id="link" value="#1f609f"/>
+ <color id="link-visited" value="#9f1f6f"/>
<color id="text" value="#000000"/>
- <color id="text-light" value="#4f4f4f"/>
+ <color id="text-light" value="#3f3f3f"/>
- <color id="blue-light" value="#edf4fa"/>
- <color id="blue-medium" value="#bbdbfa"/>
- <color id="blue-dark" value="#96c7fa"/>
+ <color id="blue-background" value="#f0f9ff"/>
+ <color id="blue-border" value="#c0c9ff"/>
+ <color id="gray-background" value="#f9f9f6"/>
+ <color id="gray-border" value="#e0e0df"/>
+ <color id="red-background" value="#fff0f0"/>
+ <color id="red-border" value="#ffc0c0"/>
+ <color id="yellow-background" value="#fffff0"/>
+ <color id="yellow-border" value="#ffffc0"/>
- <color id="gray-light" value="#f7f7f5"/>
- <color id="gray-medium" value="#e0e0df"/>
- <color id="gray-dark" value="#cfcfcd"/>
-
- <color id="red-light" value="#faeded"/>
- <color id="red-medium" value="#fac8c8"/>
- <color id="red-dark" value="#faa2a2"/>
-
- <color id="yellow-light" value="#faf8ed"/>
- <color id="yellow-medium" value="#f1f2c8"/>
- <color id="yellow-dark" value="#fae57d"/>
<!-- notes/admonitions -->
<icon id="bug" width="48" height="48" src=""/>