Mercurial > hg > nginx-site
annotate xslt/content.xslt @ 1017:9f9a427a73eb
Fixed broken links to chinese versions of some modules.
The chinese version contains untranslated copies of english documentation for
random_index and realip modules. The result is the appearance of 'translation
to chinese' link for this modules pointing to non-existing document. This
files are removed.
Also, broken links are generated for the chinese version of the "flv" module,
but the translation exists, although not enabled for publication. Since
contents of file looks like a valid translation, it is allowed to be published.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Mon, 18 Nov 2013 12:48:10 +0400 |
parents | cd73f6e9aaf3 |
children | c454373427ef |
rev | line source |
---|---|
170 | 1 <?xml version="1.0" encoding="utf-8"?> |
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | |
3 | |
4 <xsl:template match="section[@id and @name]"> | |
5 | |
6 <a name="{@id}"/> | |
7 <center> | |
8 <h4> | |
9 <xsl:value-of select="@name"/> | |
10 </h4> | |
11 </center> | |
12 | |
13 <xsl:apply-templates/> | |
14 </xsl:template> | |
15 | |
608 | 16 <xsl:template match="section/section[@id and @name]"> |
17 | |
18 <a name="{@id}"/> | |
19 <center> | |
20 <h5> | |
21 <xsl:value-of select="@name"/> | |
22 </h5> | |
23 </center> | |
24 | |
25 <xsl:apply-templates/> | |
26 </xsl:template> | |
27 | |
170 | 28 <xsl:template match="section[@id and not(@name)]"> |
29 | |
30 <a name="{@id}"/> | |
31 | |
32 <xsl:apply-templates/> | |
33 </xsl:template> | |
34 | |
35 <xsl:template match="section[not(@id) and @name]"> | |
36 | |
37 <center> | |
38 <h4> | |
39 <xsl:value-of select="@name"/> | |
40 </h4> | |
41 </center> | |
42 | |
43 <xsl:apply-templates/> | |
44 </xsl:template> | |
45 | |
608 | 46 <xsl:template match="section/section[not(@id) and @name]"> |
47 | |
48 <center> | |
49 <h5> | |
50 <xsl:value-of select="@name"/> | |
51 </h5> | |
52 </center> | |
53 | |
54 <xsl:apply-templates/> | |
55 </xsl:template> | |
56 | |
170 | 57 <xsl:template match="para"> |
58 <p> | |
59 <xsl:apply-templates/> | |
60 </p> | |
61 </xsl:template> | |
62 | |
63 <xsl:template match="para[@align]"> | |
64 <p align="{@align}"> | |
65 <xsl:apply-templates/> | |
66 </p> | |
67 </xsl:template> | |
68 | |
69 <xsl:template match="initial"> | |
70 <span class="initial"> | |
71 <b> | |
72 <xsl:apply-templates/> | |
73 </b> | |
74 </span> | |
75 </xsl:template> | |
76 | |
77 <xsl:template match="programlisting"> | |
355 | 78 <blockquote class="example"> |
170 | 79 <pre> |
80 <xsl:apply-templates/> | |
81 </pre> | |
82 </blockquote> | |
83 </xsl:template> | |
84 | |
85 <xsl:template match="para/programlisting"> | |
86 | |
87 <xsl:text disable-output-escaping="yes"></p> </xsl:text> | |
88 | |
355 | 89 <blockquote class="example"> |
170 | 90 <pre> |
91 <xsl:apply-templates/> | |
92 </pre> | |
93 </blockquote> | |
94 | |
95 <xsl:text disable-output-escaping="yes"><p> </xsl:text> | |
96 </xsl:template> | |
97 | |
98 <xsl:template match="note"> | |
99 <blockquote class="note"> | |
100 <xsl:apply-templates/> | |
101 </blockquote> | |
102 </xsl:template> | |
103 | |
104 <xsl:template match="para/note"> | |
105 | |
106 <xsl:text disable-output-escaping="yes"></p> </xsl:text> | |
107 | |
108 <blockquote class="note"> | |
109 <xsl:apply-templates/> | |
110 </blockquote> | |
111 | |
112 <xsl:text disable-output-escaping="yes"><p> </xsl:text> | |
113 </xsl:template> | |
114 | |
474 | 115 <xsl:template match="list[@type='bullet']"> |
116 <xsl:choose> | |
117 | |
118 <xsl:when test="@compact = 'yes'"> | |
119 | |
120 <ul class="compact"> | |
121 <xsl:apply-templates/> | |
122 </ul> | |
123 </xsl:when> | |
124 | |
125 <xsl:otherwise> | |
126 | |
127 <ul> | |
128 <xsl:apply-templates/> | |
129 </ul> | |
130 </xsl:otherwise> | |
131 </xsl:choose> | |
170 | 132 </xsl:template> |
133 | |
134 <xsl:template match="para/list[@type='bullet']"> | |
135 | |
136 <xsl:text disable-output-escaping="yes"></p> </xsl:text> | |
474 | 137 <xsl:choose> |
170 | 138 |
474 | 139 <xsl:when test="@compact = 'yes'"> |
140 | |
141 <ul class="compact"> | |
142 <xsl:apply-templates/> | |
143 </ul> | |
144 </xsl:when> | |
145 | |
146 <xsl:otherwise> | |
147 | |
148 <ul> | |
149 <xsl:apply-templates/> | |
150 </ul> | |
151 </xsl:otherwise> | |
152 </xsl:choose> | |
170 | 153 |
154 <xsl:text disable-output-escaping="yes"><p> </xsl:text> | |
155 </xsl:template> | |
156 | |
474 | 157 <xsl:template match="list[@type='enum']"> |
158 <xsl:choose> | |
159 | |
160 <xsl:when test="@compact = 'yes'"> | |
161 | |
162 <ol class="compact"> | |
163 <xsl:apply-templates/> | |
164 </ol> | |
165 </xsl:when> | |
166 | |
167 <xsl:otherwise> | |
168 | |
169 <ol> | |
170 <xsl:apply-templates/> | |
171 </ol> | |
172 </xsl:otherwise> | |
173 </xsl:choose> | |
170 | 174 </xsl:template> |
175 | |
176 <xsl:template match="para/list[@type='enum']"> | |
177 | |
178 <xsl:text disable-output-escaping="yes"></p> </xsl:text> | |
474 | 179 <xsl:choose> |
170 | 180 |
474 | 181 <xsl:when test="@compact = 'yes'"> |
182 | |
183 <ol class="compact"> | |
184 <xsl:apply-templates/> | |
185 </ol> | |
186 </xsl:when> | |
187 | |
188 <xsl:otherwise> | |
189 | |
190 <ol> | |
191 <xsl:apply-templates/> | |
192 </ol> | |
193 </xsl:otherwise> | |
194 </xsl:choose> | |
170 | 195 |
196 <xsl:text disable-output-escaping="yes"><p> </xsl:text> | |
197 </xsl:template> | |
198 | |
759 | 199 <xsl:template match="listitem"> |
754 | 200 <li> |
201 <xsl:apply-templates/> | |
202 </li> | |
203 </xsl:template> | |
204 | |
759 | 205 <xsl:template match="listitem[@id]"> |
206 <li id="{@id}"> | |
170 | 207 <xsl:apply-templates/> |
208 </li> | |
209 </xsl:template> | |
210 | |
497 | 211 <xsl:template match="list[@type='tag']"> |
212 <xsl:choose> | |
213 | |
214 <xsl:when test="@compact = 'yes'"> | |
215 | |
216 <dl class="compact"> | |
217 <xsl:apply-templates/> | |
218 </dl> | |
219 </xsl:when> | |
220 | |
221 <xsl:otherwise> | |
222 | |
223 <dl> | |
224 <xsl:apply-templates/> | |
225 </dl> | |
226 </xsl:otherwise> | |
227 </xsl:choose> | |
170 | 228 </xsl:template> |
229 | |
230 <xsl:template match="para/list[@type='tag']"> | |
231 | |
232 <xsl:text disable-output-escaping="yes"></p> </xsl:text> | |
497 | 233 <xsl:choose> |
170 | 234 |
497 | 235 <xsl:when test="@compact = 'yes'"> |
236 | |
237 <dl class="compact"> | |
238 <xsl:apply-templates/> | |
239 </dl> | |
240 </xsl:when> | |
241 | |
242 <xsl:otherwise> | |
243 | |
244 <dl> | |
245 <xsl:apply-templates/> | |
246 </dl> | |
247 </xsl:otherwise> | |
248 </xsl:choose> | |
170 | 249 |
250 <xsl:text disable-output-escaping="yes"><p> </xsl:text> | |
251 </xsl:template> | |
252 | |
253 <xsl:template match="tag-name"> | |
254 <dt> | |
255 <xsl:apply-templates/> | |
256 </dt> | |
257 </xsl:template> | |
258 | |
759 | 259 <xsl:template match="tag-name[@id]"> |
260 <dt id="{@id}"> | |
261 <xsl:apply-templates/> | |
262 </dt> | |
263 </xsl:template> | |
264 | |
170 | 265 <xsl:template match="tag-desc"> |
266 <dd> | |
267 <xsl:apply-templates/> | |
268 </dd> | |
269 </xsl:template> | |
270 | |
271 <xsl:template match="table[@note and @width]"> | |
272 | |
273 <blockquote> | |
274 <table width="{@width}"> | |
275 <xsl:apply-templates/> | |
276 </table> | |
277 </blockquote> | |
278 </xsl:template> | |
279 | |
280 <xsl:template match="table[@note and not(@width)]"> | |
281 | |
282 <blockquote> | |
283 <table width="100%"> | |
284 <xsl:apply-templates/> | |
285 </table> | |
286 </blockquote> | |
287 </xsl:template> | |
288 | |
289 <xsl:template match="table[not(@note) and @width]"> | |
290 | |
291 <table width="{@width}"> | |
292 <xsl:apply-templates/> | |
293 </table> | |
294 </xsl:template> | |
295 | |
778
cd73f6e9aaf3
Donation page refactored: multi-column layout, donated sums ranges.
Maxim Konovalov <maxim@nginx.com>
parents:
759
diff
changeset
|
296 <xsl:template match="table"> |
cd73f6e9aaf3
Donation page refactored: multi-column layout, donated sums ranges.
Maxim Konovalov <maxim@nginx.com>
parents:
759
diff
changeset
|
297 |
170 | 298 <table width="100%"> |
778
cd73f6e9aaf3
Donation page refactored: multi-column layout, donated sums ranges.
Maxim Konovalov <maxim@nginx.com>
parents:
759
diff
changeset
|
299 |
cd73f6e9aaf3
Donation page refactored: multi-column layout, donated sums ranges.
Maxim Konovalov <maxim@nginx.com>
parents:
759
diff
changeset
|
300 <xsl:if test="@class"> |
cd73f6e9aaf3
Donation page refactored: multi-column layout, donated sums ranges.
Maxim Konovalov <maxim@nginx.com>
parents:
759
diff
changeset
|
301 |
cd73f6e9aaf3
Donation page refactored: multi-column layout, donated sums ranges.
Maxim Konovalov <maxim@nginx.com>
parents:
759
diff
changeset
|
302 <xsl:attribute name="class"> |
cd73f6e9aaf3
Donation page refactored: multi-column layout, donated sums ranges.
Maxim Konovalov <maxim@nginx.com>
parents:
759
diff
changeset
|
303 <xsl:value-of select="@class"/> |
cd73f6e9aaf3
Donation page refactored: multi-column layout, donated sums ranges.
Maxim Konovalov <maxim@nginx.com>
parents:
759
diff
changeset
|
304 </xsl:attribute> |
cd73f6e9aaf3
Donation page refactored: multi-column layout, donated sums ranges.
Maxim Konovalov <maxim@nginx.com>
parents:
759
diff
changeset
|
305 </xsl:if> |
cd73f6e9aaf3
Donation page refactored: multi-column layout, donated sums ranges.
Maxim Konovalov <maxim@nginx.com>
parents:
759
diff
changeset
|
306 |
170 | 307 <xsl:apply-templates/> |
778
cd73f6e9aaf3
Donation page refactored: multi-column layout, donated sums ranges.
Maxim Konovalov <maxim@nginx.com>
parents:
759
diff
changeset
|
308 |
170 | 309 </table> |
310 </xsl:template> | |
311 | |
312 <xsl:template match="tr"> | |
313 <tr> | |
314 <xsl:apply-templates/> | |
315 </tr> | |
316 </xsl:template> | |
317 | |
318 <xsl:template match="td[@width]"> | |
319 <td width="{@width}"> | |
320 <xsl:apply-templates/> | |
321 </td> | |
322 </xsl:template> | |
323 | |
324 <xsl:template match="td"> | |
325 <td> | |
326 <xsl:apply-templates/> | |
327 </td> | |
328 </xsl:template> | |
329 | |
330 <xsl:template match="c-def"> | |
331 <code> | |
332 <xsl:apply-templates/> | |
333 </code> | |
334 </xsl:template> | |
335 | |
336 <xsl:template match="c-func"> | |
337 <code> | |
338 <xsl:apply-templates/> | |
339 <xsl:text>()</xsl:text> | |
340 </code> | |
341 </xsl:template> | |
342 | |
343 <xsl:template match="command"> | |
344 <code> | |
345 <xsl:apply-templates/> | |
346 </code> | |
347 </xsl:template> | |
348 | |
349 <xsl:template match="emphasis"> | |
350 <strong> | |
351 <xsl:apply-templates/> | |
352 </strong> | |
353 </xsl:template> | |
354 | |
355 <xsl:template match="example"> | |
355 | 356 <blockquote class="example"> |
170 | 357 <pre> |
358 <xsl:apply-templates/> | |
359 </pre> | |
360 </blockquote> | |
361 </xsl:template> | |
362 | |
363 <xsl:template match="para/example"> | |
364 | |
365 <xsl:text disable-output-escaping="yes"></p> </xsl:text> | |
366 | |
355 | 367 <blockquote class="example"> |
170 | 368 <pre> |
369 <xsl:apply-templates/> | |
370 </pre> | |
371 </blockquote> | |
372 | |
373 <xsl:text disable-output-escaping="yes"><p> </xsl:text> | |
374 </xsl:template> | |
375 | |
272 | 376 <xsl:template match="literal"> |
170 | 377 <code> |
378 <xsl:apply-templates/> | |
379 </code> | |
380 </xsl:template> | |
381 | |
382 <xsl:template match="header"> | |
383 | |
384 <xsl:text>“</xsl:text> | |
385 <xsl:apply-templates/> | |
386 <xsl:text>”</xsl:text> | |
387 </xsl:template> | |
388 | |
389 <xsl:template match="http-status"> | |
390 | |
391 <xsl:value-of select="@code"/> | |
392 <xsl:text> (</xsl:text> | |
393 <xsl:value-of select="@text"/> | |
394 <xsl:text>)</xsl:text> | |
395 </xsl:template> | |
396 | |
397 <xsl:template match="value"> | |
398 <code> | |
272 | 399 <i> |
400 <xsl:apply-templates/> | |
401 </i> | |
170 | 402 </code> |
403 </xsl:template> | |
404 | |
405 <xsl:template match="registered"> | |
406 <xsl:apply-templates/> | |
407 <sup> | |
408 <xsl:text>®</xsl:text> | |
409 </sup> | |
410 </xsl:template> | |
411 | |
412 <xsl:template match="var"> | |
413 <code> | |
414 <xsl:apply-templates/> | |
415 </code> | |
416 </xsl:template> | |
417 | |
418 <xsl:template match="path"> | |
419 <code> | |
420 <xsl:apply-templates/> | |
421 </code> | |
422 </xsl:template> | |
423 | |
424 <xsl:template match="i"> | |
425 <i> | |
426 <xsl:apply-templates/> | |
427 </i> | |
428 </xsl:template> | |
429 | |
430 <xsl:template match="b"> | |
431 <b> | |
432 <xsl:apply-templates/> | |
433 </b> | |
434 </xsl:template> | |
435 | |
436 <xsl:template match="nobr"> | |
437 <nobr> | |
438 <xsl:apply-templates/> | |
439 </nobr> | |
440 </xsl:template> | |
441 | |
442 <xsl:template match="br"> | |
443 <br/> | |
444 </xsl:template> | |
445 | |
446 </xsl:stylesheet> |