Navigation updates and fixes
[exim-website.git] / templates / doc / toc.xsl
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4
5    <!-- Define display/content information -->
6       <xsl:output indent="no"/>
7       <xsl:output encoding="UTF-8"/>
8       <xsl:output media-type="text/xml"/>
9       <xsl:output omit-xml-declaration="no"/>
10    
11    <!-- CONTENT -->
12       <xsl:template match="/">
13          <toc>
14             <xsl:apply-templates select="book/chapter"/>
15          </toc>
16       </xsl:template>
17
18    <!-- Chapter -->
19       <xsl:template match="/book/chapter">
20
21          <!-- Calculate the URL to the chapter. Store in $chapter_url -->
22             <xsl:variable name="chapter_url">
23                <xsl:value-of select="concat(/book/prepend_chapter,'ch-',title_uri,'.html')"/>
24             </xsl:variable>
25
26          <!-- Chapter info -->
27             <c>
28                <u>
29                   <xsl:value-of select="$chapter_url"/>
30                </u>
31                <t>
32                      <xsl:apply-templates select="title"/>
33                </t>
34             </c>
35       </xsl:template>
36
37    <!-- Chapter/Section Title -->
38       <xsl:template match="title|chapter/title">
39          <xsl:apply-templates/>
40       </xsl:template>
41
42 </xsl:stylesheet>