2
<xsl:stylesheet version="1.0"
3
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4
<xsl:output omit-xml-declaration="yes"/>
6
<xsl:template match="/"><xsl:apply-templates/></xsl:template>
8
<xsl:template match="text()|@*"></xsl:template>
10
<xsl:template match="chapter">
11
<xsl:variable name="url" select="@id"/>
12
<xsl:apply-templates/>
15
<xsl:template match="chapter/section[position()!=1]">
16
<xsl:variable name="url" select="@id"/>
17
<xsl:apply-templates/>
20
<xsl:template match="indexterm">
22
<xsl:when test="./secondary and ./tertiary">
23
<entry name="{primary}, {secondary}, {tertiary}" url="{$url}.html"/>
25
<xsl:when test="./secondary">
26
<entry name="{primary}, {secondary}" url="{$url}.html"/>
29
<entry name="{primary}" url="{$url}.html"/>