diff options
author | Shaun McCance <shaunm@src.gnome.org> | 2007-07-02 15:01:56 +0000 |
---|---|---|
committer | Shaun McCance <shaunm@src.gnome.org> | 2007-07-02 15:01:56 +0000 |
commit | 689d61b7bd82ab0a674e2088155557381d744e24 (patch) | |
tree | abcae2bfd4a14f45c8b73ba14496535d53b743e8 /xslt/docbook/common | |
parent | 5c8c8abcd072103177feb5c9497e12fb9ebdf262 (diff) | |
download | yelp-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/common')
-rw-r--r-- | xslt/docbook/common/db-common.xsl | 79 |
1 files changed, 78 insertions, 1 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>© </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>  </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> |