|
1 | | -<?xml version='1.0'?> |
2 | | -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
3 | | - version='1.0'> |
4 | | - |
5 | | -<!-- ******************************************************************** |
6 | | - $Id: division.xsl,v 1.1 2003/03/27 23:07:20 turin42 Exp $ |
7 | | - ******************************************************************** |
8 | | -
|
9 | | - This file is part of the XSL DocBook Stylesheet distribution. |
10 | | - See ../README or http://nwalsh.com/docbook/xsl/ for copyright |
11 | | - and other information. |
12 | | -
|
13 | | - ******************************************************************** --> |
14 | | - |
15 | | -<!-- ==================================================================== --> |
16 | | - |
17 | | -<xsl:template match="set"> |
18 | | - <div class="{name(.)}"> |
19 | | - <xsl:call-template name="language.attribute"/> |
20 | | - <xsl:if test="$generate.id.attributes != 0"> |
21 | | - <xsl:attribute name="id"> |
22 | | - <xsl:call-template name="object.id"/> |
23 | | - </xsl:attribute> |
24 | | - </xsl:if> |
25 | | - |
26 | | - <xsl:call-template name="set.titlepage"/> |
27 | | - |
28 | | - <xsl:call-template name="make.lots"> |
29 | | - <xsl:with-param name="toc.params"> |
30 | | - <xsl:call-template name="find.path.params"> |
31 | | - <xsl:with-param name="table" select="normalize-space($generate.toc)"/> |
32 | | - </xsl:call-template> |
33 | | - </xsl:with-param> |
34 | | - <xsl:with-param name="toc"> |
35 | | - <xsl:call-template name="set.toc"/> |
36 | | - </xsl:with-param> |
37 | | - </xsl:call-template> |
38 | | - |
39 | | - <xsl:apply-templates/> |
40 | | - </div> |
41 | | -</xsl:template> |
42 | | - |
43 | | -<xsl:template match="set/setinfo"></xsl:template> |
44 | | -<xsl:template match="set/title"></xsl:template> |
45 | | -<xsl:template match="set/titleabbrev"></xsl:template> |
46 | | -<xsl:template match="set/subtitle"></xsl:template> |
47 | | - |
48 | | -<!-- ==================================================================== --> |
49 | | - |
50 | | -<xsl:template match="book"> |
51 | | - <div class="{name(.)}"> |
52 | | - <xsl:call-template name="language.attribute"/> |
53 | | - <xsl:if test="$generate.id.attributes != 0"> |
54 | | - <xsl:attribute name="id"> |
55 | | - <xsl:call-template name="object.id"/> |
56 | | - </xsl:attribute> |
57 | | - </xsl:if> |
58 | | - |
59 | | - <xsl:call-template name="book.titlepage"/> |
60 | | - |
61 | | - <xsl:apply-templates select="dedication" mode="dedication"/> |
62 | | - |
63 | | - <xsl:call-template name="make.lots"> |
64 | | - <xsl:with-param name="toc.params"> |
65 | | - <xsl:call-template name="find.path.params"> |
66 | | - <xsl:with-param name="table" select="normalize-space($generate.toc)"/> |
67 | | - </xsl:call-template> |
68 | | - </xsl:with-param> |
69 | | - <xsl:with-param name="toc"> |
70 | | - <xsl:call-template name="division.toc"/> |
71 | | - </xsl:with-param> |
72 | | - </xsl:call-template> |
73 | | - |
74 | | - <xsl:apply-templates/> |
75 | | - </div> |
76 | | -</xsl:template> |
77 | | - |
78 | | -<xsl:template match="book/bookinfo"></xsl:template> |
79 | | -<xsl:template match="book/title"></xsl:template> |
80 | | -<xsl:template match="book/titleabbrev"></xsl:template> |
81 | | -<xsl:template match="book/subtitle"></xsl:template> |
82 | | - |
83 | | -<!-- ==================================================================== --> |
84 | | - |
85 | | -<xsl:template match="part"> |
86 | | - <div class="{name(.)}"> |
87 | | - <xsl:call-template name="language.attribute"/> |
88 | | - <xsl:if test="$generate.id.attributes != 0"> |
89 | | - <xsl:attribute name="id"> |
90 | | - <xsl:call-template name="object.id"/> |
91 | | - </xsl:attribute> |
92 | | - </xsl:if> |
93 | | - |
94 | | - <xsl:call-template name="part.titlepage"/> |
95 | | - |
96 | | - <xsl:variable name="toc.params"> |
97 | | - <xsl:call-template name="find.path.params"> |
98 | | - <xsl:with-param name="table" select="normalize-space($generate.toc)"/> |
99 | | - </xsl:call-template> |
100 | | - </xsl:variable> |
101 | | - <xsl:if test="not(partintro) and contains($toc.params, 'toc')"> |
102 | | - <xsl:call-template name="division.toc"/> |
103 | | - </xsl:if> |
104 | | - <xsl:apply-templates/> |
105 | | - </div> |
106 | | -</xsl:template> |
107 | | - |
108 | | -<xsl:template match="part" mode="make.part.toc"> |
109 | | - <xsl:call-template name="division.toc"/> |
110 | | -</xsl:template> |
111 | | - |
112 | | -<xsl:template match="reference" mode="make.part.toc"> |
113 | | - <xsl:call-template name="division.toc"/> |
114 | | -</xsl:template> |
115 | | - |
116 | | -<xsl:template match="part/docinfo"></xsl:template> |
117 | | -<xsl:template match="part/partinfo"></xsl:template> |
118 | | -<xsl:template match="part/title"></xsl:template> |
119 | | -<xsl:template match="part/titleabbrev"></xsl:template> |
120 | | -<xsl:template match="part/subtitle"></xsl:template> |
121 | | - |
122 | | -<xsl:template match="partintro"> |
123 | | - <div class="{name(.)}"> |
124 | | - <xsl:call-template name="language.attribute"/> |
125 | | - <xsl:if test="$generate.id.attributes != 0"> |
126 | | - <xsl:attribute name="id"> |
127 | | - <xsl:call-template name="object.id"/> |
128 | | - </xsl:attribute> |
129 | | - </xsl:if> |
130 | | - |
131 | | - <xsl:call-template name="partintro.titlepage"/> |
132 | | - <xsl:apply-templates/> |
133 | | - |
134 | | - <xsl:variable name="toc.params"> |
135 | | - <xsl:call-template name="find.path.params"> |
136 | | - <xsl:with-param name="node" select="parent::*"/> |
137 | | - <xsl:with-param name="table" select="normalize-space($generate.toc)"/> |
138 | | - </xsl:call-template> |
139 | | - </xsl:variable> |
140 | | - <xsl:if test="contains($toc.params, 'toc')"> |
141 | | - <!-- not ancestor::part because partintro appears in reference --> |
142 | | - <xsl:apply-templates select="parent::*" mode="make.part.toc"/> |
143 | | - </xsl:if> |
144 | | - <xsl:call-template name="process.footnotes"/> |
145 | | - </div> |
146 | | -</xsl:template> |
147 | | - |
148 | | -<xsl:template match="partintro/title"></xsl:template> |
149 | | -<xsl:template match="partintro/titleabbrev"></xsl:template> |
150 | | -<xsl:template match="partintro/subtitle"></xsl:template> |
151 | | - |
152 | | -<xsl:template match="partintro/title" mode="partintro.title.mode"> |
153 | | - <h2> |
154 | | - <xsl:apply-templates/> |
155 | | - </h2> |
156 | | -</xsl:template> |
157 | | - |
158 | | -<xsl:template match="partintro/subtitle" mode="partintro.title.mode"> |
159 | | - <h3> |
160 | | - <i><xsl:apply-templates/></i> |
161 | | - </h3> |
162 | | -</xsl:template> |
163 | | - |
164 | | -<!-- ==================================================================== --> |
165 | | - |
166 | | -<xsl:template match="book" mode="division.number"> |
167 | | - <xsl:number from="set" count="book" format="1."/> |
168 | | -</xsl:template> |
169 | | - |
170 | | -<xsl:template match="part" mode="division.number"> |
171 | | - <xsl:number from="book" count="part" format="I."/> |
172 | | -</xsl:template> |
173 | | - |
174 | | -</xsl:stylesheet> |
175 | | - |
| 1 | +<?xml version='1.0'?> |
| 2 | +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
| 3 | + version='1.0'> |
| 4 | + |
| 5 | +<!-- ******************************************************************** |
| 6 | + $Id: division.xsl,v 1.1 2003/03/27 23:07:20 turin42 Exp $ |
| 7 | + ******************************************************************** |
| 8 | +
|
| 9 | + This file is part of the XSL DocBook Stylesheet distribution. |
| 10 | + See ../README or http://nwalsh.com/docbook/xsl/ for copyright |
| 11 | + and other information. |
| 12 | +
|
| 13 | + ******************************************************************** --> |
| 14 | + |
| 15 | +<!-- ==================================================================== --> |
| 16 | + |
| 17 | +<xsl:template match="set"> |
| 18 | + <div class="{name(.)}"> |
| 19 | + <xsl:call-template name="language.attribute"/> |
| 20 | + <xsl:if test="$generate.id.attributes != 0"> |
| 21 | + <xsl:attribute name="id"> |
| 22 | + <xsl:call-template name="object.id"/> |
| 23 | + </xsl:attribute> |
| 24 | + </xsl:if> |
| 25 | + |
| 26 | + <xsl:call-template name="set.titlepage"/> |
| 27 | + |
| 28 | + <xsl:call-template name="make.lots"> |
| 29 | + <xsl:with-param name="toc.params"> |
| 30 | + <xsl:call-template name="find.path.params"> |
| 31 | + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> |
| 32 | + </xsl:call-template> |
| 33 | + </xsl:with-param> |
| 34 | + <xsl:with-param name="toc"> |
| 35 | + <xsl:call-template name="set.toc"/> |
| 36 | + </xsl:with-param> |
| 37 | + </xsl:call-template> |
| 38 | + |
| 39 | + <xsl:apply-templates/> |
| 40 | + </div> |
| 41 | +</xsl:template> |
| 42 | + |
| 43 | +<xsl:template match="set/setinfo"></xsl:template> |
| 44 | +<xsl:template match="set/title"></xsl:template> |
| 45 | +<xsl:template match="set/titleabbrev"></xsl:template> |
| 46 | +<xsl:template match="set/subtitle"></xsl:template> |
| 47 | + |
| 48 | +<!-- ==================================================================== --> |
| 49 | + |
| 50 | +<xsl:template match="book"> |
| 51 | + <div class="{name(.)}"> |
| 52 | + <xsl:call-template name="language.attribute"/> |
| 53 | + <xsl:if test="$generate.id.attributes != 0"> |
| 54 | + <xsl:attribute name="id"> |
| 55 | + <xsl:call-template name="object.id"/> |
| 56 | + </xsl:attribute> |
| 57 | + </xsl:if> |
| 58 | + |
| 59 | + <xsl:call-template name="book.titlepage"/> |
| 60 | + |
| 61 | + <xsl:apply-templates select="dedication" mode="dedication"/> |
| 62 | + |
| 63 | + <xsl:call-template name="make.lots"> |
| 64 | + <xsl:with-param name="toc.params"> |
| 65 | + <xsl:call-template name="find.path.params"> |
| 66 | + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> |
| 67 | + </xsl:call-template> |
| 68 | + </xsl:with-param> |
| 69 | + <xsl:with-param name="toc"> |
| 70 | + <xsl:call-template name="division.toc"/> |
| 71 | + </xsl:with-param> |
| 72 | + </xsl:call-template> |
| 73 | + |
| 74 | + <xsl:apply-templates/> |
| 75 | + </div> |
| 76 | +</xsl:template> |
| 77 | + |
| 78 | +<xsl:template match="book/bookinfo"></xsl:template> |
| 79 | +<xsl:template match="book/title"></xsl:template> |
| 80 | +<xsl:template match="book/titleabbrev"></xsl:template> |
| 81 | +<xsl:template match="book/subtitle"></xsl:template> |
| 82 | + |
| 83 | +<!-- ==================================================================== --> |
| 84 | + |
| 85 | +<xsl:template match="part"> |
| 86 | + <div class="{name(.)}"> |
| 87 | + <xsl:call-template name="language.attribute"/> |
| 88 | + <xsl:if test="$generate.id.attributes != 0"> |
| 89 | + <xsl:attribute name="id"> |
| 90 | + <xsl:call-template name="object.id"/> |
| 91 | + </xsl:attribute> |
| 92 | + </xsl:if> |
| 93 | + |
| 94 | + <xsl:call-template name="part.titlepage"/> |
| 95 | + |
| 96 | + <xsl:variable name="toc.params"> |
| 97 | + <xsl:call-template name="find.path.params"> |
| 98 | + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> |
| 99 | + </xsl:call-template> |
| 100 | + </xsl:variable> |
| 101 | + <xsl:if test="not(partintro) and contains($toc.params, 'toc')"> |
| 102 | + <xsl:call-template name="division.toc"/> |
| 103 | + </xsl:if> |
| 104 | + <xsl:apply-templates/> |
| 105 | + </div> |
| 106 | +</xsl:template> |
| 107 | + |
| 108 | +<xsl:template match="part" mode="make.part.toc"> |
| 109 | + <xsl:call-template name="division.toc"/> |
| 110 | +</xsl:template> |
| 111 | + |
| 112 | +<xsl:template match="reference" mode="make.part.toc"> |
| 113 | + <xsl:call-template name="division.toc"/> |
| 114 | +</xsl:template> |
| 115 | + |
| 116 | +<xsl:template match="part/docinfo"></xsl:template> |
| 117 | +<xsl:template match="part/partinfo"></xsl:template> |
| 118 | +<xsl:template match="part/title"></xsl:template> |
| 119 | +<xsl:template match="part/titleabbrev"></xsl:template> |
| 120 | +<xsl:template match="part/subtitle"></xsl:template> |
| 121 | + |
| 122 | +<xsl:template match="partintro"> |
| 123 | + <div class="{name(.)}"> |
| 124 | + <xsl:call-template name="language.attribute"/> |
| 125 | + <xsl:if test="$generate.id.attributes != 0"> |
| 126 | + <xsl:attribute name="id"> |
| 127 | + <xsl:call-template name="object.id"/> |
| 128 | + </xsl:attribute> |
| 129 | + </xsl:if> |
| 130 | + |
| 131 | + <xsl:call-template name="partintro.titlepage"/> |
| 132 | + <xsl:apply-templates/> |
| 133 | + |
| 134 | + <xsl:variable name="toc.params"> |
| 135 | + <xsl:call-template name="find.path.params"> |
| 136 | + <xsl:with-param name="node" select="parent::*"/> |
| 137 | + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> |
| 138 | + </xsl:call-template> |
| 139 | + </xsl:variable> |
| 140 | + <xsl:if test="contains($toc.params, 'toc')"> |
| 141 | + <!-- not ancestor::part because partintro appears in reference --> |
| 142 | + <xsl:apply-templates select="parent::*" mode="make.part.toc"/> |
| 143 | + </xsl:if> |
| 144 | + <xsl:call-template name="process.footnotes"/> |
| 145 | + </div> |
| 146 | +</xsl:template> |
| 147 | + |
| 148 | +<xsl:template match="partintro/title"></xsl:template> |
| 149 | +<xsl:template match="partintro/titleabbrev"></xsl:template> |
| 150 | +<xsl:template match="partintro/subtitle"></xsl:template> |
| 151 | + |
| 152 | +<xsl:template match="partintro/title" mode="partintro.title.mode"> |
| 153 | + <h2> |
| 154 | + <xsl:apply-templates/> |
| 155 | + </h2> |
| 156 | +</xsl:template> |
| 157 | + |
| 158 | +<xsl:template match="partintro/subtitle" mode="partintro.title.mode"> |
| 159 | + <h3> |
| 160 | + <i><xsl:apply-templates/></i> |
| 161 | + </h3> |
| 162 | +</xsl:template> |
| 163 | + |
| 164 | +<!-- ==================================================================== --> |
| 165 | + |
| 166 | +<xsl:template match="book" mode="division.number"> |
| 167 | + <xsl:number from="set" count="book" format="1."/> |
| 168 | +</xsl:template> |
| 169 | + |
| 170 | +<xsl:template match="part" mode="division.number"> |
| 171 | + <xsl:number from="book" count="part" format="I."/> |
| 172 | +</xsl:template> |
| 173 | + |
| 174 | +</xsl:stylesheet> |
| 175 | + |
0 commit comments