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="{$docroot}/doc/chapter.css"/>
22 <link rel="canonical" href="{/chapter/canonical_url}"/>
27 <xsl:variable name="html.body.append">
28 <script type="text/javascript" src="{$docroot}/doc/chapter.js"/>
31 <!-- Table of Contents -->
32 <xsl:variable name="html.body.outer.append">
35 <img src="../../../../doc/contents.png" width="16" height="155"/>
40 <xsl:template match="/chapter">
43 <a class="previous_page" href="{prev_url}"><![CDATA[<-previous]]></a>
44 <a class="next_page" href="{next_url}"><![CDATA[next->]]></a>
46 <!-- Chapter Wrapper -->
47 <div id="chapter" class="chapter{@class}">
49 <!-- Chapter Title -->
50 <h2 id="{@id}" class="{@class}">
51 <xsl:value-of select="concat('Chapter ',chapter_id,' - ',title)"/>
55 <xsl:apply-templates select="*[name()!='section']"/>
56 <xsl:apply-templates select="section"/>
60 <a class="previous_page" href="{prev_url}"><![CDATA[<-previous]]></a>
61 <a class="next_page" href="{next_url}"><![CDATA[next->]]></a>
66 <xsl:template match="/chapter/section">
67 <!-- Section Wrapper -->
68 <div class="section{@class}">
70 <!-- Section Title -->
72 <xsl:when test="@class='index'">
73 <h3 id="{@id}" class="{@class}">
74 <xsl:value-of select="title"/>
78 <h3 id="{@id}" class="{@class}">
79 <xsl:value-of select="concat(position(),'. ',title)"/>
84 <!-- Section Paragraphs -->
85 <xsl:apply-templates select="*"/>
89 <!-- Section paragraph -->
90 <xsl:template match="/chapter/section/para">
92 <xsl:if test="@revisionflag!=''"><xsl:attribute name="class">changed</xsl:attribute></xsl:if>
93 <xsl:apply-templates/>
98 <xsl:template match="chapter_id|prev_url|next_url|canonical_url"/>