diff options
author | Shaun McCance <shaunm@src.gnome.org> | 2007-04-23 23:37:05 +0000 |
---|---|---|
committer | Shaun McCance <shaunm@src.gnome.org> | 2007-04-23 23:37:05 +0000 |
commit | 906dc1599df1aa451dfc09ff7d0ce5e6ea05a96b (patch) | |
tree | 33329aeae542dc634dfdf081d64559903bbb49b2 /xslt/docbook/html | |
parent | 4627dd1e508b32445989217c5557738934c80134 (diff) | |
download | gnome-doc-utils-906dc1599df1aa451dfc09ff7d0ce5e6ea05a96b.tar.gz |
- Added a variablelist example
* test/testbook/testbook.xml:
- Added a variablelist example
* xslt/docbook/html/db2html-css.xsl:
* xslt/docbook/html/db2html-info.xsl:
* xslt/docbook/html/db2html-list.xsl:
- Working on list styling
- Making sure info pages have necessary classes
svn path=/trunk/; revision=924
Diffstat (limited to 'xslt/docbook/html')
-rw-r--r-- | xslt/docbook/html/db2html-css.xsl | 9 | ||||
-rw-r--r-- | xslt/docbook/html/db2html-info.xsl | 58 | ||||
-rw-r--r-- | xslt/docbook/html/db2html-list.xsl | 75 |
3 files changed, 81 insertions, 61 deletions
diff --git a/xslt/docbook/html/db2html-css.xsl b/xslt/docbook/html/db2html-css.xsl index c1dcf0a..77a58b1 100644 --- a/xslt/docbook/html/db2html-css.xsl +++ b/xslt/docbook/html/db2html-css.xsl @@ -131,7 +131,12 @@ div.header { border-bottom: solid 1px </xsl:text> <xsl:value-of select="$theme.color.gray_border"/><xsl:text>; } -h1, h2, h3, h4, h5, h6, h7 { margin: 0; padding: 0; } +h1, h2, h3, h4, h5, h6, h7 { + margin: 0; + padding: 0; + color: </xsl:text> + <xsl:value-of select="$theme.color.text_light"/><xsl:text>; +} h1.title { font-size: 1.72em; } h2.title { font-size: 1.44em; } h3.title { font-size: 1.2em; } @@ -215,7 +220,7 @@ div.autotoc { <xsl:value-of select="$theme.color.blue_border"/><xsl:text>; } div.autotoc ul { margin: 0; padding: 0; } -div.autotoc li { list-style-type: none; } +div.autotoc li { list-style-type: none; margin: 0; } div.autotoc div.autotoc-title { margin-bottom: 0.5em; } div.autotoc div.autotoc { border: none; diff --git a/xslt/docbook/html/db2html-info.xsl b/xslt/docbook/html/db2html-info.xsl index 60464d9..f4872ed 100644 --- a/xslt/docbook/html/db2html-info.xsl +++ b/xslt/docbook/html/db2html-info.xsl @@ -170,9 +170,11 @@ REMARK: Describe this template <xsl:with-param name="number" select="count($authors)"/> </xsl:call-template> </h2> - <dl> - <xsl:apply-templates mode="db2html.info.mode" select="$authors"/> - </dl> + <div class="block block-first"> + <dl> + <xsl:apply-templates mode="db2html.info.mode" select="$authors"/> + </dl> + </div> </div> </xsl:if> </xsl:template> @@ -199,9 +201,11 @@ REMARK: Describe this template <xsl:with-param name="number" select="count($editors)"/> </xsl:call-template> </h2> - <dl> - <xsl:apply-templates mode="db2html.info.mode" select="$editors"/> - </dl> + <div class="block block-first"> + <dl> + <xsl:apply-templates mode="db2html.info.mode" select="$editors"/> + </dl> + </div> </div> </xsl:if> </xsl:template> @@ -228,9 +232,11 @@ REMARK: Describe this template <xsl:with-param name="number" select="count($collabs)"/> </xsl:call-template> </h2> - <dl> - <xsl:apply-templates mode="db2html.info.mode" select="$collabs"/> - </dl> + <div class="block block-first"> + <dl> + <xsl:apply-templates mode="db2html.info.mode" select="$collabs"/> + </dl> + </div> </div> </xsl:if> </xsl:template> @@ -260,9 +266,11 @@ REMARK: Describe this template <xsl:with-param name="number" select="count($translators)"/> </xsl:call-template> </h2> - <dl> - <xsl:apply-templates mode="db2html.info.mode" select="$translators"/> - </dl> + <div class="block block-first"> + <dl> + <xsl:apply-templates mode="db2html.info.mode" select="$translators"/> + </dl> + </div> </div> </xsl:if> </xsl:template> @@ -288,9 +296,11 @@ REMARK: Describe this template <xsl:with-param name="number" select="count($publishers)"/> </xsl:call-template> </h2> - <dl> - <xsl:apply-templates mode="db2html.info.mode" select="$publishers"/> - </dl> + <div class="block block-first"> + <dl> + <xsl:apply-templates mode="db2html.info.mode" select="$publishers"/> + </dl> + </div> </div> </xsl:if> </xsl:template> @@ -321,9 +331,11 @@ REMARK: Describe this template <xsl:with-param name="number" select="count($othercredits)"/> </xsl:call-template> </h2> - <dl> - <xsl:apply-templates mode="db2html.info.mode" select="$othercredits"/> - </dl> + <div class="block block-first"> + <dl> + <xsl:apply-templates mode="db2html.info.mode" select="$othercredits"/> + </dl> + </div> </div> </xsl:if> </xsl:template> @@ -349,9 +361,11 @@ REMARK: Describe this template <xsl:with-param name="number" select="count($copyrights)"/> </xsl:call-template> </h2> - <dl> - <xsl:apply-templates mode="db2html.info.mode" select="$copyrights"/> - </dl> + <div class="block block-first"> + <dl> + <xsl:apply-templates mode="db2html.info.mode" select="$copyrights"/> + </dl> + </div> </div> </xsl:if> </xsl:template> @@ -600,7 +614,7 @@ REMARK: Describe this mode. <!-- = revision % db2html.info.mode = --> <xsl:template mode="db2html.info.mode" match="revision"> - <div class="revision"> + <div class="block revision"> <xsl:apply-templates mode="db2html.info.mode" select="date"/> <xsl:text>: </xsl:text> <xsl:apply-templates mode="db2html.info.mode" select="revnumber"/> diff --git a/xslt/docbook/html/db2html-list.xsl b/xslt/docbook/html/db2html-list.xsl index b2ca4b0..37140f9 100644 --- a/xslt/docbook/html/db2html-list.xsl +++ b/xslt/docbook/html/db2html-list.xsl @@ -27,15 +27,6 @@ REMARK: Describe this module --> -<!--@@========================================================================== -db2html.list.border_color -The color of the border around list elements - -REMARK: Describe this param ---> -<xsl:param name="db2html.list.border_color" select="'black'"/> - - <!--**========================================================================== db2html.orderedlist.start Determines the number to use for the first #{listitem} in an #{orderedlist} @@ -76,19 +67,31 @@ REMARK: Describe this template --> <xsl:template name="db2html.list.css"> <xsl:text> -div.list { margin-left: 0px; margin-bottom: 1em; padding: 0px; } -div.list dl dt { margin-left: 0em; } -div.list dl dd + dt { margin-top: 1em; } -div.list dl dd { - margin-top: 0.69em; +ul, ol, dl { margin: 0; } +li { + <!-- FIXME: rtl --> margin-left: 1.72em; - margin-right: 1em; + <!-- FIXME: rtl --> + padding: 0; +} +dt { margin: 0; } +dd { + <!-- FIXME: rtl --> + margin-left: 1.72em; +} +div.list dd { + margin-top: 0.2em; + margin-bottom: 1em; } -div.list ul { margin-left: 1.72em; padding-left: 0em; } -div.list ol { margin-left: 1.72em; padding-left: 0em; } -div.list ul li { margin-right: 1em; padding: 0em; } -div.list ol li { margin-right: 1em; padding: 0em; } +dt.term { + font-weight: bold; + color: </xsl:text> + <xsl:value-of select="$theme.color.text_light"/><xsl:text>; +} + +<!-- FIXME: no sibling selectors --> div.list li + li { margin-top: 0.69em; } +<!-- FIXME: no child selectors --> div.simplelist > table { border: none; } </xsl:text> </xsl:template> @@ -98,7 +101,7 @@ div.simplelist > table { border: none; } <!-- = itemizedlist = --> <xsl:template match="itemizedlist"> - <div class="list"> + <div class="block list"> <div class="itemizedlist"> <xsl:call-template name="db2html.anchor"/> <xsl:apply-templates select="*[name(.) != 'listitem']"/> @@ -159,7 +162,7 @@ div.simplelist > table { border: none; } </xsl:choose> </xsl:variable> <!-- FIXME: auto-numeration for nested lists --> - <div class="list"> + <div class="block list"> <div class="orderedlist"> <xsl:call-template name="db2html.anchor"/> <xsl:apply-templates select="*[name(.) != 'listitem']"/> @@ -208,7 +211,7 @@ div.simplelist > table { border: none; } <!-- = procedure = --> <xsl:template match="procedure"> - <div class="list"> + <div class="block list"> <div class="procedure"> <xsl:call-template name="db2html.anchor"/> <xsl:apply-templates select="*[name(.) != 'step']"/> @@ -276,6 +279,7 @@ div.simplelist > table { border: none; } <xsl:template match="segtitle"> <b> <xsl:apply-templates/> + <!-- FIXME: i18n --> <xsl:text>: </xsl:text> </b> </xsl:template> @@ -307,7 +311,7 @@ div.simplelist > table { border: none; } </span> </xsl:when> <xsl:when test="@type = 'horiz'"> - <div class="list"> + <div class="block list"> <div class="simplelist"> <xsl:call-template name="db2html.anchor"/> <table> @@ -329,7 +333,7 @@ div.simplelist > table { border: none; } </div> </xsl:when> <xsl:otherwise> - <div class="list"> + <div class="block list"> <div class="simplelist"> <xsl:call-template name="db2html.anchor"/> <xsl:variable name="rows" select="ceiling(count(member) div $columns)"/> @@ -383,14 +387,19 @@ div.simplelist > table { border: none; } <!-- = term = --> <xsl:template match="term"> - <xsl:call-template name="db2html.inline"> - <xsl:with-param name="bold" select="@role = 'bold'"/> - </xsl:call-template> + <dt class="term"> + <xsl:if test="../varlistentry/@id and not(preceding-sibling::term)"> + <xsl:call-template name="db2html.anchor"> + <xsl:with-param name="node" select=".."/> + </xsl:call-template> + </xsl:if> + <xsl:apply-templates/> + </dt> </xsl:template> <!-- = variablelist = --> <xsl:template match="variablelist"> - <div class="list"> + <div class="block list"> <div class="variablelist"> <xsl:call-template name="db2html.anchor"/> <xsl:apply-templates select="*[name(.) != 'varlistentry']"/> @@ -403,15 +412,7 @@ div.simplelist > table { border: none; } <!-- = varlistentry = --> <xsl:template match="varlistentry"> - <dt> - <xsl:call-template name="db2html.anchor"/> - <xsl:for-each select="term"> - <xsl:if test="position() != 1"> - <xsl:text>, </xsl:text> - </xsl:if> - <xsl:apply-templates select="."/> - </xsl:for-each> - </dt> + <xsl:apply-templates select="term"/> <xsl:apply-templates select="listitem"/> </xsl:template> |