diff options
author | cvs2svn Import User <samba-bugs@samba.org> | 2003-05-01 11:47:49 +0000 |
---|---|---|
committer | cvs2svn Import User <samba-bugs@samba.org> | 2003-05-01 11:47:49 +0000 |
commit | 67ce764d69b13203d9bd73e055e22f71dfebdba6 (patch) | |
tree | 6d54dcff5cb7ebd51c63b2dde77ea52a090afe5f /docs/docbook/xslt/db2latex/index.mod.xsl | |
parent | bac83636a5993dbcd1c0beefd628044771603523 (diff) | |
parent | 75cace04fdcb672cc6c3c3ec8403206f2b222c50 (diff) | |
download | samba-67ce764d69b13203d9bd73e055e22f71dfebdba6.tar.gz samba-67ce764d69b13203d9bd73e055e22f71dfebdba6.tar.bz2 samba-67ce764d69b13203d9bd73e055e22f71dfebdba6.zip |
This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to be commit a1ffe2a29c0e6be54af09d6647b7f54369d75a1e)
Diffstat (limited to 'docs/docbook/xslt/db2latex/index.mod.xsl')
-rw-r--r-- | docs/docbook/xslt/db2latex/index.mod.xsl | 216 |
1 files changed, 216 insertions, 0 deletions
diff --git a/docs/docbook/xslt/db2latex/index.mod.xsl b/docs/docbook/xslt/db2latex/index.mod.xsl new file mode 100644 index 0000000000..76985c19fd --- /dev/null +++ b/docs/docbook/xslt/db2latex/index.mod.xsl @@ -0,0 +1,216 @@ +<?xml version='1.0'?> +<!--############################################################################# +| $Id: index.mod.xsl,v 1.1 2003/04/30 21:39:49 ab Exp $ +|- ############################################################################# +| $Author: ab $ +| +| PURPOSE: ++ ############################################################################## --> +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" + exclude-result-prefixes="doc" version='1.0'> + + + + <!--############################################################################# --> + <!-- DOCUMENTATION --> + <doc:reference id="index" xmlns=""> + <referenceinfo> + <releaseinfo role="meta"> + $Id: index.mod.xsl,v 1.1 2003/04/30 21:39:49 ab Exp $ + </releaseinfo> + <authorgroup> + <author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author> + <author> <firstname>James</firstname> <surname>Devenish</surname> </author> + </authorgroup> + <copyright> + <year>2000</year> <year>2001</year> <year>2002</year> <year>2003</year> + <holder>Ramon Casellas</holder> + </copyright> + </referenceinfo> + + <title>Index <filename>index.mod.xsl</filename></title> + <partintro> + <section><title>Introduction</title> + <para></para> + </section> + </partintro> + </doc:reference> + + +<!-- This parameter is for enabeling or disabling of indexterms --> +<xsl:param name="latex.generate.indexterm">1</xsl:param> + +<!-- Our key for ranges --> +<xsl:key name="indexterm-range" match="indexterm[@class='startofrange']" use="@id"/> + + + + +<!-- ############################################################### --> +<!-- Index --> +<!-- --> +<!-- ############################################################### --> +<xsl:template match="index|setindex"> + <xsl:call-template name="label.id"/> + <xsl:text>\printindex </xsl:text> +</xsl:template> + +<xsl:template match="index/title"></xsl:template> +<xsl:template match="index/subtitle"></xsl:template> +<xsl:template match="index/titleabbrev"></xsl:template> + +<xsl:template match="index/title" mode="component.title.mode"> + <xsl:call-template name="label.id"> <xsl:with-param name="object" select=".."/> </xsl:call-template> +</xsl:template> + +<xsl:template match="index/subtitle" mode="component.title.mode"/> + + +<!-- ############################################################### --> +<!-- IndexDiv --> +<!-- --> +<!-- ############################################################### --> +<xsl:template match="indexdiv"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="indexdiv/title"> + <xsl:call-template name="label.id"> <xsl:with-param name="object" select=".."/> </xsl:call-template> +</xsl:template> + + +<!-- INDEX TERM CONTENT MODEL +IndexTerm ::= +(Primary, +((Secondary, +((Tertiary, +(See|SeeAlso+)?)| +See|SeeAlso+)?)| +See|SeeAlso+)?) +--> +<!-- ############################################################### --> +<!-- IndexDiv --> +<!-- --> +<!-- ############################################################### --> +<xsl:template match="indexterm"> +<xsl:if test="$latex.generate.indexterm != 0"> +<!-- + <xsl:text>\index{</xsl:text> + <xsl:call-template name="normalize-scape"> + <xsl:with-param name="string" select="normalize-space(./primary)"/> + </xsl:call-template> + <xsl:if test="./secondary"> + <xsl:text>!</xsl:text> + <xsl:call-template name="normalize-scape"> + <xsl:with-param name="string" select="normalize-space(./secondary)"/> + </xsl:call-template> + </xsl:if> + <xsl:if test="./tertiary"> + <xsl:text>!</xsl:text> + <xsl:call-template name="normalize-scape"> + <xsl:with-param name="string" select="normalize-space(./tertiary)"/> + </xsl:call-template> + </xsl:if> + <xsl:if test="./see"> + <xsl:text>|see{</xsl:text> + <xsl:call-template name="normalize-scape"> + <xsl:with-param name="string" select="normalize-space(./see)"/> + </xsl:call-template> + <xsl:text>}</xsl:text> + </xsl:if> + <xsl:if test="./seealso"> + <xsl:text>|see{</xsl:text> + <xsl:call-template name="normalize-scape"> + <xsl:with-param name="string" select="normalize-space(./seealso)"/> + </xsl:call-template> + <xsl:text>}</xsl:text> + </xsl:if> + <xsl:text>}</xsl:text> +--> + <xsl:variable name="idxterm"> + <xsl:apply-templates mode="indexterm"/> + </xsl:variable> + + <xsl:if test="@class and @zone"> + <xsl:message terminate="yes">Error: Only one attribut (@class or @zone) is in indexterm possible!</xsl:message> + </xsl:if> + + <xsl:choose> + <xsl:when test="@class='startofrange'"> + <xsl:text>\index{</xsl:text> + <xsl:value-of select="normalize-space($idxterm)"/> + <xsl:text>|(}</xsl:text> + </xsl:when> + <xsl:when test="@class='endofrange'"> + <xsl:choose> + <xsl:when test="count(key('indexterm-range',@startref)) = 0"> + <xsl:message terminate="yes"><xsl:text>Error: No indexterm with </xsl:text> + <xsl:text>id='</xsl:text><xsl:value-of select="@startref"/> + <xsl:text>' found!</xsl:text> + <xsl:text> Check your attributs id/startref in your indexterms!</xsl:text> + </xsl:message> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="thekey" select="key('indexterm-range',@startref)"/> + <xsl:text>\index{</xsl:text> + <xsl:apply-templates select="$thekey/*" mode="indexterm"/> + <xsl:text>|)}</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:text>\index{</xsl:text> + <xsl:message terminate="no"><xsl:text>Simple case:</xsl:text></xsl:message> + <xsl:value-of select="normalize-space($idxterm)"/> + <xsl:text>}</xsl:text> + </xsl:otherwise> + </xsl:choose> +</xsl:if> +</xsl:template> + + +<!-- ================================================ --> +<xsl:template match="*" mode="indexterm"> + <xsl:message>WARNING: Element '<xsl:value-of select="local-name()"/>' in indexterm not supported!</xsl:message> +</xsl:template> + + + +<!-- ================================================ --> +<xsl:template match="primary" mode="indexterm"> +<xsl:apply-templates mode="indexterm"/> +</xsl:template> + +<xsl:template match="secondary" mode="indexterm"> +<xsl:text>!</xsl:text> +<xsl:apply-templates mode="indexterm"/> +</xsl:template> + +<xsl:template match="tertiary" mode="indexterm"> +<xsl:text>!</xsl:text> +<xsl:apply-templates mode="indexterm"/> +</xsl:template> + +<xsl:template match="see|seealso" mode="indexterm"> +<xsl:text>|see{</xsl:text> +<xsl:apply-templates mode="indexterm"/> +<xsl:text>} </xsl:text> +</xsl:template> + + +<!-- ================================================ --> +<!-- A simple example of what can be in an primary, --> +<!-- secondary or tertiary. --> +<!-- ================================================ --> +<xsl:template match="acronym" mode="indexterm"> +<xsl:apply-templates mode="indexterm"/> +</xsl:template> + + +<xsl:template match="primary|secondary|tertiary|see|seealso"/> +<xsl:template match="indexentry"/> +<xsl:template match="primaryie|secondaryie|tertiaryie|seeie|seealsoie"/> + +</xsl:stylesheet> |