1 | <?xml version='1.0' encoding='ISO-8859-1'?>
|
---|
2 |
|
---|
3 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
4 | xmlns="http://www.w3.org/1999/xhtml"
|
---|
5 | version="1.0">
|
---|
6 |
|
---|
7 | <!-- This stylesheet controls how preface, chapter, and sections are handled -->
|
---|
8 |
|
---|
9 | <!-- Chunk the first top-level section? 1 = yes, 0 = no
|
---|
10 | If preface and chapters TOC are generated, this must be 1. -->
|
---|
11 | <xsl:param name="chunk.first.sections" select="1"/>
|
---|
12 |
|
---|
13 | <!-- preface:
|
---|
14 | Output non sect1 child elements before the TOC -->
|
---|
15 | <!-- The original template is in {docbook-xsl}/xhtml/components.xsl -->
|
---|
16 | <xsl:template match="preface">
|
---|
17 | <xsl:call-template name="id.warning"/>
|
---|
18 | <div>
|
---|
19 | <xsl:apply-templates select="." mode="class.attribute"/>
|
---|
20 | <xsl:call-template name="dir">
|
---|
21 | <xsl:with-param name="inherit" select="1"/>
|
---|
22 | </xsl:call-template>
|
---|
23 | <xsl:call-template name="language.attribute"/>
|
---|
24 | <xsl:if test="$generate.id.attributes != 0">
|
---|
25 | <xsl:attribute name="id">
|
---|
26 | <xsl:call-template name="object.id"/>
|
---|
27 | </xsl:attribute>
|
---|
28 | </xsl:if>
|
---|
29 | <xsl:call-template name="component.separator"/>
|
---|
30 | <xsl:call-template name="preface.titlepage"/>
|
---|
31 | <xsl:apply-templates/>
|
---|
32 | <xsl:variable name="toc.params">
|
---|
33 | <xsl:call-template name="find.path.params">
|
---|
34 | <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
|
---|
35 | </xsl:call-template>
|
---|
36 | </xsl:variable>
|
---|
37 | <xsl:if test="contains($toc.params, 'toc')">
|
---|
38 | <xsl:call-template name="component.toc">
|
---|
39 | <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
|
---|
40 | </xsl:call-template>
|
---|
41 | <xsl:call-template name="component.toc.separator"/>
|
---|
42 | </xsl:if>
|
---|
43 | <xsl:call-template name="process.footnotes"/>
|
---|
44 | </div>
|
---|
45 | </xsl:template>
|
---|
46 |
|
---|
47 | <!-- chapter:
|
---|
48 | Output non sect1 child elements before the TOC -->
|
---|
49 | <!-- The original template is in {docbook-xsl}/xhtml/components.xsl -->
|
---|
50 | <xsl:template match="chapter">
|
---|
51 | <xsl:call-template name="id.warning"/>
|
---|
52 | <div>
|
---|
53 | <xsl:apply-templates select="." mode="class.attribute"/>
|
---|
54 | <xsl:call-template name="dir">
|
---|
55 | <xsl:with-param name="inherit" select="1"/>
|
---|
56 | </xsl:call-template>
|
---|
57 | <xsl:call-template name="language.attribute"/>
|
---|
58 | <xsl:if test="$generate.id.attributes != 0">
|
---|
59 | <xsl:attribute name="id">
|
---|
60 | <xsl:call-template name="object.id"/>
|
---|
61 | </xsl:attribute>
|
---|
62 | </xsl:if>
|
---|
63 | <xsl:call-template name="component.separator"/>
|
---|
64 | <xsl:call-template name="chapter.titlepage"/>
|
---|
65 | <xsl:apply-templates/>
|
---|
66 | <xsl:variable name="toc.params">
|
---|
67 | <xsl:call-template name="find.path.params">
|
---|
68 | <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
|
---|
69 | </xsl:call-template>
|
---|
70 | </xsl:variable>
|
---|
71 | <xsl:if test="contains($toc.params, 'toc')">
|
---|
72 | <xsl:call-template name="component.toc">
|
---|
73 | <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
|
---|
74 | </xsl:call-template>
|
---|
75 | <xsl:call-template name="component.toc.separator"/>
|
---|
76 | </xsl:if>
|
---|
77 | <xsl:call-template name="process.footnotes"/>
|
---|
78 | </div>
|
---|
79 | </xsl:template>
|
---|
80 |
|
---|
81 | <!-- sect1:
|
---|
82 | When there is a role attibute, use it as the class value.
|
---|