<script type="text/javascript" src="{$docroot}/doc/chapter.js"/>
</xsl:variable>
+ <!-- Table of Contents -->
+ <xsl:variable name="html.body.outer.append">
+ <div id="toc">
+ <ul class="hidden"/>
+ <img src="../../../../doc/contents.png" width="16" height="155"/>
+ </div>
+ </xsl:variable>
+
<!-- CONTENT -->
<xsl:template match="/chapter">
<!-- Navigation -->
- <a class="previous_page" href="{prev_url}"><![CDATA[<-previous]]></a>
- <a class="next_page" href="{next_url}"><![CDATA[next->]]></a>
+ <a class="previous_page" href="{prev_url}"><![CDATA[<-previous]]></a>
+ <xsl:if test="next_url">
+ <a class="next_page" href="{next_url}"><![CDATA[next->]]></a>
+ </xsl:if>
+
+ <!-- Chapter Wrapper -->
+ <div id="chapter" class="chapter{@class}">
- <!-- Chapter Title -->
- <h2>
+ <!-- Chapter Title -->
+ <h2 id="{@id}" class="{@class}">
<xsl:value-of select="concat('Chapter ',chapter_id,' - ',title)"/>
</h2>
- <!-- Chapter Info -->
- <div id="chapter">
+ <!-- Chapter Info -->
<xsl:apply-templates select="*[name()!='section']"/>
<xsl:apply-templates select="section"/>
- </div>
+ </div>
<!-- Navigation -->
<a class="previous_page" href="{prev_url}"><![CDATA[<-previous]]></a>
<!-- Section -->
<xsl:template match="/chapter/section">
-
- <!-- Section Title -->
- <h3 id="{@id}">
- <xsl:value-of select="concat(position(),'. ',title)"/>
- </h3>
-
- <!-- Section Paragraphs -->
+ <!-- Section Wrapper -->
+ <div class="section{@class}">
+
+ <!-- Section Title -->
+ <xsl:choose>
+ <xsl:when test="@class='index'">
+ <h3 id="{@id}" class="{@class}">
+ <xsl:value-of select="title"/>
+ </h3>
+ </xsl:when>
+ <xsl:otherwise>
+ <h3 id="{@id}" class="{@class}">
+ <xsl:value-of select="concat(position(),'. ',title)"/>
+ </h3>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <!-- Section Paragraphs -->
<xsl:apply-templates select="*"/>
+ </div>
</xsl:template>
<!-- Section paragraph -->