summaryrefslogtreecommitdiff
path: root/xslt/docbook/html
diff options
context:
space:
mode:
Diffstat (limited to 'xslt/docbook/html')
-rw-r--r--xslt/docbook/html/db2html-block.xsl307
-rw-r--r--xslt/docbook/html/db2html-classsynopsis.xsl2
-rw-r--r--xslt/docbook/html/db2html-css.xsl70
-rw-r--r--xslt/docbook/html/db2html-division.xsl207
-rw-r--r--xslt/docbook/html/db2html-index.xsl225
-rw-r--r--xslt/docbook/html/db2html-links.xsl21
-rw-r--r--xslt/docbook/html/db2html-list.xsl114
-rw-r--r--xslt/docbook/html/db2html-media.xsl39
-rw-r--r--xslt/docbook/html/db2html.xsl4
9 files changed, 770 insertions, 219 deletions
diff --git a/xslt/docbook/html/db2html-block.xsl b/xslt/docbook/html/db2html-block.xsl
index d0e2b049..b9cb4ee9 100644
--- a/xslt/docbook/html/db2html-block.xsl
+++ b/xslt/docbook/html/db2html-block.xsl
@@ -80,6 +80,7 @@ $class: The value of the HTML #{class} attribute.
$title: An element to use for the title.
$caption: An element to use for the caption.
$titleattr: An optional value for the HTML #{title} attribute.
+$icon: An icon for the block, as a copyable node set.
This template outputs HTML for a formal DocBook element, one that can have
a title or caption. It passes the ${class} parameter to *{html.class.attr}.
@@ -98,6 +99,7 @@ This template handles conditional processing.
$node/db:title | $node/db:info/db:title"/>
<xsl:param name="caption" select="$node/caption | $node/db:caption"/>
<xsl:param name="titleattr" select="''"/>
+ <xsl:param name="icon"/>
<xsl:variable name="if">
<xsl:call-template name="db.profile.test">
@@ -121,9 +123,10 @@ This template handles conditional processing.
<xsl:call-template name="db2html.anchor">
<xsl:with-param name="node" select="$node"/>
</xsl:call-template>
+ <xsl:copy-of select="$icon"/>
<div class="inner">
<xsl:if test="$node/self::figure or $node/self::db:figure">
- <a href="#" class="zoom">
+ <a href="#" class="figure-zoom">
<xsl:attribute name="data-zoom-in-title">
<xsl:call-template name="l10n.gettext">
<xsl:with-param name="msgid" select="'View images at normal size'"/>
@@ -134,6 +137,8 @@ This template handles conditional processing.
<xsl:with-param name="msgid" select="'Scale images down'"/>
</xsl:call-template>
</xsl:attribute>
+ <xsl:call-template name="icons.svg.figure.zoom.in"/>
+ <xsl:call-template name="icons.svg.figure.zoom.out"/>
</a>
</xsl:if>
<xsl:if test="$title">
@@ -360,15 +365,14 @@ This template handles conditional processing.
<xsl:with-param name="number" select="$number"/>
</xsl:call-template></pre>
</xsl:if>
- <pre>
- <xsl:attribute name="class">
- <xsl:text>contents </xsl:text>
- <xsl:if test="$html.syntax.highlight and $node/@language">
+ <pre class="contents"><code>
+ <xsl:if test="$html.syntax.highlight and $node/@language">
+ <xsl:attribute name="class">
<xsl:call-template name="html.syntax.class">
<xsl:with-param name="node" select="$node"/>
</xsl:call-template>
- </xsl:if>
- </xsl:attribute>
+ </xsl:attribute>
+ </xsl:if>
<!-- Strip off a leading newline -->
<xsl:if test="$children[1]/self::text()">
<xsl:choose>
@@ -381,7 +385,7 @@ This template handles conditional processing.
</xsl:choose>
</xsl:if>
<xsl:apply-templates select="$children[not(position() = 1 and self::text())]"/>
- </pre>
+ </code></pre>
</div>
</xsl:if>
</xsl:template>
@@ -470,12 +474,41 @@ This template handles conditional processing.
<!-- = caution = -->
<xsl:template match="caution | db:caution">
<xsl:call-template name="db2html.block.formal">
- <xsl:with-param name="class" select="'note note-warning'"/>
+ <xsl:with-param name="class">
+ <xsl:text>note note-</xsl:text>
+ <xsl:choose>
+ <xsl:when test="@role = 'danger'">
+ <xsl:text>danger</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>caution</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
<xsl:with-param name="titleattr">
<xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'Warning'"/>
+ <xsl:with-param name="msgid">
+ <xsl:choose>
+ <xsl:when test="@role = 'danger'">
+ <xsl:text>Danger</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>Caution</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
</xsl:call-template>
</xsl:with-param>
+ <xsl:with-param name="icon">
+ <xsl:choose>
+ <xsl:when test="@role = 'danger'">
+ <xsl:call-template name="icons.svg.note.danger"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="icons.svg.note.caution"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
</xsl:call-template>
</xsl:template>
@@ -526,6 +559,9 @@ This template handles conditional processing.
<xsl:with-param name="msgid" select="'Important'"/>
</xsl:call-template>
</xsl:with-param>
+ <xsl:with-param name="icon">
+ <xsl:call-template name="icons.svg.note.important"/>
+ </xsl:with-param>
</xsl:call-template>
</xsl:template>
@@ -576,6 +612,11 @@ This template handles conditional processing.
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
+ <xsl:with-param name="icon">
+ <xsl:call-template name="icons.svg.note">
+ <xsl:with-param name="style" select="@role"/>
+ </xsl:call-template>
+ </xsl:with-param>
</xsl:call-template>
</xsl:template>
@@ -591,6 +632,216 @@ This template handles conditional processing.
</xsl:call-template>
</xsl:template>
+<xsl:template mode="html.syntax.class.mode"
+ match="programlisting | db:programlisting">
+ <xsl:param name="language" select="translate(@language,
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYX',
+ 'abcdefghijklmnopqrstuvwxyz')"/>
+ <!-- Try to accept the same values as xslthl -->
+ <xsl:choose>
+ <!-- ActionScript -->
+ <xsl:when test="$language = 'actionscript'">
+ <xsl:text>actionscript</xsl:text>
+ </xsl:when>
+ <!-- Apache -->
+ <xsl:when test="$language = 'apache'">
+ <xsl:text>apache</xsl:text>
+ </xsl:when>
+ <!-- AsciiDoc -->
+ <xsl:when test="$language = 'asciidoc' or $language = 'adoc'">
+ <xsl:text>asciidoc</xsl:text>
+ </xsl:when>
+ <!-- Bash -->
+ <xsl:when test="$language = 'sh' or $language = 'bash' or
+ $language = 'csh' or $language = 'bourne'">
+ <xsl:text>bash</xsl:text>
+ </xsl:when>
+ <!-- C -->
+ <xsl:when test="$language = 'c'">
+ <xsl:text>c</xsl:text>
+ </xsl:when>
+ <!-- C# -->
+ <xsl:when test="$language = 'cs' or $language = 'csharp'">
+ <xsl:text>cs</xsl:text>
+ </xsl:when>
+ <!-- C++ -->
+ <xsl:when test="$language = 'cpp' or $language = 'c++'">
+ <xsl:text>cpp</xsl:text>
+ </xsl:when>
+ <!-- Clojure -->
+ <xsl:when test="$language = 'clojure' or $language = 'clj'">
+ <xsl:text>clojure</xsl:text>
+ </xsl:when>
+ <!-- CMake -->
+ <xsl:when test="$language = 'cmake'">
+ <xsl:text>cmake</xsl:text>
+ </xsl:when>
+ <!-- CSS -->
+ <xsl:when test="$language = 'css' or $language = 'css21'">
+ <xsl:text>css</xsl:text>
+ </xsl:when>
+ <!-- D -->
+ <xsl:when test="$language = 'd'">
+ <xsl:text>d</xsl:text>
+ </xsl:when>
+ <!-- Diff -->
+ <xsl:when test="$language = 'diff' or $language = 'patch'">
+ <xsl:text>diff</xsl:text>
+ </xsl:when>
+ <!-- Django -->
+ <xsl:when test="$language = 'django'">
+ <xsl:text>django</xsl:text>
+ </xsl:when>
+ <!-- Dockerfile -->
+ <xsl:when test="$language = 'dockerfile'">
+ <xsl:text>dockerfile</xsl:text>
+ </xsl:when>
+ <!-- DOS -->
+ <xsl:when test="$language = 'dos'">
+ <xsl:text>dos</xsl:text>
+ </xsl:when>
+ <!-- Embedded Ruby -->
+ <xsl:when test="$language = 'erb'">
+ <xsl:text>erb</xsl:text>
+ </xsl:when>
+ <!-- F# -->
+ <xsl:when test="$language = 'fsharp'">
+ <xsl:text>fsharp</xsl:text>
+ </xsl:when>
+ <!-- Go -->
+ <xsl:when test="$language = 'go'">
+ <xsl:text>go</xsl:text>
+ </xsl:when>
+ <!-- Nginx -->
+ <xsl:when test="$language = 'haml'">
+ <xsl:text>haml</xsl:text>
+ </xsl:when>
+ <!-- Haskell -->
+ <xsl:when test="$language = 'haskell' or $language = 'hs'">
+ <xsl:text>hs</xsl:text>
+ </xsl:when>
+ <!-- HTML -->
+ <xsl:when test="$language = 'html' or $language = 'xhtml'">
+ <xsl:text>html</xsl:text>
+ </xsl:when>
+ <!-- HTTP -->
+ <xsl:when test="$language = 'http'">
+ <xsl:text>http</xsl:text>
+ </xsl:when>
+ <!-- INI -->
+ <xsl:when test="$language = 'ini'">
+ <xsl:text>ini</xsl:text>
+ </xsl:when>
+ <!-- Java -->
+ <xsl:when test="$language = 'java'">
+ <xsl:text>java</xsl:text>
+ </xsl:when>
+ <!-- Javascript -->
+ <xsl:when test="$language = 'js' or $language = 'javascript'">
+ <xsl:text>javascript</xsl:text>
+ </xsl:when>
+ <!-- JSON -->
+ <xsl:when test="$language = 'json'">
+ <xsl:text>json</xsl:text>
+ </xsl:when>
+ <!-- LISP -->
+ <xsl:when test="$language = 'lisp' or $language = 'el' or
+ $language = 'cl' or $language = 'lsp'">
+ <xsl:text>lisp</xsl:text>
+ </xsl:when>
+ <!-- Lua -->
+ <xsl:when test="$language = 'lua'">
+ <xsl:text>lua</xsl:text>
+ </xsl:when>
+ <!-- Makefile -->
+ <xsl:when test="$language = 'makefile' or $language = 'make'">
+ <xsl:text>makefile</xsl:text>
+ </xsl:when>
+ <!-- Markdown -->
+ <xsl:when test="$language = 'markdown' or $language = 'md'">
+ <xsl:text>markdown</xsl:text>
+ </xsl:when>
+ <!-- MATLAB/Octave -->
+ <xsl:when test="$language = 'matlab' or $language = 'octave'">
+ <xsl:text>matlab</xsl:text>
+ </xsl:when>
+ <!-- Nginx -->
+ <xsl:when test="$language = 'nginx'">
+ <xsl:text>nginx</xsl:text>
+ </xsl:when>
+ <!-- Objective C -->
+ <xsl:when test="$language = 'objc' or $language = 'm'">
+ <xsl:text>objectivec</xsl:text>
+ </xsl:when>
+ <!-- Perl -->
+ <xsl:when test="$language = 'perl' or
+ $language = 'pl' or $language = 'pm'">
+ <xsl:text>perl</xsl:text>
+ </xsl:when>
+ <!-- PHP -->
+ <xsl:when test="$language = 'php'">
+ <xsl:text>php</xsl:text>
+ </xsl:when>
+ <!-- Python -->
+ <xsl:when test="$language = 'py' or $language = 'python'">
+ <xsl:text>python</xsl:text>
+ </xsl:when>
+ <!-- R/S -->
+ <xsl:when test="$language = 'r' or $language = 's'">
+ <xsl:text>r</xsl:text>
+ </xsl:when>
+ <!-- Ruby -->
+ <xsl:when test="$language = 'ruby' or $language = 'rb'">
+ <xsl:text>ruby</xsl:text>
+ </xsl:when>
+ <!-- Rust -->
+ <xsl:when test="$language = 'rust'">
+ <xsl:text>rust</xsl:text>
+ </xsl:when>
+ <!-- Scala -->
+ <xsl:when test="$language = 'scala'">
+ <xsl:text>scala</xsl:text>
+ </xsl:when>
+ <!-- Scheme -->
+ <xsl:when test="$language = 'scheme' or $language = 'scm'">
+ <xsl:text>scheme</xsl:text>
+ </xsl:when>
+ <!-- Smalltalk -->
+ <xsl:when test="$language = 'smalltalk'">
+ <xsl:text>smalltalk</xsl:text>
+ </xsl:when>
+ <!-- SQL -->
+ <xsl:when test="$language = 'sql' or $language = 'sql92' or
+ $language = 'sql1999' or $language = 'sql2003'">
+ <xsl:text>sql</xsl:text>
+ </xsl:when>
+ <!-- TCL -->
+ <xsl:when test="$language = 'tcl'">
+ <xsl:text>tcl</xsl:text>
+ </xsl:when>
+ <!-- TeX -->
+ <xsl:when test="$language = 'tex' or $language = 'latex'">
+ <xsl:text>tex</xsl:text>
+ </xsl:when>
+ <!-- Vala -->
+ <xsl:when test="$language = 'vala'">
+ <xsl:text>vala</xsl:text>
+ </xsl:when>
+ <!-- XML -->
+ <xsl:when test="$language = 'xml' or $language = 'myxml'">
+ <xsl:text>xml</xsl:text>
+ </xsl:when>
+ <!-- XQuery -->
+ <xsl:when test="$language = 'xq' or $language = 'xquery'">
+ <xsl:text>xquery</xsl:text>
+ </xsl:when>
+ <!-- YAML -->
+ <xsl:when test="$language = 'yaml'">
+ <xsl:text>yaml</xsl:text>
+ </xsl:when>
+ </xsl:choose>
+</xsl:template>
+
<!-- = screen = -->
<xsl:template match="screen | db:screen">
<xsl:call-template name="db2html.pre"/>
@@ -652,6 +903,9 @@ This template handles conditional processing.
<xsl:with-param name="msgid" select="'Tip'"/>
</xsl:call-template>
</xsl:with-param>
+ <xsl:with-param name="icon">
+ <xsl:call-template name="icons.svg.note.tip"/>
+ </xsl:with-param>
</xsl:call-template>
</xsl:template>
@@ -666,12 +920,41 @@ This template handles conditional processing.
<!-- = warning = -->
<xsl:template match="warning | db:warning">
<xsl:call-template name="db2html.block.formal">
- <xsl:with-param name="class" select="'note note-warning'"/>
+ <xsl:with-param name="class">
+ <xsl:text>note note-</xsl:text>
+ <xsl:choose>
+ <xsl:when test="@role = 'danger'">
+ <xsl:text>danger</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>warning</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
<xsl:with-param name="titleattr">
<xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'Warning'"/>
+ <xsl:with-param name="msgid">
+ <xsl:choose>
+ <xsl:when test="@role = 'danger'">
+ <xsl:text>Danger</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>Warning</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
</xsl:call-template>
</xsl:with-param>
+ <xsl:with-param name="icon">
+ <xsl:choose>
+ <xsl:when test="@role = 'danger'">
+ <xsl:call-template name="icons.svg.note.danger"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="icons.svg.note.warning"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
</xsl:call-template>
</xsl:template>
diff --git a/xslt/docbook/html/db2html-classsynopsis.xsl b/xslt/docbook/html/db2html-classsynopsis.xsl
index 10e5a09c..c72e9eab 100644
--- a/xslt/docbook/html/db2html-classsynopsis.xsl
+++ b/xslt/docbook/html/db2html-classsynopsis.xsl
@@ -65,7 +65,7 @@ at the root of a DocBook document.
classsynopsis | constructorsynopsis | fieldsynopsis |
methodsynopsis | destructorsynopsis |
db:classsynopsis | db:constructorsynopsis | db:fieldsynopsis |
- db:methodsynopsis | db:destructorsynopsis |">
+ db:methodsynopsis | db:destructorsynopsis ">
<xsl:variable name="if"><xsl:call-template name="db.profile.test"/></xsl:variable>
<xsl:if test="$if != ''">
<xsl:variable name="language">
diff --git a/xslt/docbook/html/db2html-css.xsl b/xslt/docbook/html/db2html-css.xsl
index 5aa11f8f..16b53331 100644
--- a/xslt/docbook/html/db2html-css.xsl
+++ b/xslt/docbook/html/db2html-css.xsl
@@ -63,7 +63,7 @@ td.td-rowsep { border-bottom: solid 1px; }
<!-- == bibliography == -->
span.bibliolabel {
font-weight: bold;
- color: </xsl:text><xsl:value-of select="$color.text_light"/><xsl:text>;
+ color: </xsl:text><xsl:value-of select="$color.fg.dark"/><xsl:text>;
}
div.biblioentry span.title {
font-weight: normal;
@@ -78,11 +78,11 @@ div.epigraph {
text-align: </xsl:text><xsl:value-of select="$right"/><xsl:text>;
margin-</xsl:text><xsl:value-of select="$left"/><xsl:text>: 20%;
margin-</xsl:text><xsl:value-of select="$right"/><xsl:text>: 0;
- color: </xsl:text><xsl:value-of select="$color.text_light"/><xsl:text>;
+ color: </xsl:text><xsl:value-of select="$color.fg.dark"/><xsl:text>;
}
div.programlisting .userinput {
font-weight: bold;
- color: </xsl:text><xsl:value-of select="$color.text_light"/><xsl:text>;
+ color: </xsl:text><xsl:value-of select="$color.fg.dark"/><xsl:text>;
}
div.address, div.literallayout { white-space: pre; }
@@ -90,7 +90,7 @@ div.address, div.literallayout { white-space: pre; }
<!-- == footnotes == -->
div.footnotes {
border-top: solid 2px </xsl:text>
- <xsl:value-of select="$color.gray_border"/><xsl:text>;
+ <xsl:value-of select="$color.gray"/><xsl:text>;
}
div.footnote { margin-top: 1.44em; }
sup.footnote { font-size: 0.83em; }
@@ -99,23 +99,47 @@ a.footnote {
text-decoration: none;
border-bottom: none;
padding: 0.2em 0.5em 0.2em 0.5em;
- -moz-border-radius: 2px;
- -webkit-border-radius: 2px;
border-radius: 2px;
}
div.footnote > a.footnote {
margin-</xsl:text><xsl:value-of select="$right"/><xsl:text>: 0.83em;
- background-color: </xsl:text><xsl:value-of select="$color.gray_background"/><xsl:text>;
+ background-color: </xsl:text><xsl:value-of select="$color.bg.gray"/><xsl:text>;
}
div.footnote > a.footnote + p { display: inline-block; margin: 0; }
a.footnote:hover, div.footnote > a.footnote:hover {
- background-color: </xsl:text><xsl:value-of select="$color.blue_background"/><xsl:text>;
- -moz-box-shadow: 0 0 2px </xsl:text>
- <xsl:value-of select="$color.blue_border"/><xsl:text>;
- -webkit-box-shadow: 0 0 2px </xsl:text>
- <xsl:value-of select="$color.blue_border"/><xsl:text>;
+ background-color: </xsl:text><xsl:value-of select="$color.bg.blue"/><xsl:text>;
box-shadow: 0 0 2px </xsl:text>
- <xsl:value-of select="$color.blue_border"/><xsl:text>;
+ <xsl:value-of select="$color.blue"/><xsl:text>;
+}
+
+<!-- == indexes == -->
+dt.ixprimary {
+ font-weight: bold;
+ color: </xsl:text><xsl:value-of select="$color.fg.dark"/><xsl:text>;
+}
+dt.ixprimary * { font-style: normal; }
+dt.ixprimary + dt.ixprimary { margin-top: 1em; }
+dd.ixsecondary {
+ color: </xsl:text><xsl:value-of select="$color.fg.gray"/><xsl:text>;
+}
+dt.ixsecondary, dt.ixtertiary { margin-top: 0.2em; }
+dd.ixlink, dd.ixsee, dd.ixseealso {
+ color: </xsl:text><xsl:value-of select="$color.fg.gray"/><xsl:text>;
+}
+dd.ixlink + dd, dd.ixsee + dd, dd.ixseealso + dd {
+ margin-top: 0.2em;
+}
+dt.ixsecondary:before, dt.ixtertiary:before {
+ content: "⏺";
+ color: </xsl:text><xsl:value-of select="$color.fg.gray"/><xsl:text>;
+}
+dd.ixlink:before {
+ content: "⏺";
+ color: </xsl:text><xsl:value-of select="$color.blue"/><xsl:text>;
+}
+dd.ixsee:before, dd.ixseealso:before {
+ content: "⏺";
+ color: </xsl:text><xsl:value-of select="$color.gray"/><xsl:text>;
}
<!-- == unsorted == -->
@@ -130,17 +154,15 @@ div.simplelist table { margin-left: 0; border: none; }
div.simplelist td {
padding: 0.5em;
border-</xsl:text><xsl:value-of select="$left"/><xsl:text>: solid 1px </xsl:text>
- <xsl:value-of select="$color.gray_border"/><xsl:text>;
+ <xsl:value-of select="$color.gray"/><xsl:text>;
}
-<!--
-div.simplelist td.td-first {
+div.simplelist td:first-child {
padding-</xsl:text><xsl:value-of select="$left"/><xsl:text>: 0;
border-</xsl:text><xsl:value-of select="$left"/><xsl:text>: 0;
}
--->
span.accel { text-decoration: underline; }
-span.email { font-family: monospace; }
+span.email { font-family: monospace,monospace; font-size: 0.83em; }
span.firstterm { font-style: italic; }
span.foreignphrase { font-style: italic; }
@@ -157,7 +179,7 @@ span.lineannotation { font-style: italic; }
span.medialabel { font-style: italic; }
.methodparam span.parameter { font-style: italic; }
span.paramdef span.parameter { font-style: italic; }
-span.prompt { font-family: monospace; }
+span.prompt { font-family: monospace,monospace; font-size: 0.83em; }
span.wordasword { font-style: italic; }
<!-- FIXME below -->
@@ -165,6 +187,7 @@ dt.question {
margin-left: 0;
margin-right: 0;
font-weight: bold;
+ color: </xsl:text><xsl:value-of select="$color.fg.dark"/><xsl:text>;
}
dd + dt.question { margin-top: 1em; }
dd.answer {
@@ -173,22 +196,21 @@ dd.answer {
margin-right: 2em;
}
div.qanda-label {
- line-height: 1.72em;
+ line-height: 1.44em;
float: </xsl:text><xsl:value-of select="$left"/><xsl:text>;
margin-</xsl:text><xsl:value-of select="$right"/><xsl:text>: 1em;
font-weight: bold;
+ color: </xsl:text><xsl:value-of select="$color.fg.dark"/><xsl:text>;
}
dl.qandaset ol, dl.qandaset ul, dl.qandaset table { clear: both; }
div.synopfragment { padding-top: 0.5em; }
span.co {
- -moz-border-radius: 4px;
- -webkit-border-radius: 4px;
border-radius: 4px;
background-color: </xsl:text>
- <xsl:value-of select="$color.yellow_background"/><xsl:text>;
+ <xsl:value-of select="$color.bg.yellow"/><xsl:text>;
outline: solid 1px </xsl:text>
- <xsl:value-of select="$color.yellow_border"/><xsl:text>;
+ <xsl:value-of select="$color.yellow"/><xsl:text>;
}
span.co a { text-decoration: none; }
span.co a:hover { text-decoration: none; }
diff --git a/xslt/docbook/html/db2html-division.xsl b/xslt/docbook/html/db2html-division.xsl
index dab0fed0..7d2fefa7 100644
--- a/xslt/docbook/html/db2html-division.xsl
+++ b/xslt/docbook/html/db2html-division.xsl
@@ -120,28 +120,31 @@ REMARK: Talk about some of the parameters
<xsl:with-param name="node" select="$node"/>
</xsl:call-template>
</xsl:param>
- <!-- FIXME: these two parameters don't make much sense now -->
<xsl:param name="chunk_divisions"
select="($depth_in_chunk = 0) and
($depth_of_chunk &lt; $db.chunk.max_depth)"/>
<xsl:choose>
<xsl:when test="$depth_in_chunk != 0">
- <div>
+ <section>
+ <xsl:choose>
+ <xsl:when test="$node/@xml:id">
+ <xsl:attribute name="id">
+ <xsl:value-of select="$node/@xml:id"/>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:when test="$node/@id">
+ <xsl:attribute name="id">
+ <xsl:value-of select="$node/@id"/>
+ </xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
<xsl:call-template name="html.lang.attrs">
<xsl:with-param name="node" select="$node"/>
</xsl:call-template>
<xsl:call-template name="html.class.attr">
<xsl:with-param name="node" select="$node"/>
- <xsl:with-param name="class">
- <xsl:value-of select="local-name($node)"/>
- <xsl:text> sect</xsl:text>
- </xsl:with-param>
+ <xsl:with-param name="class" select="local-name($node)"/>
</xsl:call-template>
- <xsl:if test="$node/@id">
- <xsl:attribute name="id">
- <xsl:value-of select="$node/@id"/>
- </xsl:attribute>
- </xsl:if>
<div class="inner">
<xsl:call-template name="_db2html.division.div.inner">
<xsl:with-param name="node" select="$node"/>
@@ -153,7 +156,7 @@ REMARK: Talk about some of the parameters
<xsl:with-param name="chunk_divisions" select="$chunk_divisions"/>
</xsl:call-template>
</div>
- </div>
+ </section>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="_db2html.division.div.inner">
@@ -184,7 +187,10 @@ REMARK: Talk about some of the parameters
<xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
</xsl:call-template>
<div class="region">
- <div class="contents">
+ <div class="contents pagewide">
+ <xsl:call-template name="html.content.pre">
+ <xsl:with-param name="page" select="$depth_in_chunk = 0"/>
+ </xsl:call-template>
<xsl:apply-templates mode="db2html.division.div.content.mode" select="$node">
<xsl:with-param name="info" select="$info"/>
<xsl:with-param name="entries" select="$entries"/>
@@ -192,14 +198,17 @@ REMARK: Talk about some of the parameters
<xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
<xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
</xsl:apply-templates>
- </div>
- <xsl:if test="$depth_in_chunk = 0 and
- not($node/processing-instruction('db2html.no_sectionlinks'))">
- <xsl:call-template name="db2html.links.section">
- <xsl:with-param name="node" select="$node"/>
- <xsl:with-param name="divisions" select="$divisions"/>
+ <xsl:if test="$depth_in_chunk = 0 and
+ not($node/processing-instruction('db2html.no_sectionlinks'))">
+ <xsl:call-template name="db2html.links.section">
+ <xsl:with-param name="node" select="$node"/>
+ <xsl:with-param name="divisions" select="$divisions"/>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:call-template name="html.content.post">
+ <xsl:with-param name="page" select="$depth_in_chunk = 0"/>
</xsl:call-template>
- </xsl:if>
+ </div>
<xsl:for-each select="$divisions">
<xsl:if test="not($chunk_divisions) or not(self::&db_chunks;)">
<xsl:apply-templates select=".">
@@ -300,7 +309,7 @@ REMARK: Talk about the different kinds of title blocks
</xsl:choose>
</xsl:variable>
- <div class="hgroup">
+ <div class="hgroup pagewide">
<xsl:element name="{$title_h}" namespace="{$html.namespace}">
<xsl:attribute name="class">
<xsl:text>title</xsl:text>
@@ -345,13 +354,7 @@ the division. By default it is called by the %{html.footer.mode} implementation.
-->
<xsl:template name="db2html.division.about">
<xsl:param name="node" select="."/>
- <xsl:param name="info" select="
- $node/appendixinfo | $node/articleinfo | $node/bibliographyinfo | $node/bookinfo |
- $node/chapterinfo | $node/glossaryinfo | $node/indexinfo | $node/partinfo |
- $node/prefaceinfo | $node/refentryinfo | $node/referenceinfo | $node/refsect1info |
- $node/refsect2info | $node/refsect3info | $node/refsectioninfo | $node/sect1info |
- $node/sect2info | $node/sect3info | $node/sect4info | $node/sect5info |
- $node/sectioninfo | $node/setindexinfo | $node/db:info "/>
+ <xsl:param name="info" select="$node/ancestor-or-self::*/&db_infos;"/>
<xsl:variable name="copyrights" select="$info/copyright | $info/db:copyright"/>
<xsl:variable name="authors" select="
$info/author | $info/authorgroup/author |
@@ -375,8 +378,9 @@ the division. By default it is called by the %{html.footer.mode} implementation.
$info/db:othercredit | $info/db:authorgroup/db:othercredit,
($authors | $editors | $translators))"/>
<xsl:variable name="legal" select="$info/legalnotice | $info/db:legalnotice"/>
- <xsl:if test="$copyrights or $authors or $editors or $translators or $publishers or $othercredits or $legal">
- <div class="sect about ui-expander" role="contentinfo">
+ <xsl:if test="$copyrights or $authors or $editors or $translators or
+ $publishers or $othercredits or $legal">
+ <footer class="about ui-expander" role="contentinfo">
<div class="yelp-data yelp-data-ui-expander" data-yelp-expanded="false"/>
<div class="inner">
<div class="hgroup">
@@ -399,98 +403,37 @@ the division. By default it is called by the %{html.footer.mode} implementation.
</xsl:for-each>
</div>
</xsl:if>
- <xsl:if test="$authors">
- <div class="aboutblurb authors">
- <div class="title">
- <span class="title">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'Written By'"/>
- </xsl:call-template>
- </span>
- </div>
- <ul class="credits">
- <xsl:for-each select="$authors">
- <li>
- <xsl:apply-templates select="."/>
- </li>
- </xsl:for-each>
- </ul>
- </div>
- </xsl:if>
- <xsl:if test="$editors">
- <div class="aboutblurb editors">
- <div class="title">
- <span class="title">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'Edited By'"/>
- </xsl:call-template>
- </span>
- </div>
- <ul class="credits">
- <xsl:for-each select="$editors">
- <li>
- <xsl:apply-templates select="."/>
- </li>
- </xsl:for-each>
- </ul>
- </div>
- </xsl:if>
- <xsl:if test="$translators">
- <div class="aboutblurb translators">
- <div class="title">
- <span class="title">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'Translated By'"/>
- </xsl:call-template>
- </span>
- </div>
- <ul class="credits">
- <xsl:for-each select="$translators">
- <li>
- <xsl:apply-templates select="."/>
- </li>
- </xsl:for-each>
- </ul>
- </div>
- </xsl:if>
- <xsl:if test="$publishers">
- <div class="aboutblurb publishers">
- <div class="title">
- <span class="title">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'Published By'"/>
- </xsl:call-template>
- </span>
- </div>
- <ul class="credits">
- <xsl:for-each select="$publishers">
- <li>
- <xsl:apply-templates select="."/>
- </li>
- </xsl:for-each>
- </ul>
- </div>
- </xsl:if>
- <xsl:if test="$othercredits">
- <div class="aboutblurb othercredits">
- <div class="title">
- <span class="title">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'Other Credits'"/>
- </xsl:call-template>
- </span>
- </div>
- <ul class="credits">
- <xsl:for-each select="$othercredits">
- <li>
- <xsl:apply-templates select="."/>
- </li>
- </xsl:for-each>
- </ul>
+ <xsl:if test="$authors or $editors or $translators or $publishers or $othercredits">
+ <div class="credits">
+ <xsl:call-template name="_db2html.division.about.credits">
+ <xsl:with-param name="class" select="'credits-authors'"/>
+ <xsl:with-param name="title" select="'Written By'"/>
+ <xsl:with-param name="credits" select="$authors"/>
+ </xsl:call-template>
+ <xsl:call-template name="_db2html.division.about.credits">
+ <xsl:with-param name="class" select="'credits-editors'"/>
+ <xsl:with-param name="title" select="'Edited By'"/>
+ <xsl:with-param name="credits" select="$editors"/>
+ </xsl:call-template>
+ <xsl:call-template name="_db2html.division.about.credits">
+ <xsl:with-param name="class" select="'credits-translators'"/>
+ <xsl:with-param name="title" select="'Translated By'"/>
+ <xsl:with-param name="credits" select="$translators"/>
+ </xsl:call-template>
+ <xsl:call-template name="_db2html.division.about.credits">
+ <xsl:with-param name="class" select="'credits-publishers'"/>
+ <xsl:with-param name="title" select="'Published By'"/>
+ <xsl:with-param name="credits" select="$publishers"/>
+ </xsl:call-template>
+ <xsl:call-template name="_db2html.division.about.credits">
+ <xsl:with-param name="class" select="'credits-others'"/>
+ <xsl:with-param name="title" select="'Other Credits'"/>
+ <xsl:with-param name="credits" select="$othercredits"/>
+ </xsl:call-template>
</div>
</xsl:if>
<xsl:for-each select="$legal">
- <div class="aboutblurb license">
+ <div class="license">
<div class="title">
<span class="title">
<xsl:choose>
@@ -514,11 +457,37 @@ the division. By default it is called by the %{html.footer.mode} implementation.
</div>
</div>
</div>
+ </footer>
+ </xsl:if>
+</xsl:template>
+
+<!--#* _db2html.division.about.credits -->
+<xsl:template name="_db2html.division.about.credits">
+ <xsl:param name="class"/>
+ <xsl:param name="title"/>
+ <xsl:param name="credits"/>
+ <xsl:if test="$credits">
+ <div class="{$class}">
+ <div class="title">
+ <span class="title">
+ <xsl:call-template name="l10n.gettext">
+ <xsl:with-param name="msgid" select="$title"/>
+ </xsl:call-template>
+ </span>
+ </div>
+ <ul class="credits">
+ <xsl:for-each select="$credits">
+ <li>
+ <xsl:apply-templates select="."/>
+ </li>
+ </xsl:for-each>
+ </ul>
</div>
</xsl:if>
</xsl:template>
+
<!-- == Matched Templates == -->
<!-- = appendix = -->
diff --git a/xslt/docbook/html/db2html-index.xsl b/xslt/docbook/html/db2html-index.xsl
index 48d3330f..fa3f6f97 100644
--- a/xslt/docbook/html/db2html-index.xsl
+++ b/xslt/docbook/html/db2html-index.xsl
@@ -13,6 +13,28 @@ details.
You should have received a copy of the GNU Lesser General Public License
along with this program; see the file COPYING.LGPL. If not, see <http://www.gnu.org/licenses/>.
-->
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY % selectors SYSTEM "../common/db-selectors.mod">
+%selectors;
+<!ENTITY primarykey "normalize-space(concat(
+ primary/@sortas | db:primary/@sortas, ' ',
+ primary | db:primary))">
+<!ENTITY secondarykey "normalize-space(concat(
+ primary/@sortas | db:primary/@sortas, ' ',
+ primary | db:primary, ' ',
+ secondary/@sortas | db:secondary/@sortas, ' ',
+ secondary | db:secondary))">
+<!ENTITY tertiarykey "normalize-space(concat(
+ primary/@sortas | db:primary/@sortas, ' ',
+ primary | db:primary, ' ',
+ secondary/@sortas | db:secondary/@sortas, ' ',
+ secondary | db:secondary, ' ',
+ tertiary/@sortas | db:tertiary/@sortas, ' ',
+ tertiary | db:tertiary))">
+<!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'">
+<!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'">
+]>
+<!-- FIXME: upper/lower for langs? -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:db="http://docbook.org/ns/docbook"
@@ -36,6 +58,22 @@ seealsoie
indexterm (autoidx)
-->
+<xsl:key name="db.index.all.key"
+ match="indexterm | db:indexterm"
+ use="''"/>
+
+<xsl:key name="db.index.primary.key"
+ match="indexterm | db:indexterm"
+ use="&primarykey;"/>
+
+<xsl:key name="db.index.secondary.key"
+ match="indexterm[secondary] | db:indexterm[db:secondary]"
+ use="&secondarykey;"/>
+
+<xsl:key name="db.index.tertiary.key"
+ match="indexterm[tertiary] | db:indexterm[db:tertiary]"
+ use="&tertiarykey;"/>
+
<!-- == Matched Templates == -->
<!-- = suppress = -->
@@ -47,7 +85,7 @@ indexterm (autoidx)
<xsl:template match="indexentry | db:indexentry">
<xsl:variable name="if"><xsl:call-template name="db.profile.test"/></xsl:variable>
<xsl:if test="$if != ''">
- <dt class="primaryie">
+ <dt class="ixprimary">
<xsl:apply-templates select="primaryie/node() | db:primaryie/node()"/>
</dt>
<xsl:variable name="pri_see"
@@ -57,7 +95,7 @@ indexterm (autoidx)
select="seealsoie[not(preceding-sibling::secondaryie)] |
db:seealsoie[not(preceding-sibling::db:secondaryie)]"/>
<xsl:if test="$pri_see">
- <dd class="see">
+ <dd class="ixsee">
<xsl:call-template name="l10n.gettext">
<xsl:with-param name="msgid" select="'seeie.format'"/>
<xsl:with-param name="node" select="$pri_see"/>
@@ -66,7 +104,7 @@ indexterm (autoidx)
</dd>
</xsl:if>
<xsl:if test="$pri_seealso">
- <dd class="seealso">
+ <dd class="ixseealso">
<xsl:call-template name="l10n.gettext">
<xsl:with-param name="msgid" select="'seealsoie.format'"/>
<xsl:with-param name="node" select="$pri_seealso"/>
@@ -75,9 +113,9 @@ indexterm (autoidx)
</dd>
</xsl:if>
<xsl:for-each select="secondaryie | db:secondaryie">
- <dd class="secondary">
- <dl class="secondary">
- <dt class="secondaryie">
+ <dd class="ixsecondary">
+ <dl class="ixsecondary">
+ <dt class="ixsecondary">
<xsl:apply-templates/>
</dt>
<xsl:variable name="sec_see"
@@ -96,7 +134,7 @@ indexterm (autoidx)
following-sibling::db:tertiaryie
[set:has-same-node(preceding-sibling::db:secondaryie[1], current())]"/>
<xsl:if test="$sec_see">
- <dd class="see">
+ <dd class="ixsee">
<xsl:call-template name="l10n.gettext">
<xsl:with-param name="msgid" select="'seeie.format'"/>
<xsl:with-param name="node" select="$sec_see"/>
@@ -105,7 +143,7 @@ indexterm (autoidx)
</dd>
</xsl:if>
<xsl:if test="$sec_seealso">
- <dd class="seealso">
+ <dd class="ixseealso">
<xsl:call-template name="l10n.gettext">
<xsl:with-param name="msgid" select="'seealsoie.format'"/>
<xsl:with-param name="node" select="$sec_seealso"/>
@@ -216,4 +254,175 @@ indexterm (autoidx)
</xsl:for-each>
</xsl:template>
+<!-- = index % db2html.division.div.content.mode = -->
+<!-- Auto-generated indexes -->
+<xsl:template mode="db2html.division.div.content.mode"
+ match="index[count(indexentry | indexdiv) = 0] |
+ db:index[count(db:indexentry | db:indexdiv) = 0]">
+ <xsl:param name="node" select="."/>
+ <xsl:param name="info" select="indexinfo | db:info"/>
+ <xsl:param name="depth_in_chunk">
+ <xsl:call-template name="db.chunk.depth-in-chunk">
+ <xsl:with-param name="node" select="$node"/>
+ </xsl:call-template>
+ </xsl:param>
+ <xsl:param name="depth_of_chunk">
+ <xsl:call-template name="db.chunk.depth-of-chunk">
+ <xsl:with-param name="node" select="$node"/>
+ </xsl:call-template>
+ </xsl:param>
+ <xsl:variable name="nots" select="title | db:title | titleabbrev | db:titleabbrev | subtitle | db:subtitle"/>
+ <xsl:apply-templates select="set:difference(*, $nots)">
+ <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk + 1"/>
+ <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
+ </xsl:apply-templates>
+
+ <xsl:variable name="allterms" select="key('db.index.all.key', '')"/>
+ <xsl:variable name="prifirstterms"
+ select="$allterms[count(. | key('db.index.primary.key', &primarykey;)[1]) = 1]"/>
+ <dl>
+ <xsl:for-each select="$prifirstterms">
+ <xsl:sort select="translate(&primarykey;, &uppercase;, &lowercase;)"/>
+ <xsl:variable name="term" select="."/>
+ <xsl:if test="true()">
+ <dt class="ixprimary">
+ <xsl:apply-templates select="primary/node() | db:primary/node()"/>
+ </dt>
+ <xsl:variable name="prikey" select="&primarykey;"/>
+ <xsl:variable name="priterms" select="key('db.index.primary.key', $prikey)"/>
+ <xsl:variable name="prilinks"
+ select="$priterms[not(secondary | db:secondary | see | db:see)]"/>
+ <xsl:for-each select="$prilinks">
+ <dd class="ixlink">
+ <xsl:call-template name="db2html.xref">
+ <xsl:with-param name="target" select="."/>
+ </xsl:call-template>
+ </dd>
+ </xsl:for-each>
+ <xsl:variable name="prisee"
+ select="$priterms[not(secondary)]/see | $priterms[not(db:secondary)]/db:see"/>
+ <xsl:for-each select="$prisee">
+ <dd class="ixsee">
+ <xsl:call-template name="l10n.gettext">
+ <xsl:with-param name="msgid" select="'seeie.format'"/>
+ <xsl:with-param name="node" select="."/>
+ <xsl:with-param name="format" select="true()"/>
+ </xsl:call-template>
+ </dd>
+ </xsl:for-each>
+ <xsl:variable name="priseealso"
+ select="$priterms[not(secondary)]/seealso | $priterms[not(db:secondary)]/db:seealso"/>
+ <xsl:for-each select="$priseealso">
+ <dd class="ixseealso">
+ <xsl:call-template name="l10n.gettext">
+ <xsl:with-param name="msgid" select="'seealsoie.format'"/>
+ <xsl:with-param name="node" select="."/>
+ <xsl:with-param name="format" select="true()"/>
+ </xsl:call-template>
+ </dd>
+ </xsl:for-each>
+ <xsl:if test="$priterms/secondary or $priterms/db:secondary">
+ <dd class="ixsecondary">
+ <dl class="ixsecondary">
+ <xsl:variable name="secfirstterms"
+ select="$priterms[count(. | key('db.index.secondary.key',
+ &secondarykey;)[1]) = 1]"/>
+ <xsl:for-each select="$secfirstterms">
+ <xsl:sort select="translate(&secondarykey;, &uppercase;, &lowercase;)"/>
+ <xsl:if test="secondary | db:secondary">
+ <dt class="ixsecondary">
+ <xsl:value-of select="secondary | db:secondary"/>
+ </dt>
+ <xsl:variable name="seckey" select="&secondarykey;"/>
+ <xsl:variable name="secterms" select="key('db.index.secondary.key', $seckey)"/>
+ <xsl:variable name="seclinks"
+ select="$secterms[not(tertiary | db:tertiary | see | db:see)]"/>
+ <xsl:for-each select="$seclinks">
+ <dd class="ixlink">
+ <xsl:call-template name="db2html.xref">
+ <xsl:with-param name="target" select="."/>
+ </xsl:call-template>
+ </dd>
+ </xsl:for-each>
+ <xsl:variable name="secsee"
+ select="$secterms[not(tertiary)]/see | $secterms[not(db:tertiary)]/db:see"/>
+ <xsl:for-each select="$secsee">
+ <dd class="ixsee">
+ <xsl:call-template name="l10n.gettext">
+ <xsl:with-param name="msgid" select="'seeie.format'"/>
+ <xsl:with-param name="node" select="."/>
+ <xsl:with-param name="format" select="true()"/>
+ </xsl:call-template>
+ </dd>
+ </xsl:for-each>
+ <xsl:variable name="secseealso"
+ select="$secterms[not(tertiary)]/seealso | $secterms[not(db:tertiary)]/db:seealso"/>
+ <xsl:for-each select="$secseealso">
+ <dd class="ixseealso">
+ <xsl:call-template name="l10n.gettext">
+ <xsl:with-param name="msgid" select="'seealsoie.format'"/>
+ <xsl:with-param name="node" select="."/>
+ <xsl:with-param name="format" select="true()"/>
+ </xsl:call-template>
+ </dd>
+ </xsl:for-each>
+ <xsl:if test="$secterms/tertiary or $secterms/db:tertiary">
+ <dd class="ixtertiary">
+ <dl class="ixtertiary">
+ <xsl:variable name="terfirstterms"
+ select="$secterms[count(. | key('db.index.tertiary.key',
+ &tertiarykey;)[1]) = 1]"/>
+ <xsl:for-each select="$terfirstterms">
+ <xsl:sort select="translate(&tertiarykey;, &uppercase;, &lowercase;)"/>
+ <xsl:if test="tertiary | db:tertiary">
+ <dt class="ixtertiary">
+ <xsl:value-of select="tertiary | db:tertiary"/>
+ </dt>
+ <xsl:variable name="terkey" select="&tertiarykey;"/>
+ <xsl:variable name="terterms" select="key('db.index.tertiary.key', $terkey)"/>
+ <xsl:variable name="terlinks" select="$terterms[not(see | db:see)]"/>
+ <xsl:for-each select="$terlinks">
+ <dd class="ixlink">
+ <xsl:call-template name="db2html.xref">
+ <xsl:with-param name="target" select="."/>
+ </xsl:call-template>
+ </dd>
+ </xsl:for-each>
+ <xsl:variable name="tersee"
+ select="$terterms/see | $terterms/db:see"/>
+ <xsl:for-each select="$tersee">
+ <dd class="ixsee">
+ <xsl:call-template name="l10n.gettext">
+ <xsl:with-param name="msgid" select="'seeie.format'"/>
+ <xsl:with-param name="node" select="."/>
+ <xsl:with-param name="format" select="true()"/>
+ </xsl:call-template>
+ </dd>
+ </xsl:for-each>
+ <xsl:variable name="terseealso"
+ select="$terterms/seealso | $terterms/db:seealso"/>
+ <xsl:for-each select="$terseealso">
+ <dd class="ixseealso">
+ <xsl:call-template name="l10n.gettext">
+ <xsl:with-param name="msgid" select="'seealsoie.format'"/>
+ <xsl:with-param name="node" select="."/>
+ <xsl:with-param name="format" select="true()"/>
+ </xsl:call-template>
+ </dd>
+ </xsl:for-each>
+ </xsl:if>
+ </xsl:for-each>
+ </dl>
+ </dd>
+ </xsl:if>
+ </xsl:if>
+ </xsl:for-each>
+ </dl>
+ </dd>
+ </xsl:if>
+ </xsl:if>
+ </xsl:for-each>
+ </dl>
+</xsl:template>
+
</xsl:stylesheet>
diff --git a/xslt/docbook/html/db2html-links.xsl b/xslt/docbook/html/db2html-links.xsl
index af0ebcf3..3e0e741f 100644
--- a/xslt/docbook/html/db2html-links.xsl
+++ b/xslt/docbook/html/db2html-links.xsl
@@ -135,9 +135,9 @@ and "Next", although the actual page titles are used for tooltips.
</xsl:variable>
<xsl:variable name="prev_node" select="key('db.id.key', $prev_id)"/>
<xsl:variable name="next_node" select="key('db.id.key', $next_id)"/>
- <div class="links nextlinks">
+ <nav class="prevnext pagewide"><div class="inner">
<xsl:if test="$prev_id != ''">
- <a class="nextlinks-prev">
+ <a>
<xsl:attribute name="href">
<xsl:call-template name="db.xref.target">
<xsl:with-param name="linkend" select="$prev_id"/>
@@ -156,8 +156,9 @@ and "Next", although the actual page titles are used for tooltips.
</xsl:call-template>
</a>
</xsl:if>
- <xsl:if test="$next_id != ''">
- <a class="nextlinks-next">
+ <xsl:choose>
+ <xsl:when test="$next_id != ''">
+ <a>
<xsl:attribute name="href">
<xsl:call-template name="db.xref.target">
<xsl:with-param name="linkend" select="$next_id"/>
@@ -174,8 +175,16 @@ and "Next", although the actual page titles are used for tooltips.
<xsl:with-param name="msgid" select="'Next'"/>
</xsl:call-template>
</a>
- </xsl:if>
- </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <span>
+ <xsl:call-template name="l10n.gettext">
+ <xsl:with-param name="msgid" select="'Next'"/>
+ </xsl:call-template>
+ </span>
+ </xsl:otherwise>
+ </xsl:choose>
+ </div></nav>
</xsl:template>
diff --git a/xslt/docbook/html/db2html-list.xsl b/xslt/docbook/html/db2html-list.xsl
index 5f3018e3..8c5c1898 100644
--- a/xslt/docbook/html/db2html-list.xsl
+++ b/xslt/docbook/html/db2html-list.xsl
@@ -18,15 +18,18 @@ along with this program; see the file COPYING.LGPL. If not, see <http://www.gnu
xmlns:db="http://docbook.org/ns/docbook"
xmlns:msg="http://projects.gnome.org/yelp/gettext/"
xmlns:str="http://exslt.org/strings"
+ xmlns:set="http://exslt.org/sets"
xmlns="http://www.w3.org/1999/xhtml"
- exclude-result-prefixes="db msg str"
+ exclude-result-prefixes="db msg str set"
version="1.0">
+
<!--!!==========================================================================
DocBook to HTML - Lists
-:Requires: db-common db2html-inline db2html-xref l10n html
+:Revision:version="3.next" date="2016-10-27" status="review"
-REMARK: Describe this module
+This stylesheet handles most list-like elements in DocBook, turning them into
+appropriate HTML tags.
-->
@@ -37,12 +40,14 @@ REMARK: Describe this module
<xsl:variable name="if"><xsl:call-template name="db.profile.test"/></xsl:variable>
<xsl:if test="$if != ''">
<div>
+ <xsl:variable name="title" select="title | blockinfo/title |
+ db:title | db:info/db:title"/>
<xsl:call-template name="html.class.attr">
<xsl:with-param name="class" select="'list glosslist'"/>
</xsl:call-template>
<xsl:call-template name="html.lang.attrs"/>
<xsl:call-template name="db2html.anchor"/>
- <xsl:apply-templates select="title | db:title | db:info/db:title"/>
+ <xsl:apply-templates select="$title[1]"/>
<dl class="glosslist">
<xsl:apply-templates select="glossentry | db:glossentry"/>
</dl>
@@ -152,14 +157,19 @@ REMARK: Describe this module
<xsl:variable name="if"><xsl:call-template name="db.profile.test"/></xsl:variable>
<xsl:if test="$if != ''">
<div>
+ <xsl:variable name="title" select="title | blockinfo/title |
+ db:title | db:info/db:title"/>
+ <xsl:variable name="items" select="listitem | db:listitem"/>
<xsl:call-template name="html.class.attr">
<xsl:with-param name="class" select="'list itemizedlist'"/>
</xsl:call-template>
<xsl:call-template name="html.lang.attrs"/>
<xsl:call-template name="db2html.anchor"/>
- <xsl:apply-templates select="db:info/db:title"/>
- <xsl:apply-templates select="*[not(self::listitem) and not(self::db:listitem)]"/>
- <ul>
+ <div class="inner">
+ <xsl:apply-templates select="$title[1]"/>
+ <div class="region"><div class="contents">
+ <xsl:apply-templates select="*[not(set:has-same-node(., $title | $items))]"/>
+ <ul>
<xsl:attribute name="class">
<xsl:text>list itemizedlist</xsl:text>
<xsl:if test="@spacing = 'compact'">
@@ -176,8 +186,10 @@ REMARK: Describe this module
</xsl:choose>
</xsl:attribute>
</xsl:if>
- <xsl:apply-templates select="listitem | db:listitem"/>
- </ul>
+ <xsl:apply-templates select="$items"/>
+ </ul>
+ </div></div>
+ </div>
</div>
</xsl:if>
</xsl:template>
@@ -227,14 +239,19 @@ REMARK: Describe this module
</xsl:variable>
<!-- FIXME: auto-numeration for nested lists -->
<div>
+ <xsl:variable name="title" select="title | blockinfo/title |
+ db:title | db:info/db:title"/>
+ <xsl:variable name="items" select="listitem | db:listitem"/>
<xsl:call-template name="html.class.attr">
<xsl:with-param name="class" select="'list orderedlist'"/>
</xsl:call-template>
<xsl:call-template name="html.lang.attrs"/>
<xsl:call-template name="db2html.anchor"/>
- <xsl:apply-templates select="db:info/db:title"/>
- <xsl:apply-templates select="*[not(self::listitem) and not(self::db:listitem)]"/>
- <ol>
+ <div class="inner">
+ <xsl:apply-templates select="$title[1]"/>
+ <div class="region"><div class="contents">
+ <xsl:apply-templates select="*[not(set:has-same-node(., $title | $items))]"/>
+ <ol>
<xsl:attribute name="class">
<xsl:text>list orderedlist</xsl:text>
<xsl:if test="@spacing = 'compact'">
@@ -260,7 +277,9 @@ REMARK: Describe this module
</xsl:if>
<!-- FIXME: @inheritnum -->
<xsl:apply-templates select="listitem | db:listitem"/>
- </ol>
+ </ol>
+ </div></div>
+ </div>
</div>
</xsl:if>
</xsl:template>
@@ -290,27 +309,33 @@ REMARK: Describe this module
<xsl:variable name="if"><xsl:call-template name="db.profile.test"/></xsl:variable>
<xsl:if test="$if != ''">
<div>
+ <xsl:variable name="title" select="title | blockinfo/title |
+ db:title | db:info/db:title"/>
+ <xsl:variable name="steps" select="step | db:step"/>
+ <xsl:variable name="result" select="db:result"/>
<xsl:call-template name="html.class.attr">
<xsl:with-param name="class" select="'steps'"/>
</xsl:call-template>
<xsl:call-template name="html.lang.attrs"/>
<xsl:call-template name="db2html.anchor"/>
<div class="inner">
- <xsl:apply-templates select="db:info/db:title"/>
- <xsl:apply-templates select="*[not(self::step) and not(self::db:step)]"/>
+ <xsl:apply-templates select="$title[1]"/>
+ <div class="region"><div class="contents">
+ <xsl:apply-templates select="*[not(set:has-same-node(., $title | $steps | $result))]"/>
<xsl:choose>
- <xsl:when test="(count(step) + count(db:step)) = 1">
+ <xsl:when test="count($steps) = 1">
<ul class="steps">
- <xsl:apply-templates select="step | db:step"/>
+ <xsl:apply-templates select="$steps"/>
</ul>
</xsl:when>
<xsl:otherwise>
<ol class="steps">
- <xsl:apply-templates select="step | db:step"/>
+ <xsl:apply-templates select="$steps"/>
</ol>
</xsl:otherwise>
</xsl:choose>
- </div>
+ <xsl:apply-templates select="$result"/>
+ </div></div></div>
</div>
</xsl:if>
</xsl:template>
@@ -550,6 +575,21 @@ REMARK: Describe this module
</xsl:if>
</xsl:template>
+<!-- = result = -->
+<xsl:template match="result | db:result">
+ <xsl:variable name="if"><xsl:call-template name="db.profile.test"/></xsl:variable>
+ <xsl:if test="$if != ''">
+ <div>
+ <xsl:call-template name="html.class.attr">
+ <xsl:with-param name="class" select="'result'"/>
+ </xsl:call-template>
+ <xsl:call-template name="html.lang.attrs"/>
+ <xsl:call-template name="db2html.anchor"/>
+ <xsl:apply-templates/>
+ </div>
+ </xsl:if>
+</xsl:template>
+
<!-- FIXME: Do something with @performance -->
<!-- = step = -->
<xsl:template match="step | db:step">
@@ -566,6 +606,24 @@ REMARK: Describe this module
</xsl:template>
<!-- FIXME: Do something with @performance -->
+<!-- = stepalternatives = -->
+<xsl:template match="stepalternatives | db:stepalternatives">
+ <xsl:variable name="if"><xsl:call-template name="db.profile.test"/></xsl:variable>
+ <xsl:if test="$if != ''">
+ <div>
+ <xsl:call-template name="html.class.attr">
+ <xsl:with-param name="class" select="'steps stepalternatives'"/>
+ </xsl:call-template>
+ <xsl:call-template name="html.lang.attrs"/>
+ <xsl:call-template name="db2html.anchor"/>
+ <ul class="steps stepalternatives">
+ <xsl:apply-templates/>
+ </ul>
+ </div>
+ </xsl:if>
+</xsl:template>
+
+<!-- FIXME: Do something with @performance -->
<!-- = substeps = -->
<xsl:template match="substeps | db:substeps">
<xsl:variable name="if"><xsl:call-template name="db.profile.test"/></xsl:variable>
@@ -617,17 +675,23 @@ REMARK: Describe this module
<xsl:variable name="if"><xsl:call-template name="db.profile.test"/></xsl:variable>
<xsl:if test="$if != ''">
<div>
+ <xsl:variable name="title" select="title | blockinfo/title |
+ db:title | db:info/db:title"/>
+ <xsl:variable name="items" select="varlistentry | db:varlistentry"/>
<xsl:call-template name="html.class.attr">
<xsl:with-param name="class" select="'terms variablelist'"/>
</xsl:call-template>
<xsl:call-template name="html.lang.attrs"/>
<xsl:call-template name="db2html.anchor"/>
- <xsl:apply-templates select="db:info/db:title"/>
- <xsl:apply-templates select="*[not(self::varlistentry) and
- not(self::db:varlistentry)]"/>
- <dl class="terms variablelist">
- <xsl:apply-templates select="varlistentry |db:varlistentry"/>
- </dl>
+ <div class="inner">
+ <xsl:apply-templates select="$title[1]"/>
+ <div class="region"><div class="contents">
+ <xsl:apply-templates select="*[not(set:has-same-node(., $title | $items))]"/>
+ <dl class="terms variablelist">
+ <xsl:apply-templates select="$items"/>
+ </dl>
+ </div></div>
+ </div>
</div>
</xsl:if>
</xsl:template>
diff --git a/xslt/docbook/html/db2html-media.xsl b/xslt/docbook/html/db2html-media.xsl
index 6af7f14f..be2f7349 100644
--- a/xslt/docbook/html/db2html-media.xsl
+++ b/xslt/docbook/html/db2html-media.xsl
@@ -50,7 +50,7 @@ calls *{db2html.mediaobject.fallback} for the contents of the #{audio} element.
$node/ancestor::db:mediaobject[1] |
$node/ancestor::db:inlinemediaobject[1]
)[last()]"/>
- <audio preload="auto" controls="controls">
+ <audio preload="auto">
<xsl:attribute name="src">
<xsl:choose>
<xsl:when test="$node/@fileref">
@@ -61,20 +61,13 @@ calls *{db2html.mediaobject.fallback} for the contents of the #{audio} element.
</xsl:when>
</xsl:choose>
</xsl:attribute>
- <xsl:attribute name="data-play-label">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'Play'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="data-pause-label">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'Pause'"/>
- </xsl:call-template>
- </xsl:attribute>
<xsl:call-template name="db2html.mediaobject.fallback">
<xsl:with-param name="node" select="$media"/>
</xsl:call-template>
</audio>
+ <xsl:call-template name="html.media.controls">
+ <xsl:with-param name="type" select="'audio'"/>
+ </xsl:call-template>
</xsl:template>
@@ -160,7 +153,7 @@ attribute on the HTML #{video} element. This template calls
$node/ancestor::db:mediaobject[1] |
$node/ancestor::db:inlinemediaobject[1]
)[last()]"/>
- <video preload="auto" controls="controls">
+ <video preload="auto">
<xsl:attribute name="src">
<xsl:choose>
<xsl:when test="$node/@fileref">
@@ -196,20 +189,13 @@ attribute on the HTML #{video} element. This template calls
</xsl:choose>
</xsl:attribute>
</xsl:if>
- <xsl:attribute name="data-play-label">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'Play'"/>
- </xsl:call-template>
- </xsl:attribute>
- <xsl:attribute name="data-pause-label">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'Pause'"/>
- </xsl:call-template>
- </xsl:attribute>
<xsl:call-template name="db2html.mediaobject.fallback">
<xsl:with-param name="node" select="$media"/>
</xsl:call-template>
</video>
+ <xsl:call-template name="html.media.controls">
+ <xsl:with-param name="type" select="'video'"/>
+ </xsl:call-template>
</xsl:template>
@@ -372,7 +358,14 @@ elements.
<xsl:apply-templates select="mml:math"/>
</xsl:when>
<xsl:otherwise>
- <xsl:call-template name="db2html.imagedata"/>
+ <div>
+ <xsl:call-template name="html.class.attr">
+ <xsl:with-param name="class" select="'media media-image'"/>
+ </xsl:call-template>
+ <div class="inner">
+ <xsl:call-template name="db2html.imagedata"/>
+ </div>
+ </div>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
diff --git a/xslt/docbook/html/db2html.xsl b/xslt/docbook/html/db2html.xsl
index 96bd4c16..d95ef9b5 100644
--- a/xslt/docbook/html/db2html.xsl
+++ b/xslt/docbook/html/db2html.xsl
@@ -17,7 +17,8 @@ along with this program; see the file COPYING.LGPL. If not, see <http://www.gnu
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
- exclude-result-prefixes="html mml"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ exclude-result-prefixes="html mml svg"
version="1.0">
<!--!!==========================================================================
@@ -38,5 +39,6 @@ sets a namespace alias to output non-XML HTML. This stylesheet sets
<xsl:namespace-alias stylesheet-prefix="html" result-prefix="#default"/>
<xsl:namespace-alias stylesheet-prefix="mml" result-prefix="#default"/>
+<xsl:namespace-alias stylesheet-prefix="svg" result-prefix="#default"/>
</xsl:stylesheet>