1 <?xml version="1.0" encoding="UTF-8"?>
3 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
6 <xsl:import href="../wrapper.xsl"/>
7 <xsl:template match="/"> <xsl:apply-imports/> </xsl:template>
8 <xsl:template name="content"><xsl:apply-templates/></xsl:template>
10 <!-- Where am I relative to the root. Lets mirrors host this in subfolders -->
11 <xsl:variable name="docroot" select="'../../../..'"/>
14 <xsl:variable name="html.head.title" select="concat(/chapter/chapter_id,'. ',/chapter/title)"/>
16 <xsl:variable name="html.head.append">
19 <link rel="stylesheet" type="text/css" href="{$staticroot}/doc/chapter.css"/>
22 <link rel="canonical" href="{/chapter/canonical_url}"/>
27 <xsl:variable name="html.body.append">
28 <script type="text/javascript" src="{$staticroot}/doc/chapter.js"/>
31 <!-- Table of Contents -->
32 <xsl:variable name="html.body.outer.append">
35 <img src="{$staticroot}/doc/contents.png" width="16" height="155"/>
40 <xsl:template match="/chapter">
43 <a class="previous_page" href="{prev_url}"><![CDATA[<-previous]]></a>
44 <xsl:if test="next_url">
45 <a class="next_page" href="{next_url}"><![CDATA[next->]]></a>
48 <!-- Chapter Wrapper -->
49 <div id="chapter" class="chapter{@class}">
51 <xsl:if test="current_url">
52 <p id="old_version_warning">
53 <span class="closebar"><a href="#" title="Close">X</a></span>
54 <strong>WARNING:</strong>
55 <xsl:text> This documentation is for an old version of Exim (</xsl:text>
56 <a href="{current_url}">latest</a>
57 <xsl:text>)</xsl:text>
61 <!-- Chapter Title -->
62 <h2 id="{@id}" class="{@class}">
64 <xsl:value-of select="concat('Chapter ',chapter_id,' - ',title)"/>
69 <xsl:apply-templates select="*[name()!='section']"/>
70 <xsl:apply-templates select="section"/>
74 <a class="previous_page" href="{prev_url}"><![CDATA[<-previous]]></a>
75 <a class="toc_page" href="{toc_url}"><![CDATA[Table of Contents]]></a>
76 <xsl:if test="next_url">
77 <a class="next_page" href="{next_url}"><![CDATA[next->]]></a>
83 <xsl:template match="*/section">
85 <!-- Add 2 to the "level" attr for the html header level; default h3 -->
86 <xsl:variable name="hlevel">
88 <xsl:when test="@level!=''"><xsl:value-of select="@level + 2"/></xsl:when>
89 <xsl:otherwise>3</xsl:otherwise>
93 <!-- Take the "sectprefix" attr, default position() -->
94 <xsl:variable name="sectprefix">
96 <xsl:when test="@sectprefix!=''"> <xsl:value-of select="@sectprefix"/> </xsl:when>
97 <xsl:otherwise> <xsl:value-of select="position()"/> </xsl:otherwise>
101 <!-- Section Wrapper -->
102 <div class="section{@class}">
104 <!-- Section Title -->
106 <xsl:when test="@class='index'">
107 <h3 id="{@id}" class="{@class}">
108 <xsl:value-of select="title"/>
112 <xsl:element name="h{$hlevel}">
113 <xsl:attribute name="id"> <xsl:value-of select="@id"/> </xsl:attribute>
114 <xsl:attribute name="class"> <xsl:value-of select="@class"/> </xsl:attribute>
115 <xsl:value-of select="concat($sectprefix,'. ',title)"/>
120 <!-- Section Paragraphs -->
121 <xsl:apply-templates select="*"/>
125 <!-- Section paragraph -->
126 <xsl:template match="/chapter/section/para">
128 <xsl:if test="@revisionflag!=''"><xsl:attribute name="class">changed</xsl:attribute></xsl:if>
129 <xsl:apply-templates/>
133 <!-- Anchors on varlistitems -->
134 <xsl:template match="*/listitem[@anchorname]">
135 <a id="{@anchorname}"> </a>
137 <xsl:apply-templates select="*"/>
142 <xsl:template match="chapter_id|this_url|prev_url|next_url|toc_url|canonical_url|current_url|title_uri|old_versions"/>