1 <?xml version="1.0" encoding="US-ASCII"?>
2 <!--This file was created automatically by html2xhtml-->
3 <!--from the HTML stylesheets. Do not edit this file.-->
4 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
6 <!-- ********************************************************************
8 ********************************************************************
10 This file is part of the XSL DocBook Stylesheet distribution.
11 See ../README or http://nwalsh.com/docbook/xsl/ for copyright
12 and other information.
14 ******************************************************************** -->
16 <!-- ==================================================================== -->
18 <xsl:template match="index">
19 <!-- some implementations use completely empty index tags to indicate -->
20 <!-- where an automatically generated index should be inserted. so -->
21 <!-- if the index is completely empty, skip it. Unless generate.index -->
22 <!-- is non-zero, in which case, this is where the automatically -->
23 <!-- generated index should go. -->
25 <xsl:if test="count(*)>0 or $generate.index != '0'">
26 <div class="{name(.)}">
27 <xsl:if test="$generate.id.attributes != 0">
28 <xsl:attribute name="id">
29 <xsl:call-template name="object.id"/>
33 <xsl:call-template name="index.titlepage"/>
35 <xsl:when test="indexdiv">
36 <xsl:apply-templates/>
39 <xsl:apply-templates select="*[not(self::indexentry)]"/>
40 <!-- Because it's actually valid for Index to have neither any -->
41 <!-- Indexdivs nor any Indexentries, we need to check and make -->
42 <!-- sure that at least one Indexentry exists, and generate a -->
43 <!-- wrapper dl if there is at least one; otherwise, do nothing. -->
44 <xsl:if test="indexentry">
45 <!-- The indexentry template assumes a parent dl wrapper has -->
46 <!-- been generated; for Indexes that have Indexdivs, the dl -->
47 <!-- wrapper is generated by the indexdiv template; however, -->
48 <!-- for Indexes that lack Indexdivs, if we don't generate a -->
49 <!-- dl here, HTML output will not be valid. -->
51 <xsl:apply-templates select="indexentry"/>
57 <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0">
58 <xsl:call-template name="generate-index">
59 <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/>
63 <xsl:if test="not(parent::article)">
64 <xsl:call-template name="process.footnotes"/>
70 <xsl:template match="setindex">
71 <!-- some implementations use completely empty index tags to indicate -->
72 <!-- where an automatically generated index should be inserted. so -->
73 <!-- if the index is completely empty, skip it. Unless generate.index -->
74 <!-- is non-zero, in which case, this is where the automatically -->
75 <!-- generated index should go. -->
77 <xsl:if test="count(*)>0 or $generate.index != '0'">
78 <div class="{name(.)}">
79 <xsl:if test="$generate.id.attributes != 0">
80 <xsl:attribute name="id">
81 <xsl:call-template name="object.id"/>
85 <xsl:call-template name="setindex.titlepage"/>
86 <xsl:apply-templates/>
88 <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0">
89 <xsl:call-template name="generate-index">
90 <xsl:with-param name="scope" select="/"/>
94 <xsl:if test="not(parent::article)">
95 <xsl:call-template name="process.footnotes"/>
101 <xsl:template match="index/title"/>
102 <xsl:template match="index/subtitle"/>
103 <xsl:template match="index/titleabbrev"/>
105 <!-- ==================================================================== -->
107 <xsl:template match="indexdiv">
108 <div class="{name(.)}">
109 <xsl:if test="$generate.id.attributes != 0">
110 <xsl:attribute name="id">
111 <xsl:call-template name="object.id"/>
115 <xsl:call-template name="anchor"/>
116 <xsl:apply-templates select="*[not(self::indexentry)]"/>
118 <xsl:apply-templates select="indexentry"/>
123 <xsl:template match="indexdiv/title">
124 <h3 class="{name(.)}">
125 <xsl:apply-templates/>
129 <!-- ==================================================================== -->
131 <xsl:template match="indexterm">
132 <!-- this one must have a name, even if it doesn't have an ID -->
133 <xsl:variable name="id">
134 <xsl:call-template name="object.id"/>
137 <a id="{$id}" class="indexterm"/>
140 <xsl:template match="primary|secondary|tertiary|see|seealso">
143 <!-- ==================================================================== -->
145 <xsl:template match="indexentry">
146 <xsl:apply-templates select="primaryie"/>
149 <xsl:template match="primaryie">
151 <xsl:apply-templates/>
154 <xsl:when test="following-sibling::secondaryie">
157 <xsl:apply-templates select="following-sibling::secondaryie"/>
161 <xsl:when test="following-sibling::seeie |following-sibling::seealsoie">
164 <xsl:apply-templates select="following-sibling::seeie |following-sibling::seealsoie"/>
171 <xsl:template match="secondaryie">
173 <xsl:apply-templates/>
176 <xsl:when test="following-sibling::tertiaryie">
179 <xsl:apply-templates select="following-sibling::tertiaryie"/>
183 <xsl:when test="following-sibling::seeie |following-sibling::seealsoie">
186 <xsl:apply-templates select="following-sibling::seeie |following-sibling::seealsoie"/>
193 <xsl:template match="tertiaryie">
195 <xsl:apply-templates/>
197 <xsl:if test="following-sibling::seeie |following-sibling::seealsoie">
200 <xsl:apply-templates select="following-sibling::seeie |following-sibling::seealsoie"/>
206 <xsl:template match="seeie|seealsoie">
208 <xsl:apply-templates/>