blob: 6943ba180de32ef3da302535f25276decc1f9a82 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
<?xml version='1.0'?><!-- -*- Mode: fundamental; tab-width: 3 -*- -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- ======================================================================= -->
<xsl:template match="
appendix | article | book | bibliography | chapter |
colophon | glossary | index | part | preface |
reference | refsect1 | refsect2 | refsect3 | refsection |
sect1 | sect2 | sect3 | sect4 | sect5 |
section | set | setindex | simplesect ">
<xsl:param name="depth_chunk">
<xsl:call-template name="depth.chunk"/>
</xsl:param>
<xsl:param name="depth_in_chunk">
<xsl:call-template name="depth.in.chunk"/>
</xsl:param>
<div class="{name(.)}">
<xsl:call-template name="anchor"/>
<xsl:choose>
<xsl:when test="$depth_chunk < $chunk_depth">
<xsl:apply-templates mode="sans.divisions.mode">
<xsl:with-param name="depth_chunk" select="$depth_chunk"/>
<xsl:with-param name="depth_in_chunk" select="$depth_in_chunk + 1"/>
</xsl:apply-templates>
<xsl:call-template name="toc"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates>
<xsl:with-param name="depth_chunk" select="$depth_chunk"/>
<xsl:with-param name="depth_in_chunk" select="$depth_in_chunk + 1"/>
</xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:template>
<xsl:template match="refentry">
<xsl:param name="depth_chunk">
<xsl:call-template name="depth.chunk"/>
</xsl:param>
<xsl:param name="depth_in_chunk">
<xsl:call-template name="depth_in_chunk"/>
</xsl:param>
<xsl:if test="preceding-sibling::refentry and $depth > 0">
<hr class="refentry.seperator"/>
</xsl:if>
<div class="{name(.)}">
<xsl:choose>
<xsl:when test="$depth_chunk <= $chunk_depth">
<xsl:apply-templates mode="sans.divisions.mode">
<xsl:with-param name="depth_chunk" select="$depth_chunk"/>
<xsl:with-param name="depth_in_chunk" select="$depth_in_chunk + 1"/>
</xsl:apply-templates>
<xsl:call-template name="toc"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates>
<xsl:with-param name="depth_chunk" select="$depth_chunk"/>
<xsl:with-param name="depth_in_chunk" select="$depth_in_chunk + 1"/>
</xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:template>
<!-- == sans.divisions.mode =============================================== -->
<xsl:template mode="sans.divisions.mode" match="
appendix | article | book | bibliography | chapter |
colophon | glossary | index | part | preface |
reference | refentry | refsect1 | refsect2 | refsect3 |
refsection | sect1 | sect2 | sect3 | sect4 |
sect5 | section | set | setindex | simplesect"/>
<xsl:template mode="sans.divisions.mode" match="
appendixinfo | articleinfo | bibliographyinfo |
bookinfo | chapterinfo | glossaryinfo |
indexinfo | partinfo | prefaceinfo |
refentryinfo | referenceinfo | refsect1info |
refsect2info | refsect3info | refsectioninfo |
sect1info | sect2info | sect3info |
sect4info | sect5info | sectioninfo |
setinfo | setindexinfo "/>
<xsl:template mode="sans.divisions.mode" match="*">
<xsl:apply-templates select="."/>
</xsl:template>
<!-- ======================================================================= -->
</xsl:stylesheet>
|