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