diff options
author | Shaun McCance <shaunm@src.gnome.org> | 2004-06-09 11:43:12 +0000 |
---|---|---|
committer | Shaun McCance <shaunm@src.gnome.org> | 2004-06-09 11:43:12 +0000 |
commit | 3210ccab2b5c26ba66ce34b42965cc6df4d9da11 (patch) | |
tree | 533fa7551f433b465d06da463fbb752373f7fd8a /xslt/docbook/common/db-xref.xsl | |
parent | 5f369abb014a992821bcd376d15a4b99edf487a3 (diff) | |
download | gnome-doc-utils-3210ccab2b5c26ba66ce34b42965cc6df4d9da11.tar.gz |
- Moved html/db2html-label.xsl to common/db-label.xsl - Added
* xslt/docbook/common/Makefile.am:
* xslt/docbook/common/db-label.xsl:
* xslt/docbook/common/db-xref.xsl:
* xslt/docbook/html/Makefile.am:
* xslt/docbook/html/db2html-autotoc.xsl:
* xslt/docbook/html/db2html-cmdsynopsis.xsl:
* xslt/docbook/html/db2html-qanda.xsl:
* xslt/docbook/html/db2html-suppressed.xsl:
* xslt/docbook/html/db2html-title.xsl:
* xslt/docbook/html/db2html-xref.xsl:
* xslt/docbook/html/db2html.xsl:
- Moved html/db2html-label.xsl to common/db-label.xsl
- Added common/db-xref.xsl to handle the common parts of xrefs
* xslt/docbook/common/db-common.xsl:
- Added the 'idkey' here
* xslt/docbook/html/db2html-css.xsl:
- Nothing important
Diffstat (limited to 'xslt/docbook/common/db-xref.xsl')
-rw-r--r-- | xslt/docbook/common/db-xref.xsl | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/xslt/docbook/common/db-xref.xsl b/xslt/docbook/common/db-xref.xsl new file mode 100644 index 0000000..dcb3d8b --- /dev/null +++ b/xslt/docbook/common/db-xref.xsl @@ -0,0 +1,72 @@ +<?xml version='1.0' encoding='utf-8'?><!-- -*- indent-tabs-mode: nil -*- --> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:doc="http://www.gnome.org/~shaunm/xsldoc" + exclude-result-prefixes="doc" + version="1.0"> + +<doc:title>Common Cross Reference Utilities</doc:title> + + +<!-- == db2html.xref.content =============================================== --> + +<template xmlns="http://www.gnome.org/~shaunm/xsldoc"> + <name>db.xref.content</name> + <description> + Generate the content for a cross reference + </description> +</template> + +<xsl:template name="db.xref.content"> + <xsl:param name="linkend" select="@linkend"/> + <xsl:param name="target" select="key('idkey', $linkend)"/> + <xsl:param name="xrefstyle" select="@xrefstyle"/> + <xsl:choose> + <xsl:when test="$target/@xreflabel"> + <xsl:value-of select="$target/@xreflabel"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="db.xref.content.mode" select="$target"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- +<xsl:template mode="xref.content.mode" match="article | reference"> +<xsl:choose> +<xsl:when test=" +(preceding-sibling::*[name(.) = name(current())]) or +(following-sibling::*[name(.) = name(current())]) or +(parent::part/preceding-sibling::part/*[name(.) = name(current())]) or +(parent::part/following-sibling::part/*[name(.) = name(current())]) "> +<xsl:call-template name="header"/> +</xsl:when> +<xsl:otherwise> +<xsl:call-template name="gettext"> +<xsl:with-param name="msgid" select="'Table of Contents'"/> +</xsl:call-template> +</xsl:otherwise> +</xsl:choose> +</xsl:template> + +<xsl:template mode="xref.content.mode" match="book"> +<xsl:call-template name="gettext"> +<xsl:with-param name="msgid" select="'Table of Contents'"/> +</xsl:call-template> +</xsl:template> + +<xsl:template mode="xref.content.mode" match="glossentry"> +<xsl:apply-templates mode="xref.content.mode" select="glossterm[1]"/> +</xsl:template> + +<xsl:template mode="xref.content.mode" match="glossterm"> +<xsl:apply-templates/> +</xsl:template> + +<xsl:template mode="xref.content.mode" match="*"> +<xsl:call-template name="header"/> +</xsl:template> + +--> + +</xsl:stylesheet> |