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 <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 <!-- Chapter Title -->
52 <h2 id="{@id}" class="{@class}">
53 <xsl:value-of select="concat('Chapter ',chapter_id,' - ',title)"/>
57 <xsl:apply-templates select="*[name()!='section']"/>
58 <xsl:apply-templates select="section"/>
62 <a class="previous_page" href="{prev_url}"><![CDATA[<-previous]]></a>
63 <a class="next_page" href="{next_url}"><![CDATA[next->]]></a>
68 <xsl:template match="/chapter/section">
69 <!-- Section Wrapper -->
70 <div class="section{@class}">
72 <!-- Section Title -->
74 <xsl:when test="@class='index'">
75 <h3 id="{@id}" class="{@class}">
76 <xsl:value-of select="title"/>
80 <h3 id="{@id}" class="{@class}">
81 <xsl:value-of select="concat(position(),'. ',title)"/>
86 <!-- Section Paragraphs -->
87 <xsl:apply-templates select="*"/>
91 <!-- Section paragraph -->
92 <xsl:template match="/chapter/section/para">
94 <xsl:if test="@revisionflag!=''"><xsl:attribute name="class">changed</xsl:attribute></xsl:if>
95 <xsl:apply-templates/>
100 <xsl:template match="chapter_id|prev_url|next_url|canonical_url"/>