summaryrefslogtreecommitdiff
path: root/xslt/docbook
diff options
context:
space:
mode:
authorShaun McCance <shaunm@src.gnome.org>2007-07-02 15:01:56 +0000
committerShaun McCance <shaunm@src.gnome.org>2007-07-02 15:01:56 +0000
commit689d61b7bd82ab0a674e2088155557381d744e24 (patch)
treeabcae2bfd4a14f45c8b73ba14496535d53b743e8 /xslt/docbook
parent5c8c8abcd072103177feb5c9497e12fb9ebdf262 (diff)
downloadyelp-tools-689d61b7bd82ab0a674e2088155557381d744e24.tar.gz
- Added rules to build with Norm's stylesheets, for comparison
* test/testbook/Makefile: - Added rules to build with Norm's stylesheets, for comparison * xslt/docbook/html/db2html-info.xsl: * xslt/docbook/html/db2html-suppressed.xsl: - Use new common copyright template, moved holder and year to inline * test/testbook/testbook.xml: * xslt/docbook/html/db2html-bibliography.xsl: - Lots and lots of work on bibliograpies * xslt/docbook/html/db2html-classsynopsis.xsl: - A few quick fixes for Python class synopses * xslt/docbook/html/elements: - Added bibliolist * xslt/docbook/html/db2html-inline.xsl: - Added automatic bibliography linking for citations * xslt/docbook/common/db-common.xsl: - New common copyright template - New personname list template * xslt/gettext/gettext.xsl: - Some fixes for blank roles/forms * xslt/gettext/l10n.xml.in: - Added ", and ", " and ", and bibliolabel.format svn path=/trunk/; revision=968
Diffstat (limited to 'xslt/docbook')
-rw-r--r--xslt/docbook/common/db-common.xsl79
-rw-r--r--xslt/docbook/html/db2html-bibliography.xsl633
-rw-r--r--xslt/docbook/html/db2html-classsynopsis.xsl16
-rw-r--r--xslt/docbook/html/db2html-info.xsl31
-rw-r--r--xslt/docbook/html/db2html-inline.xsl95
-rw-r--r--xslt/docbook/html/db2html-suppressed.xsl2
-rw-r--r--xslt/docbook/html/elements1
7 files changed, 733 insertions, 124 deletions
diff --git a/xslt/docbook/common/db-common.xsl b/xslt/docbook/common/db-common.xsl
index b52ff83..f575ca3 100644
--- a/xslt/docbook/common/db-common.xsl
+++ b/xslt/docbook/common/db-common.xsl
@@ -32,6 +32,40 @@ independant of the target format.
<!--**==========================================================================
+db.copyright
+Outputs copyright information
+$node: The #{copyright} element to format
+
+This template outputs copyright information from a #{copyright} elements.
+It assembles the #{year} and #{holder} elements into a simple copyright
+notice, beginning with the copyright symbol "©".
+-->
+<xsl:template name="db.copyright">
+ <xsl:param name="node" select="."/>
+ <xsl:text>©&#x00A0;</xsl:text>
+ <xsl:for-each select="$node/year">
+ <xsl:if test="position() != 1">
+ <xsl:call-template name="l10n.gettext">
+ <xsl:with-param name="msgid" select="', '"/>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:apply-templates select="."/>
+ </xsl:for-each>
+ <xsl:if test="$node/holder">
+ <xsl:text>&#x00A0;&#x00A0;</xsl:text>
+ <xsl:for-each select="$node/holder">
+ <xsl:if test="position() != 1">
+ <xsl:call-template name="l10n.gettext">
+ <xsl:with-param name="msgid" select="', '"/>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:apply-templates select="."/>
+ </xsl:for-each>
+ </xsl:if>
+</xsl:template>
+
+
+<!--**==========================================================================
db.linenumbering
Numbers each line in a verbatim environment
$node: The verbatim element to create the line numbering for
@@ -155,7 +189,7 @@ $lang: The language rules to use to construct the name
This template outputs the name of a person as modelled by the #{personname}
element. The #{personname} element allows authors to mark up components of
a person's name, such as the person's first name and surname. This template
-assembled those into a string.
+assembles those into a string.
-->
<xsl:template name="db.personname">
<xsl:param name="node" select="."/>
@@ -214,4 +248,47 @@ assembled those into a string.
</xsl:if>
</xsl:template>
+
+<!--**==========================================================================
+db.personname.list
+Outputs a list of people's names
+$nodes: The elements containing tags such as #{firstname} and #{surname}
+$lang: The language rules to use to construct the list of names
+
+This template outputs a list of names of people as modelled by the #{personname}
+element. The #{personname} element allows authors to mark up components of a
+person's name, such as the person's first name and surname. This template makes
+a list formatted according to the locale set in ${lang} and calls the template
+*{db.personname} for each element in ${nodes}.
+-->
+<xsl:template name="db.personname.list">
+ <xsl:param name="nodes"/>
+ <!-- FIXME: call i18n.locale -->
+ <xsl:param name="lang" select="ancestor-or-self::*[@lang][1]/@lang"/>
+ <xsl:for-each select="$nodes">
+ <xsl:choose>
+ <xsl:when test="position() = 1"/>
+ <xsl:when test="last() = 2">
+ <xsl:call-template name="l10n.gettext">
+ <xsl:with-param name="msgid" select="' and '"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="position() = last()">
+ <xsl:call-template name="l10n.gettext">
+ <xsl:with-param name="msgid" select="', and '"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="l10n.gettext">
+ <xsl:with-param name="msgid" select="', '"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="db.personname">
+ <xsl:with-param name="node" select="."/>
+ <xsl:with-param name="lang" select="$lang"/>
+ </xsl:call-template>
+ </xsl:for-each>
+</xsl:template>
+
</xsl:stylesheet>
diff --git a/xslt/docbook/html/db2html-bibliography.xsl b/xslt/docbook/html/db2html-bibliography.xsl
index c7db7e7..4a0bacc 100644
--- a/xslt/docbook/html/db2html-bibliography.xsl
+++ b/xslt/docbook/html/db2html-bibliography.xsl
@@ -17,12 +17,13 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:msg="http://www.gnome.org/~shaunm/gnome-doc-utils/l10n"
xmlns="http://www.w3.org/1999/xhtml"
version="1.0">
<!--!!==========================================================================
DocBook to HTML - Bibliographies
-:Requires: db-chunk db-label db2html-block db2html-inline db2html-division db2html-xref gettext
+:Requires: db-chunk db-common db-label db2html-block db2html-inline db2html-division db2html-xref gettext
REMARK: Describe this module
-->
@@ -34,138 +35,600 @@ Outputs CSS that controls the appearance of bibliograpies
-->
<xsl:template name="db2html.bibliography.css">
<xsl:text>
+span.bibliolabel { color: </xsl:text><xsl:value-of select="$theme.color.text_light"/><xsl:text>; }
* + div.biblioentry { margin-top: 1.2em; }
* + div.bibliomixed { margin-top: 1.2em; }
</xsl:text>
</xsl:template>
-<!-- == Matched Templates == -->
+<!--** =========================================================================
+db2html.biblioentry.label
+Outputs the label for a bibliography entry
+$node: The #{biblioentry} or #{bibliomixed} element to generate a label for
+-->
+<xsl:template name="db2html.biblioentry.label">
+ <xsl:param name="node" select="."/>
+ <xsl:if test="$node/*[1]/self::abbrev or $node/@xreflabel or $node/@id">
+ <span class="bibliolabel">
+ <xsl:call-template name="l10n.gettext">
+ <xsl:with-param name="msgid" select="'bibliolabel.format'"/>
+ <xsl:with-param name="node" select="."/>
+ <xsl:with-param name="format" select="true()"/>
+ </xsl:call-template>
+ </span>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+</xsl:template>
-<!-- = bibliography = -->
-<xsl:template match="bibliography">
- <xsl:param name="depth_in_chunk">
- <xsl:call-template name="db.chunk.depth-in-chunk"/>
- </xsl:param>
- <xsl:param name="depth_of_chunk">
- <xsl:call-template name="db.chunk.depth-of-chunk"/>
- </xsl:param>
+<!-- = msg:bibliolabel = -->
+<xsl:template mode="l10n.format.mode" match="msg:bibliolabel">
+ <xsl:param name="node"/>
+ <xsl:choose>
+ <xsl:when test="$node/*[1]/self::abbrev">
+ <xsl:apply-templates select="$node/abbrev[1]"/>
+ </xsl:when>
+ <xsl:when test="$node/@xreflabel">
+ <xsl:value-of select="$node/@xreflabel"/>
+ </xsl:when>
+ <xsl:when test="$node/@id">
+ <xsl:value-of select="$node/@id"/>
+ </xsl:when>
+ </xsl:choose>
+</xsl:template>
- <xsl:call-template name="db2html.division.div">
- <xsl:with-param name="divisions" select="bibliodiv"/>
- <xsl:with-param name="title_content">
- <xsl:if test="not(title) and not(bibliographyinfo/title)">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'Bibliography'"/>
- </xsl:call-template>
- </xsl:if>
- </xsl:with-param>
- <xsl:with-param name="info" select="bibliographyinfo"/>
- <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
- <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
+
+<!--%%==========================================================================
+db2html.biblioentry.mode
+FIXME
+
+REMARK: Describe this mode
+-->
+<xsl:template mode="db2html.biblioentry.mode" match="*">
+ <xsl:apply-templates select="."/>
+</xsl:template>
+
+<!-- = abstract % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="abstract"/>
+
+<!-- = address % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="address">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = affiliation % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="affiliation">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = artheader % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="artheader">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = articleinfo % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="articleinfo">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = author % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="author">
+ <xsl:call-template name="db.personname"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = authorblurb % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="authorblurb"/>
+
+<!-- = authorgroup % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="authorgroup">
+ <xsl:call-template name="db.personname.list">
+ <xsl:with-param name="nodes" select="*"/>
</xsl:call-template>
+ <xsl:text>. </xsl:text>
</xsl:template>
-<!-- = bibliodiv = -->
-<xsl:template match="bibliodiv">
- <xsl:param name="depth_in_chunk">
- <xsl:call-template name="db.chunk.depth-in-chunk"/>
- </xsl:param>
- <xsl:param name="depth_of_chunk">
- <xsl:call-template name="db.chunk.depth-of-chunk"/>
- </xsl:param>
- <xsl:call-template name="db2html.division.div">
- <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
- <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
+<!-- = authorinitials % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="authorinitials">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = bibliocoverage % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="bibliocoverage">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = biblioid % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="biblioid">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = bibliomisc % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="bibliomisc">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = bibliorelation % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="bibliorelation">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = biblioset % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="biblioset">
+ <xsl:apply-templates mode="db2html.biblioentry.mode"/>
+</xsl:template>
+
+<!-- = bibliosource % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="bibliosource">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = citetitle % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="citetitle">
+ <xsl:call-template name="db2html.inline">
+ <xsl:with-param name="class" select="'bibliotitle'"/>
</xsl:call-template>
+ <xsl:text>. </xsl:text>
</xsl:template>
-<!-- = bibliomixed = -->
-<xsl:template match="bibliomixed">
- <div class="bibliomixed block-indent">
- <xsl:call-template name="db2html.anchor"/>
- <xsl:choose>
- <xsl:when test="*[1]/self::abbrev">
- <xsl:call-template name="db.label">
- <xsl:with-param name="node" select="."/>
- </xsl:call-template>
- <xsl:text> </xsl:text>
- <xsl:apply-templates select="abbrev[1]/following-sibling::*"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="@xreflabel | @id">
- <xsl:call-template name="db.label">
- <xsl:with-param name="node" select="."/>
- </xsl:call-template>
- <xsl:text> </xsl:text>
- </xsl:if>
- <xsl:apply-templates/>
- </xsl:otherwise>
- </xsl:choose>
- </div>
+<!-- = collab % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="collab">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = collabname % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="collabname">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
</xsl:template>
-<!-- = bibliomset = -->
-<xsl:template match="bibliomset">
- <xsl:call-template name="db2html.block"/>
+<!-- = confgroup % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="confgroup">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
</xsl:template>
-<!-- = bibliomisc = -->
-<xsl:template match="bibliomisc">
+<!-- = confdates % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="confdates">
<xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
</xsl:template>
+<!-- = conftitle % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="conftitle">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
-<!--
-Cooked bibliography entries allow certain otherwise block-level
-elemets to be inline elements, so we special-case them here.
--->
+<!-- = confnum % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="confnum">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
-<!-- = biblio*/abstract = -->
-<xsl:template match="bibliomixed/abstract | bibliomset/abstract">
+<!-- = confsponsor % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="confsponsor">
<xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
</xsl:template>
-<!-- = biblio*/address = -->
-<xsl:template match="bibliomixed/address | bibliomset/address">
+<!-- = contractnum % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="contractnum">
<xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
</xsl:template>
-<!-- = biblio*/affiliation = -->
-<xsl:template match="bibliomixed/affiliation | bibliomset/affiliation">
+<!-- = contractsponsor % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="contractsponsor">
<xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
</xsl:template>
-<!-- = biblio*/author = -->
-<xsl:template match="bibliomixed/author | bibliomset/author">
+<!-- = contrib % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="contrib">
<xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
</xsl:template>
-<!-- = biblio*/authorblurb = -->
-<xsl:template match="bibliomixed/authorblurb | bibliomset/authorblurb">
+<!-- = corpauthor % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="corpauthor">
<xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
</xsl:template>
-<!-- = biblio*/authorgroup = -->
-<xsl:template match="bibliomixed/authorgroup | bibliomset/authorgroup">
+<!-- = corpcredit % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="corpcredit">
<xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
</xsl:template>
-<!-- = biblio*/personblurb = -->
-<xsl:template match="bibliomixed/personblurb | bibliomset/personblurb">
+<!-- = corpname % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="corpname">
<xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = copyright % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="copyright">
+ <xsl:call-template name="db.copyright"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = date % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="date">
+ <xsl:call-template name="db.copyright"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = edition % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="edition">
+ <xsl:call-template name="db.copyright"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = editor % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="editor">
+ <xsl:call-template name="db.personname"/>
+ <xsl:text>. </xsl:text>
</xsl:template>
-<!-- = biblio*/shortaffil = -->
-<xsl:template match="bibliomixed/shortaffil | bibliomset/shortaffil">
+<!-- = firstname % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="firstname">
<xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
</xsl:template>
-<!-- = biblio*/title = -->
-<xsl:template match="bibliomixed/title | bibliomset/title">
- <xsl:call-template name="db2html.inline">
- <xsl:with-param name="italic" select="true()"/>
+<!-- = honorific % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="honorific">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = indexterm % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="indexterm">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = invpartnumber % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="invpartnumber">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = isbn % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="isbn">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = issn % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="issn">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = issuenum % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="issuenum">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = jobtitle % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="jobtitle">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = lineage % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="lineage">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = orgname % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="orgname">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = orgdiv % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="orgdiv">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = othercredit % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="othercredit">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = othername % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="othername">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = pagenums % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="pagenums">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = personblurb % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="personblurb"/>
+
+<!-- = printhistory % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="printhistory"/>
+
+<!-- = productname % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="productname">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = productnumber % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="productnumber">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = pubdate % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="pubdate">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = publisher % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="publisher">
+ <xsl:call-template name="db2html.inline"/>
+</xsl:template>
+
+<!-- = publishername % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="publishername">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = pubsnumber % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="pubsnumber">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = releaseinfo % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="releaseinfo">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = revhistory % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="revhistory"/>
+
+<!-- = seriesvolnums % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="seriesvolnums">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = shortaffil % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="shortaffil">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = subtitle % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="subtitle">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = surname % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="surname">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = title % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="title">
+ <span class="bibliotitle">
+ <xsl:call-template name="l10n.gettext">
+ <xsl:with-param name="msgid" select="'citetitle.format'"/>
+ <xsl:with-param name="role" select="../self::biblioset/@relation"/>
+ <xsl:with-param name="node" select="."/>
+ <xsl:with-param name="format" select="true()"/>
+ </xsl:call-template>
+ </span>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = titleabbrev % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="titleabbrev">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = volumenum % db2html.biblioentry.mode = -->
+<xsl:template mode="db2html.biblioentry.mode" match="volumenum">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+
+<!--%%==========================================================================
+db2html.bibliomixed.mode
+FIXME
+
+REMARK: Describe this mode
+-->
+<xsl:template mode="db2html.bibliomixed.mode" match="*">
+ <xsl:apply-templates select="."/>
+</xsl:template>
+
+<!-- = absract % db2html.bibliomixed.mode = -->
+<xsl:template mode="db2html.bibliomixed.mode" match="abstract">
+ <xsl:call-template name="db2html.inline"/>
+</xsl:template>
+
+<!-- = address % db2html.bibliomixed.mode = -->
+<xsl:template mode="db2html.bibliomixed.mode" match="address">
+ <xsl:call-template name="db2html.inline"/>
+</xsl:template>
+
+<!-- = affiliation % db2html.bibliomixed.mode = -->
+<xsl:template mode="db2html.bibliomixed.mode" match="affiliation">
+ <xsl:call-template name="db2html.inline"/>
+</xsl:template>
+
+<!-- = author % db2html.bibliomixed.mode = -->
+<xsl:template mode="db2html.bibliomixed.mode" match="author">
+ <xsl:call-template name="db.personname"/>
+</xsl:template>
+
+<!-- = authorblurb % db2html.bibliomixed.mode = -->
+<xsl:template mode="db2html.bibliomixed.mode" match="authorblurb">
+ <xsl:call-template name="db2html.inline"/>
+</xsl:template>
+
+<!-- = authorgroup % db2html.bibliomixed.mode = -->
+<xsl:template mode="db2html.bibliomixed.mode" match="authorgroup">
+ <xsl:call-template name="db.personname.list">
+ <xsl:with-param name="nodes" select="*"/>
</xsl:call-template>
</xsl:template>
+<!-- = bibliomset % db2html.bibliomixed.mode = -->
+<xsl:template mode="db2html.bibliomixed.mode" match="bibliomset">
+ <xsl:apply-templates mode="db2html.bibliomixed.mode"/>
+</xsl:template>
+
+<!-- = bibliomisc % db2html.bibliomixed.mode = -->
+<xsl:template mode="db2html.bibliomixed.mode" match="bibliomisc">
+ <xsl:call-template name="db2html.inline"/>
+ <xsl:text>. </xsl:text>
+</xsl:template>
+
+<!-- = editor % db2html.bibliomixed.mode = -->
+<xsl:template mode="db2html.bibliomixed.mode" match="editor">
+ <xsl:call-template name="db.personname"/>
+</xsl:template>
+
+<!-- = personblurb % db2html.bibliomixed.mode = -->
+<xsl:template mode="db2html.bibliomixed.mode" match="personblurb">
+ <xsl:call-template name="db2html.inline"/>
+</xsl:template>
+
+<!-- = shortaffil % db2html.bibliomixed.mode = -->
+<xsl:template mode="db2html.bibliomixed.mode" match="shortaffil">
+ <xsl:call-template name="db2html.inline"/>
+</xsl:template>
+
+<!-- = title % db2html.bibliomixed.mode = -->
+<xsl:template mode="db2html.bibliomixed.mode" match="title">
+ <span class="bibliotitle">
+ <xsl:call-template name="l10n.gettext">
+ <xsl:with-param name="msgid" select="'citetitle.format'"/>
+ <xsl:with-param name="role" select="../self::bibliomset/@relation"/>
+ <xsl:with-param name="node" select="."/>
+ <xsl:with-param name="format" select="true()"/>
+ </xsl:call-template>
+ </span>
+</xsl:template>
+
+
+<!-- == Matched Templates == -->
+
+<!-- = bibliography = -->
+<xsl:template match="bibliography">
+ <xsl:param name="depth_in_chunk">
+ <xsl:call-template name="db.chunk.depth-in-chunk"/>
+ </xsl:param>
+ <xsl:param name="depth_of_chunk">
+ <xsl:call-template name="db.chunk.depth-of-chunk"/>
+ </xsl:param>
+ <xsl:choose>
+ <xsl:when test="not(title) and not(bibliographyinfo/title)">
+ <xsl:call-template name="db2html.division.div">
+ <xsl:with-param name="info" select="bibliographyinfo"/>
+ <xsl:with-param name="divisions" select="bibliodiv"/>
+ <xsl:with-param name="title_content">
+ <xsl:call-template name="l10n.gettext">
+ <xsl:with-param name="msgid" select="'Bibliography'"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
+ <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="db2html.division.div">
+ <xsl:with-param name="info" select="bibliographyinfo"/>
+ <xsl:with-param name="divisions" select="bibliodiv"/>
+ <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
+ <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- = bibliodiv = -->
+<xsl:template match="bibliodiv">
+ <xsl:param name="depth_in_chunk">
+ <xsl:call-template name="db.chunk.depth-in-chunk"/>
+ </xsl:param>
+ <xsl:param name="depth_of_chunk">
+ <xsl:call-template name="db.chunk.depth-of-chunk"/>
+ </xsl:param>
+ <xsl:call-template name="db2html.division.div">
+ <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
+ <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
+ </xsl:call-template>
+</xsl:template>
+
+<!-- = biblioentry = -->
+<xsl:template match="biblioentry">
+ <xsl:variable name="node" select="."/>
+ <div>
+ <xsl:attribute name="class">
+ <xsl:text>biblioentry block</xsl:text>
+ <xsl:if test="not(preceding-sibling::biblioentry or preceding-sibling::bibliomixed)">
+ <xsl:text> block-first</xsl:text>
+ </xsl:if>
+ </xsl:attribute>
+ <xsl:call-template name="db2html.anchor"/>
+ <xsl:call-template name="db2html.biblioentry.label"/>
+ <xsl:apply-templates mode="db2html.biblioentry.mode"
+ select="*[not(. = $node/*[1]/self::abbrev)]"/>
+ </div>
+</xsl:template>
+
+<!-- = bibliomixed = -->
+<xsl:template match="bibliomixed">
+ <xsl:variable name="node" select="."/>
+ <div>
+ <xsl:attribute name="class">
+ <xsl:text>bibliomixed block</xsl:text>
+ <xsl:if test="not(preceding-sibling::biblioentry or preceding-sibling::bibliomixed)">
+ <xsl:text> block-first</xsl:text>
+ </xsl:if>
+ </xsl:attribute>
+ <xsl:call-template name="db2html.anchor"/>
+ <xsl:call-template name="db2html.biblioentry.label"/>
+ <xsl:apply-templates mode="db2html.bibliomixed.mode"
+ select="node()[not(. = $node/*[1]/self::abbrev)]"/>
+ </div>
+</xsl:template>
+
</xsl:stylesheet>
diff --git a/xslt/docbook/html/db2html-classsynopsis.xsl b/xslt/docbook/html/db2html-classsynopsis.xsl
index 3d67c5d..a52cdf9 100644
--- a/xslt/docbook/html/db2html-classsynopsis.xsl
+++ b/xslt/docbook/html/db2html-classsynopsis.xsl
@@ -384,11 +384,14 @@ REMARK: Describe this mode
<xsl:text>)</xsl:text>
</xsl:if>
<xsl:text>:&#x000A;</xsl:text>
- <xsl:apply-templates mode="db2html.class.python.mode"
- select="
- classsynopsisinfo |
- constructorsynopsis | destructorsynopsis |
- fieldsynopsis | methodsynopsis "/>
+ <xsl:for-each select="classsynopsisinfo | constructorsynopsis |
+ destructorsynopsis | fieldsynopsis |
+ methodsynopsis ">
+ <xsl:apply-templates mode="db2html.class.python.mode" select="."/>
+ <xsl:if test="position() != last() and local-name(following-sibling::*[1]) != local-name(.)">
+ <xsl:text>&#x000A;</xsl:text>
+ </xsl:if>
+ </xsl:for-each>
</xsl:if>
</xsl:template>
@@ -524,6 +527,9 @@ REMARK: Describe this mode
</xsl:if>
<xsl:if test="initializer">
<xsl:text>=</xsl:text>
+ <xsl:if test="modifier or type">
+ <xsl:text> </xsl:text>
+ </xsl:if>
<xsl:apply-templates mode="db2html.class.python.mode" select="initializer"/>
</xsl:if>
</span>
diff --git a/xslt/docbook/html/db2html-info.xsl b/xslt/docbook/html/db2html-info.xsl
index d47417a..7df74ad 100644
--- a/xslt/docbook/html/db2html-info.xsl
+++ b/xslt/docbook/html/db2html-info.xsl
@@ -473,20 +473,8 @@ REMARK: Describe this mode.
<xsl:call-template name="l10n.gettext">
<xsl:with-param name="msgid" select="'Copyright'"/>
</xsl:call-template>
- <xsl:text>&#x00A0;©&#x00A0;</xsl:text>
- <xsl:for-each select="year">
- <xsl:if test="position() != 1">
- <xsl:text>, </xsl:text>
- </xsl:if>
- <xsl:apply-templates mode="db2html.info.mode" select="."/>
- </xsl:for-each>
- <xsl:text>&#x00A0;&#x00A0;</xsl:text>
- <xsl:for-each select="holder">
- <xsl:if test="position() != 1">
- <xsl:text>, </xsl:text>
- </xsl:if>
- <xsl:apply-templates mode="db2html.info.mode" select="."/>
- </xsl:for-each>
+ <xsl:text>&#x00A0;</xsl:text>
+ <xsl:call-template name="db.copyright"/>
</dt>
</xsl:template>
@@ -526,13 +514,6 @@ REMARK: Describe this mode.
</dd>
</xsl:template>
-<!-- = holder % db2html.info.mode = -->
-<xsl:template mode="db2html.info.mode" match="holder">
- <span class="holder">
- <xsl:apply-templates/>
- </span>
-</xsl:template>
-
<!-- = legalnotice % db2html.info.mode = -->
<xsl:template mode="db2html.info.mode" match="legalnotice">
<div class="division legalnotice">
@@ -674,14 +655,6 @@ REMARK: Describe this mode.
<xsl:call-template name="db2html.inline"/>
</xsl:template>
-<!-- = year % db2html.info.mode = -->
-<xsl:template mode="db2html.info.mode" match="year">
- <span class="year">
- <xsl:apply-templates/>
- </span>
-</xsl:template>
-
-
<!--#% db.chunk.info.content.mode ========================================== -->
<xsl:template mode="db.chunk.info.content.mode" match="*"/>
diff --git a/xslt/docbook/html/db2html-inline.xsl b/xslt/docbook/html/db2html-inline.xsl
index d2c4c41..e97e353 100644
--- a/xslt/docbook/html/db2html-inline.xsl
+++ b/xslt/docbook/html/db2html-inline.xsl
@@ -143,6 +143,23 @@ FIXME
<xsl:call-template name="db2html.inline"/>
</xsl:template>
+<!-- = bibkey-abbrev = -->
+<xsl:key name="bibkey-abbrev"
+ match="biblioentry[@id and *[1]/self::abbrev] |
+ bibliomixed[@id and *[1]/self::abbrev] "
+ use="string(*[1])"/>
+
+<!-- = bibkey-label = -->
+<xsl:key name="bibkey-label"
+ match="biblioentry[@id and @xreflabel] |
+ bibliomixed[@id and @xreflabel] "
+ use="string(@xreflabel)"/>
+
+<!-- = bibkey-id = -->
+<xsl:key name="bibkey-id"
+ match="biblioentry[@id] | bibliomixed[@id]"
+ use="string(@id)"/>
+
<!-- = citation = -->
<xsl:template match="citation">
<xsl:call-template name="db2html.inline"/>
@@ -160,8 +177,51 @@ FIXME
<!-- = citation % l10n.format.mode = -->
<xsl:template mode="l10n.format.mode" match="msg:citation">
<xsl:param name="node"/>
- <!-- FIXME: link to biblioentry/abbrev -->
- <xsl:apply-templates select="$node/node()"/>
+ <xsl:for-each select="$node[1]">
+ <xsl:variable name="entry_abbrev" select="key('bibkey-abbrev', string($node))"/>
+ <xsl:choose>
+ <xsl:when test="$entry_abbrev">
+ <xsl:call-template name="db2html.xref">
+ <xsl:with-param name="linkend" select="$entry_abbrev/@id"/>
+ <xsl:with-param name="target" select="$entry_abbrev"/>
+ <xsl:with-param name="content">
+ <xsl:apply-templates select="node()"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="entry_label" select="key('bibkey-label', string($node))"/>
+ <xsl:choose>
+ <xsl:when test="$entry_label">
+ <xsl:call-template name="db2html.xref">
+ <xsl:with-param name="linkend" select="$entry_label/@id"/>
+ <xsl:with-param name="target" select="$entry_label"/>
+ <xsl:with-param name="content">
+ <xsl:apply-templates select="node()"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="entry_id" select="key('bibkey-id', string($node))"/>
+ <xsl:choose>
+ <xsl:when test="$entry_id">
+ <xsl:call-template name="db2html.xref">
+ <xsl:with-param name="linkend" select="$entry_id/@id"/>
+ <xsl:with-param name="target" select="$entry_id"/>
+ <xsl:with-param name="content">
+ <xsl:apply-templates select="node()"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="node()"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
</xsl:template>
<!-- = citetitle = -->
@@ -432,6 +492,11 @@ FIXME
<xsl:call-template name="db2html.inline"/>
</xsl:template>
+<!-- = holder = -->
+<xsl:template match="holder">
+ <xsl:call-template name="db2html.inline"/>
+</xsl:template>
+
<!-- = honorific = -->
<xsl:template match="honorific">
<xsl:call-template name="db2html.inline"/>
@@ -457,6 +522,16 @@ FIXME
<xsl:call-template name="db2html.inline"/>
</xsl:template>
+<!-- = issn = -->
+<xsl:template match="issn">
+ <xsl:call-template name="db2html.inline"/>
+</xsl:template>
+
+<!-- = issuenum = -->
+<xsl:template match="issuenum">
+ <xsl:call-template name="db2html.inline"/>
+</xsl:template>
+
<!-- = jobtitle = -->
<xsl:template match="jobtitle">
<xsl:call-template name="db2html.inline"/>
@@ -594,6 +669,11 @@ FIXME
<xsl:call-template name="db2html.inline"/>
</xsl:template>
+<!-- = pagenums = -->
+<xsl:template match="pagenums">
+ <xsl:call-template name="db2html.inline"/>
+</xsl:template>
+
<!-- = parameter = -->
<xsl:template match="parameter">
<xsl:call-template name="db2html.inline"/>
@@ -938,9 +1018,20 @@ FIXME
<xsl:call-template name="db2html.inline"/>
</xsl:template>
+<!-- = volumenum = -->
+<xsl:template match="volumenum">
+ <xsl:call-template name="db2html.inline"/>
+</xsl:template>
+
<!-- = wordasword = -->
<xsl:template match="wordasword">
<xsl:call-template name="db2html.inline"/>
</xsl:template>
+<!-- = year = -->
+<xsl:template match="year">
+ <xsl:call-template name="db2html.inline"/>
+</xsl:template>
+
+
</xsl:stylesheet>
diff --git a/xslt/docbook/html/db2html-suppressed.xsl b/xslt/docbook/html/db2html-suppressed.xsl
index 0aaf454..12fccc3 100644
--- a/xslt/docbook/html/db2html-suppressed.xsl
+++ b/xslt/docbook/html/db2html-suppressed.xsl
@@ -91,7 +91,6 @@ modes because of the DocBook content model.
<xsl:template match="collabname"/>
<xsl:template match="copyright"/>
<xsl:template match="editor"/>
-<xsl:template match="holder"/>
<xsl:template match="legalnotice"/>
<xsl:template match="othercredit"/>
<xsl:template match="personblurb"/>
@@ -101,7 +100,6 @@ modes because of the DocBook content model.
<xsl:template match="revision"/>
<xsl:template match="revnumber"/>
<xsl:template match="revremark"/>
-<xsl:template match="year"/>
<!-- Handled specially, so we can apply-templates -->
<xsl:template match="label"/>
diff --git a/xslt/docbook/html/elements b/xslt/docbook/html/elements
index fb7df8c..a1987e8 100644
--- a/xslt/docbook/html/elements
+++ b/xslt/docbook/html/elements
@@ -33,6 +33,7 @@ biblioentry
bibliography
bibliographyinfo
biblioid
+bibliolist
bibliomisc
bibliomixed
bibliomset