source: stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml-1_1/inline.xsl@ 67f507c

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 67f507c was 15c7d39, checked in by Matthew Burgess <matthew@…>, 11 years ago

Update stylesheets to docbook-xsl-1.78.1.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10355 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 49.6 KB
Line 
1<?xml version="1.0" encoding="ASCII"?><!--This file was created automatically by html2xhtml--><!--from the HTML stylesheets.--><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xlink suwl" version="1.0">
2
3<!-- ********************************************************************
4 $Id: inline.xsl 9663 2012-11-06 19:09:16Z bobstayton $
5 ********************************************************************
6
7 This file is part of the XSL DocBook Stylesheet distribution.
8 See ../README or http://docbook.sf.net/release/xsl/current/ for
9 copyright and other information.
10
11 ******************************************************************** -->
12
13<xsl:key name="glossentries" match="glossentry" use="normalize-space(glossterm)"/>
14<xsl:key name="glossentries" match="glossentry" use="normalize-space(glossterm/@baseform)"/>
15
16<xsl:template name="simple.xlink">
17 <xsl:param name="node" select="."/>
18 <xsl:param name="content">
19 <xsl:apply-templates/>
20 </xsl:param>
21 <xsl:param name="linkend" select="$node/@linkend"/>
22 <xsl:param name="xhref" select="$node/@xlink:href"/>
23
24 <!-- Support for @xlink:show -->
25 <xsl:variable name="target.show">
26 <xsl:choose>
27 <xsl:when test="$node/@xlink:show = 'new'">_blank</xsl:when>
28 <xsl:when test="$node/@xlink:show = 'replace'">_top</xsl:when>
29 <xsl:otherwise/>
30 </xsl:choose>
31 </xsl:variable>
32
33 <xsl:variable name="link">
34 <xsl:choose>
35 <xsl:when test="$xhref and (not($node/@xlink:type) or $node/@xlink:type='simple')">
36
37 <!-- Is it a local idref or a uri? -->
38 <xsl:variable name="is.idref">
39 <xsl:choose>
40 <!-- if the href starts with # and does not contain an "(" -->
41 <!-- or if the href starts with #xpointer(id(, it's just an ID -->
42 <xsl:when test="starts-with($xhref,'#') and (not(contains($xhref,'(')) or starts-with($xhref, '#xpointer(id('))">1</xsl:when>
43 <xsl:otherwise>0</xsl:otherwise>
44 </xsl:choose>
45 </xsl:variable>
46
47 <!-- Is it an olink ? -->
48 <xsl:variable name="is.olink">
49 <xsl:choose>
50 <!-- If xlink:role="http://docbook.org/xlink/role/olink" -->
51 <!-- and if the href contains # -->
52 <xsl:when test="contains($xhref,'#') and @xlink:role = $xolink.role">1</xsl:when>
53 <xsl:otherwise>0</xsl:otherwise>
54 </xsl:choose>
55 </xsl:variable>
56
57 <xsl:choose>
58 <xsl:when test="$is.olink = 1">
59 <xsl:call-template name="olink">
60 <xsl:with-param name="content" select="$content"/>
61 </xsl:call-template>
62 </xsl:when>
63
64 <xsl:when test="$is.idref = 1">
65
66 <xsl:variable name="idref">
67 <xsl:call-template name="xpointer.idref">
68 <xsl:with-param name="xpointer" select="$xhref"/>
69 </xsl:call-template>
70 </xsl:variable>
71
72 <xsl:variable name="targets" select="key('id',$idref)"/>
73 <xsl:variable name="target" select="$targets[1]"/>
74
75 <xsl:call-template name="check.id.unique">
76 <xsl:with-param name="linkend" select="$idref"/>
77 </xsl:call-template>
78
79 <xsl:choose>
80 <xsl:when test="count($target) = 0">
81 <xsl:message>
82 <xsl:text>XLink to nonexistent id: </xsl:text>
83 <xsl:value-of select="$idref"/>
84 </xsl:message>
85 <xsl:copy-of select="$content"/>
86 </xsl:when>
87
88 <xsl:otherwise>
89 <a>
90 <xsl:apply-templates select="." mode="common.html.attributes"/>
91 <xsl:call-template name="id.attribute"/>
92
93 <xsl:attribute name="href">
94 <xsl:call-template name="href.target">
95 <xsl:with-param name="object" select="$target"/>
96 </xsl:call-template>
97 </xsl:attribute>
98
99 <xsl:choose>
100 <xsl:when test="$node/@xlink:title">
101 <xsl:attribute name="title">
102 <xsl:value-of select="$node/@xlink:title"/>
103 </xsl:attribute>
104 </xsl:when>
105 <xsl:otherwise>
106 <xsl:apply-templates select="$target" mode="html.title.attribute"/>
107 </xsl:otherwise>
108 </xsl:choose>
109
110 <xsl:if test="$target.show !=''">
111 <xsl:attribute name="target">
112 <xsl:value-of select="$target.show"/>
113 </xsl:attribute>
114 </xsl:if>
115
116 <xsl:copy-of select="$content"/>
117
118 </a>
119 </xsl:otherwise>
120 </xsl:choose>
121 </xsl:when>
122
123 <!-- otherwise it's a URI -->
124 <xsl:otherwise>
125 <a>
126 <xsl:apply-templates select="." mode="common.html.attributes"/>
127 <xsl:call-template name="id.attribute"/>
128 <xsl:attribute name="href">
129 <xsl:value-of select="$xhref"/>
130 </xsl:attribute>
131 <xsl:if test="$node/@xlink:title">
132 <xsl:attribute name="title">
133 <xsl:value-of select="$node/@xlink:title"/>
134 </xsl:attribute>
135 </xsl:if>
136
137 <!-- For URIs, use @xlink:show if defined, otherwise use ulink.target -->
138 <xsl:choose>
139 <xsl:when test="$target.show !=''">
140 <xsl:attribute name="target">
141 <xsl:value-of select="$target.show"/>
142 </xsl:attribute>
143 </xsl:when>
144 <xsl:when test="$ulink.target !=''">
145 <xsl:attribute name="target">
146 <xsl:value-of select="$ulink.target"/>
147 </xsl:attribute>
148 </xsl:when>
149 </xsl:choose>
150
151 <xsl:copy-of select="$content"/>
152 </a>
153 </xsl:otherwise>
154 </xsl:choose>
155 </xsl:when>
156
157 <xsl:when test="$linkend">
158 <xsl:variable name="targets" select="key('id',$linkend)"/>
159 <xsl:variable name="target" select="$targets[1]"/>
160
161 <xsl:call-template name="check.id.unique">
162 <xsl:with-param name="linkend" select="$linkend"/>
163 </xsl:call-template>
164
165 <a>
166 <xsl:apply-templates select="." mode="common.html.attributes"/>
167 <xsl:call-template name="id.attribute"/>
168 <xsl:attribute name="href">
169 <xsl:call-template name="href.target">
170 <xsl:with-param name="object" select="$target"/>
171 </xsl:call-template>
172 </xsl:attribute>
173
174 <xsl:apply-templates select="$target" mode="html.title.attribute"/>
175
176 <xsl:copy-of select="$content"/>
177
178 </a>
179 </xsl:when>
180 <xsl:otherwise>
181 <xsl:copy-of select="$content"/>
182 </xsl:otherwise>
183 </xsl:choose>
184 </xsl:variable>
185
186 <xsl:choose>
187 <xsl:when test="function-available('suwl:unwrapLinks')">
188 <xsl:copy-of select="suwl:unwrapLinks($link)"/>
189 </xsl:when>
190 <xsl:otherwise>
191 <xsl:copy-of select="$link"/>
192 </xsl:otherwise>
193 </xsl:choose>
194</xsl:template>
195
196<xsl:template name="inline.charseq">
197 <xsl:param name="content">
198 <xsl:call-template name="anchor"/>
199 <xsl:call-template name="simple.xlink">
200 <xsl:with-param name="content">
201 <xsl:apply-templates/>
202 </xsl:with-param>
203 </xsl:call-template>
204 </xsl:param>
205 <!-- * if you want output from the inline.charseq template wrapped in -->
206 <!-- * something other than a Span, call the template with some value -->
207 <!-- * for the 'wrapper-name' param -->
208 <xsl:param name="wrapper-name">span</xsl:param>
209 <xsl:element name="{$wrapper-name}" namespace="http://www.w3.org/1999/xhtml">
210 <xsl:attribute name="class">
211 <xsl:value-of select="local-name(.)"/>
212 </xsl:attribute>
213 <xsl:call-template name="id.attribute"/>
214 <xsl:call-template name="dir"/>
215 <xsl:call-template name="generate.html.title"/>
216 <xsl:copy-of select="$content"/>
217 <xsl:call-template name="apply-annotations"/>
218 </xsl:element>
219</xsl:template>
220
221<xsl:template name="inline.monoseq">
222 <xsl:param name="content">
223 <xsl:call-template name="anchor"/>
224 <xsl:call-template name="simple.xlink">
225 <xsl:with-param name="content">
226 <xsl:apply-templates/>
227 </xsl:with-param>
228 </xsl:call-template>
229 </xsl:param>
230 <code>
231 <xsl:apply-templates select="." mode="common.html.attributes"/>
232 <xsl:call-template name="id.attribute"/>
233 <xsl:copy-of select="$content"/>
234 <xsl:call-template name="apply-annotations"/>
235 </code>
236</xsl:template>
237
238<xsl:template name="inline.boldseq">
239 <xsl:param name="content">
240 <xsl:call-template name="anchor"/>
241 <xsl:call-template name="simple.xlink">
242 <xsl:with-param name="content">
243 <xsl:apply-templates/>
244 </xsl:with-param>
245 </xsl:call-template>
246 </xsl:param>
247
248 <span>
249 <xsl:apply-templates select="." mode="common.html.attributes"/>
250 <xsl:call-template name="id.attribute"/>
251
252 <!-- don't put <strong> inside figure, example, or table titles -->
253 <xsl:choose>
254 <xsl:when test="local-name(..) = 'title' and (local-name(../..) = 'figure' or local-name(../..) = 'example' or local-name(../..) = 'table')">
255 <xsl:copy-of select="$content"/>
256 </xsl:when>
257 <xsl:otherwise>
258 <strong>
259 <xsl:copy-of select="$content"/>
260 </strong>
261 </xsl:otherwise>
262 </xsl:choose>
263 <xsl:call-template name="apply-annotations"/>
264 </span>
265</xsl:template>
266
267<xsl:template name="inline.italicseq">
268 <xsl:param name="content">
269 <xsl:call-template name="anchor"/>
270 <xsl:call-template name="simple.xlink">
271 <xsl:with-param name="content">
272 <xsl:apply-templates/>
273 </xsl:with-param>
274 </xsl:call-template>
275 </xsl:param>
276 <em>
277 <xsl:call-template name="common.html.attributes"/>
278 <xsl:call-template name="id.attribute"/>
279 <xsl:copy-of select="$content"/>
280 <xsl:call-template name="apply-annotations"/>
281 </em>
282</xsl:template>
283
284<xsl:template name="inline.boldmonoseq">
285 <xsl:param name="content">
286 <xsl:call-template name="anchor"/>
287 <xsl:call-template name="simple.xlink">
288 <xsl:with-param name="content">
289 <xsl:apply-templates/>
290 </xsl:with-param>
291 </xsl:call-template>
292 </xsl:param>
293 <!-- don't put <strong> inside figure, example, or table titles -->
294 <!-- or other titles that may already be represented with <strong>'s. -->
295 <xsl:choose>
296 <xsl:when test="local-name(..) = 'title' and (local-name(../..) = 'figure' or local-name(../..) = 'example' or local-name(../..) = 'table' or local-name(../..) = 'formalpara')">
297 <code>
298 <xsl:call-template name="common.html.attributes"/>
299 <xsl:call-template name="id.attribute"/>
300 <xsl:copy-of select="$content"/>
301 <xsl:call-template name="apply-annotations"/>
302 </code>
303 </xsl:when>
304 <xsl:otherwise>
305 <strong>
306 <xsl:call-template name="common.html.attributes"/>
307 <xsl:call-template name="id.attribute"/>
308 <code>
309 <xsl:call-template name="generate.html.title"/>
310 <xsl:call-template name="dir"/>
311 <xsl:copy-of select="$content"/>
312 </code>
313 <xsl:call-template name="apply-annotations"/>
314 </strong>
315 </xsl:otherwise>
316 </xsl:choose>
317</xsl:template>
318
319<xsl:template name="inline.italicmonoseq">
320 <xsl:param name="content">
321 <xsl:call-template name="anchor"/>
322 <xsl:call-template name="simple.xlink">
323 <xsl:with-param name="content">
324 <xsl:apply-templates/>
325 </xsl:with-param>
326 </xsl:call-template>
327 </xsl:param>
328 <em>
329 <xsl:call-template name="common.html.attributes"/>
330 <xsl:call-template name="id.attribute"/>
331 <code>
332 <xsl:call-template name="generate.html.title"/>
333 <xsl:call-template name="dir"/>
334 <xsl:copy-of select="$content"/>
335 <xsl:call-template name="apply-annotations"/>
336 </code>
337 </em>
338</xsl:template>
339
340<xsl:template name="inline.superscriptseq">
341 <xsl:param name="content">
342 <xsl:call-template name="anchor"/>
343 <xsl:call-template name="simple.xlink">
344 <xsl:with-param name="content">
345 <xsl:apply-templates/>
346 </xsl:with-param>
347 </xsl:call-template>
348 </xsl:param>
349 <sup>
350 <xsl:call-template name="generate.html.title"/>
351 <xsl:call-template name="id.attribute"/>
352 <xsl:call-template name="dir"/>
353 <xsl:copy-of select="$content"/>
354 <xsl:call-template name="apply-annotations"/>
355 </sup>
356</xsl:template>
357
358<xsl:template name="inline.subscriptseq">
359 <xsl:param name="content">
360 <xsl:call-template name="anchor"/>
361 <xsl:call-template name="simple.xlink">
362 <xsl:with-param name="content">
363 <xsl:apply-templates/>
364 </xsl:with-param>
365 </xsl:call-template>
366 </xsl:param>
367 <sub>
368 <xsl:call-template name="generate.html.title"/>
369 <xsl:call-template name="id.attribute"/>
370 <xsl:call-template name="dir"/>
371 <xsl:copy-of select="$content"/>
372 <xsl:call-template name="apply-annotations"/>
373 </sub>
374</xsl:template>
375
376<!-- ==================================================================== -->
377<!-- some special cases -->
378
379<xsl:template match="author">
380 <xsl:param name="content">
381 <xsl:call-template name="anchor"/>
382 <xsl:call-template name="simple.xlink">
383 <xsl:with-param name="content">
384 <xsl:call-template name="person.name"/>
385 </xsl:with-param>
386 </xsl:call-template>
387 <xsl:call-template name="apply-annotations"/>
388 </xsl:param>
389
390 <span>
391 <xsl:call-template name="common.html.attributes"/>
392 <xsl:call-template name="id.attribute"/>
393 <xsl:copy-of select="$content"/>
394 </span>
395</xsl:template>
396
397<xsl:template match="editor">
398 <xsl:param name="content">
399 <xsl:call-template name="anchor"/>
400 <xsl:call-template name="simple.xlink">
401 <xsl:with-param name="content">
402 <xsl:call-template name="person.name"/>
403 </xsl:with-param>
404 </xsl:call-template>
405 <xsl:call-template name="apply-annotations"/>
406 </xsl:param>
407
408 <span>
409 <xsl:call-template name="common.html.attributes"/>
410 <xsl:call-template name="id.attribute"/>
411 <xsl:copy-of select="$content"/>
412 </span>
413</xsl:template>
414
415<xsl:template match="othercredit">
416 <xsl:param name="content">
417 <xsl:call-template name="anchor"/>
418 <xsl:call-template name="simple.xlink">
419 <xsl:with-param name="content">
420 <xsl:call-template name="person.name"/>
421 </xsl:with-param>
422 </xsl:call-template>
423 <xsl:call-template name="apply-annotations"/>
424 </xsl:param>
425
426 <span>
427 <xsl:call-template name="common.html.attributes"/>
428 <xsl:call-template name="id.attribute"/>
429 <xsl:copy-of select="$content"/>
430 </span>
431</xsl:template>
432
433<xsl:template match="authorinitials">
434 <xsl:call-template name="inline.charseq"/>
435</xsl:template>
436
437<!-- ==================================================================== -->
438
439<xsl:template match="accel">
440 <xsl:call-template name="inline.charseq"/>
441</xsl:template>
442
443<xsl:template match="action">
444 <xsl:call-template name="inline.charseq"/>
445</xsl:template>
446
447<xsl:template match="application">
448 <xsl:call-template name="inline.charseq"/>
449</xsl:template>
450
451<xsl:template match="classname">
452 <xsl:call-template name="inline.monoseq"/>
453</xsl:template>
454
455<xsl:template match="exceptionname">
456 <xsl:call-template name="inline.monoseq"/>
457</xsl:template>
458
459<xsl:template match="interfacename">
460 <xsl:call-template name="inline.monoseq"/>
461</xsl:template>
462
463<xsl:template match="methodname">
464 <xsl:call-template name="inline.monoseq"/>
465</xsl:template>
466
467<xsl:template match="command">
468 <xsl:call-template name="inline.boldseq"/>
469</xsl:template>
470
471<xsl:template match="computeroutput">
472 <xsl:call-template name="inline.monoseq"/>
473</xsl:template>
474
475<xsl:template match="constant">
476 <xsl:call-template name="inline.monoseq"/>
477</xsl:template>
478
479<xsl:template match="database">
480 <xsl:call-template name="inline.charseq"/>
481</xsl:template>
482
483<xsl:template match="date">
484 <!-- should this support locale-specific formatting? how? -->
485 <xsl:call-template name="inline.charseq"/>
486</xsl:template>
487
488<xsl:template match="errorcode">
489 <xsl:call-template name="inline.charseq"/>
490</xsl:template>
491
492<xsl:template match="errorname">
493 <xsl:call-template name="inline.charseq"/>
494</xsl:template>
495
496<xsl:template match="errortype">
497 <xsl:call-template name="inline.charseq"/>
498</xsl:template>
499
500<xsl:template match="errortext">
501 <xsl:call-template name="inline.charseq"/>
502</xsl:template>
503
504<xsl:template match="envar">
505 <xsl:call-template name="inline.monoseq"/>
506</xsl:template>
507
508<xsl:template match="filename">
509 <xsl:call-template name="inline.monoseq"/>
510</xsl:template>
511
512<xsl:template match="function">
513 <xsl:choose>
514 <xsl:when test="$function.parens != '0' and (parameter or function or replaceable)">
515 <xsl:variable name="nodes" select="text()|*"/>
516 <xsl:call-template name="inline.monoseq">
517 <xsl:with-param name="content">
518 <xsl:call-template name="simple.xlink">
519 <xsl:with-param name="content">
520 <xsl:apply-templates select="$nodes[1]"/>
521 </xsl:with-param>
522 </xsl:call-template>
523 </xsl:with-param>
524 </xsl:call-template>
525 <xsl:text>(</xsl:text>
526 <xsl:apply-templates select="$nodes[position()&gt;1]"/>
527 <xsl:text>)</xsl:text>
528 </xsl:when>
529 <xsl:otherwise>
530 <xsl:call-template name="inline.monoseq"/>
531 </xsl:otherwise>
532 </xsl:choose>
533</xsl:template>
534
535<xsl:template match="function/parameter" priority="2">
536 <xsl:call-template name="inline.italicmonoseq"/>
537 <xsl:if test="$function.parens != 0 and following-sibling::*">
538 <xsl:text>, </xsl:text>
539 </xsl:if>
540</xsl:template>
541
542<xsl:template match="function/replaceable" priority="2">
543 <xsl:call-template name="inline.italicmonoseq"/>
544 <xsl:if test="$function.parens != 0 and following-sibling::*">
545 <xsl:text>, </xsl:text>
546 </xsl:if>
547</xsl:template>
548
549<xsl:template match="guibutton">
550 <xsl:call-template name="inline.charseq"/>
551</xsl:template>
552
553<xsl:template match="guiicon">
554 <xsl:call-template name="inline.charseq"/>
555</xsl:template>
556
557<xsl:template match="guilabel">
558 <xsl:call-template name="inline.charseq"/>
559</xsl:template>
560
561<xsl:template match="guimenu">
562 <xsl:call-template name="inline.charseq"/>
563</xsl:template>
564
565<xsl:template match="guimenuitem">
566 <xsl:call-template name="inline.charseq"/>
567</xsl:template>
568
569<xsl:template match="guisubmenu">
570 <xsl:call-template name="inline.charseq"/>
571</xsl:template>
572
573<xsl:template match="hardware">
574 <xsl:call-template name="inline.charseq"/>
575</xsl:template>
576
577<xsl:template match="interface">
578 <xsl:call-template name="inline.charseq"/>
579</xsl:template>
580
581<xsl:template match="interfacedefinition">
582 <xsl:call-template name="inline.charseq"/>
583</xsl:template>
584
585<xsl:template match="keycap">
586 <xsl:choose>
587 <xsl:when test="@function and normalize-space(.) = ''">
588 <xsl:call-template name="inline.boldseq">
589 <xsl:with-param name="content">
590 <xsl:call-template name="gentext.template">
591 <xsl:with-param name="context" select="'keycap'"/>
592 <xsl:with-param name="name" select="@function"/>
593 </xsl:call-template>
594 </xsl:with-param>
595 </xsl:call-template>
596 </xsl:when>
597 <xsl:otherwise>
598 <xsl:call-template name="inline.boldseq"/>
599 </xsl:otherwise>
600 </xsl:choose>
601</xsl:template>
602
603<xsl:template match="keycode">
604 <xsl:call-template name="inline.charseq"/>
605</xsl:template>
606
607<xsl:template match="keysym">
608 <xsl:call-template name="inline.charseq"/>
609</xsl:template>
610
611<xsl:template match="literal">
612 <xsl:call-template name="inline.monoseq"/>
613</xsl:template>
614
615<xsl:template match="code">
616 <xsl:call-template name="inline.monoseq"/>
617</xsl:template>
618
619<xsl:template match="medialabel">
620 <xsl:call-template name="inline.italicseq"/>
621</xsl:template>
622
623<xsl:template match="shortcut">
624 <xsl:call-template name="inline.boldseq"/>
625</xsl:template>
626
627<xsl:template match="mousebutton">
628 <xsl:call-template name="inline.charseq"/>
629</xsl:template>
630
631<xsl:template match="option">
632 <xsl:call-template name="inline.monoseq"/>
633</xsl:template>
634
635<xsl:template match="package">
636 <xsl:call-template name="inline.charseq"/>
637</xsl:template>
638
639<xsl:template match="parameter">
640 <xsl:call-template name="inline.italicmonoseq"/>
641</xsl:template>
642
643<xsl:template match="property">
644 <xsl:call-template name="inline.charseq"/>
645</xsl:template>
646
647<xsl:template match="prompt">
648 <xsl:call-template name="inline.monoseq"/>
649</xsl:template>
650
651<xsl:template match="replaceable" priority="1">
652 <xsl:call-template name="inline.italicmonoseq"/>
653</xsl:template>
654
655<xsl:template match="returnvalue">
656 <xsl:call-template name="inline.charseq"/>
657</xsl:template>
658
659<xsl:template match="structfield">
660 <xsl:call-template name="inline.italicmonoseq"/>
661</xsl:template>
662
663<xsl:template match="structname">
664 <xsl:call-template name="inline.charseq"/>
665</xsl:template>
666
667<xsl:template match="symbol">
668 <xsl:call-template name="inline.charseq"/>
669</xsl:template>
670
671<xsl:template match="systemitem">
672 <xsl:call-template name="inline.monoseq"/>
673</xsl:template>
674
675<xsl:template match="token">
676 <xsl:call-template name="inline.charseq"/>
677</xsl:template>
678
679<xsl:template match="type">
680 <xsl:call-template name="inline.charseq"/>
681</xsl:template>
682
683<xsl:template match="userinput">
684 <xsl:call-template name="inline.boldmonoseq"/>
685</xsl:template>
686
687<xsl:template match="abbrev">
688 <xsl:call-template name="inline.charseq">
689 <xsl:with-param name="wrapper-name">abbr</xsl:with-param>
690 </xsl:call-template>
691</xsl:template>
692
693<xsl:template match="acronym">
694 <xsl:call-template name="inline.charseq">
695 <xsl:with-param name="wrapper-name">acronym</xsl:with-param>
696 </xsl:call-template>
697</xsl:template>
698
699<xsl:template match="citerefentry">
700 <xsl:choose>
701 <xsl:when test="$citerefentry.link != '0'">
702 <a>
703 <xsl:apply-templates select="." mode="common.html.attributes"/>
704 <xsl:attribute name="href">
705 <xsl:call-template name="generate.citerefentry.link"/>
706 </xsl:attribute>
707 <xsl:call-template name="inline.charseq"/>
708 </a>
709 </xsl:when>
710 <xsl:otherwise>
711 <xsl:call-template name="inline.charseq"/>
712 </xsl:otherwise>
713 </xsl:choose>
714</xsl:template>
715
716<xsl:template name="generate.citerefentry.link">
717 <!-- nop -->
718</xsl:template>
719
720<xsl:template name="x.generate.citerefentry.link">
721 <xsl:text>http://example.com/cgi-bin/man.cgi?</xsl:text>
722 <xsl:value-of select="refentrytitle"/>
723 <xsl:text>(</xsl:text>
724 <xsl:value-of select="manvolnum"/>
725 <xsl:text>)</xsl:text>
726</xsl:template>
727
728<xsl:template match="citetitle">
729 <xsl:choose>
730 <xsl:when test="@pubwork = 'article'">
731 <xsl:call-template name="gentext.startquote"/>
732 <xsl:call-template name="inline.charseq"/>
733 <xsl:call-template name="gentext.endquote"/>
734 </xsl:when>
735 <xsl:otherwise>
736 <xsl:call-template name="inline.italicseq"/>
737 </xsl:otherwise>
738 </xsl:choose>
739</xsl:template>
740
741<xsl:template match="emphasis">
742 <span>
743 <xsl:call-template name="id.attribute"/>
744 <xsl:choose>
745 <!-- We don't want empty @class values, so do not propagate empty @roles -->
746 <xsl:when test="@role and normalize-space(@role) != '' and $emphasis.propagates.style != 0">
747 <xsl:apply-templates select="." mode="common.html.attributes">
748 <xsl:with-param name="class" select="@role"/>
749 </xsl:apply-templates>
750 </xsl:when>
751 <xsl:otherwise>
752 <xsl:apply-templates select="." mode="common.html.attributes"/>
753 </xsl:otherwise>
754 </xsl:choose>
755 <xsl:call-template name="anchor"/>
756
757 <xsl:call-template name="simple.xlink">
758 <xsl:with-param name="content">
759 <xsl:choose>
760 <xsl:when test="@role = 'bold' or @role='strong'">
761 <!-- backwards compatibility: make bold into b elements, but -->
762 <!-- don't put bold inside figure, example, or table titles -->
763 <xsl:choose>
764 <xsl:when test="local-name(..) = 'title' and (local-name(../..) = 'figure' or local-name(../..) = 'example' or local-name(../..) = 'table')">
765 <xsl:apply-templates/>
766 </xsl:when>
767 <xsl:otherwise>
768 <strong><xsl:apply-templates/></strong>
769 </xsl:otherwise>
770 </xsl:choose>
771 </xsl:when>
772 <xsl:when test="@role and $emphasis.propagates.style != 0">
773 <xsl:apply-templates/>
774 </xsl:when>
775 <xsl:otherwise>
776 <em><xsl:apply-templates/></em>
777 </xsl:otherwise>
778 </xsl:choose>
779 </xsl:with-param>
780 </xsl:call-template>
781 </span>
782</xsl:template>
783
784<xsl:template match="foreignphrase">
785 <span>
786 <xsl:apply-templates select="." mode="common.html.attributes"/>
787 <xsl:call-template name="inline.italicseq"/>
788 </span>
789</xsl:template>
790
791<xsl:template match="markup">
792 <xsl:call-template name="inline.charseq"/>
793</xsl:template>
794
795<xsl:template match="phrase">
796 <span>
797 <xsl:call-template name="id.attribute"/>
798 <xsl:call-template name="locale.html.attributes"/>
799 <!-- We don't want empty @class values, so do not propagate empty @roles -->
800 <xsl:choose>
801 <xsl:when test="@role and normalize-space(@role) != '' and $phrase.propagates.style != 0">
802 <xsl:apply-templates select="." mode="class.attribute">
803 <xsl:with-param name="class" select="@role"/>
804 </xsl:apply-templates>
805 </xsl:when>
806 <xsl:otherwise>
807 <xsl:apply-templates select="." mode="class.attribute"/>
808 </xsl:otherwise>
809 </xsl:choose>
810 <xsl:call-template name="dir"/>
811 <xsl:call-template name="anchor"/>
812 <xsl:call-template name="simple.xlink">
813 <xsl:with-param name="content">
814 <xsl:apply-templates/>
815 </xsl:with-param>
816 </xsl:call-template>
817 <xsl:call-template name="apply-annotations"/>
818 </span>
819</xsl:template>
820
821<xsl:template match="quote">
822 <xsl:variable name="depth">
823 <xsl:call-template name="dot.count">
824 <xsl:with-param name="string">
825 <xsl:number level="multiple"/>
826 </xsl:with-param>
827 </xsl:call-template>
828 </xsl:variable>
829 <span>
830 <xsl:apply-templates select="." mode="common.html.attributes"/>
831 <xsl:choose>
832 <xsl:when test="$depth mod 2 = 0">
833 <xsl:call-template name="gentext.startquote"/>
834 <xsl:call-template name="inline.charseq"/>
835 <xsl:call-template name="gentext.endquote"/>
836 </xsl:when>
837 <xsl:otherwise>
838 <xsl:call-template name="gentext.nestedstartquote"/>
839 <xsl:call-template name="inline.charseq"/>
840 <xsl:call-template name="gentext.nestedendquote"/>
841 </xsl:otherwise>
842 </xsl:choose>
843 </span>
844</xsl:template>
845
846<xsl:template match="varname">
847 <xsl:call-template name="inline.monoseq"/>
848</xsl:template>
849
850<xsl:template match="wordasword">
851 <xsl:call-template name="inline.italicseq"/>
852</xsl:template>
853
854<xsl:template match="lineannotation">
855 <em>
856 <xsl:apply-templates select="." mode="common.html.attributes"/>
857 <xsl:call-template name="inline.charseq"/>
858 </em>
859</xsl:template>
860
861<xsl:template match="superscript">
862 <xsl:call-template name="inline.superscriptseq"/>
863</xsl:template>
864
865<xsl:template match="subscript">
866 <xsl:call-template name="inline.subscriptseq"/>
867</xsl:template>
868
869<xsl:template match="trademark">
870 <xsl:call-template name="inline.charseq"/>
871 <xsl:choose>
872 <xsl:when test="@class = 'copyright' or @class = 'registered'">
873 <xsl:call-template name="dingbat">
874 <xsl:with-param name="dingbat" select="@class"/>
875 </xsl:call-template>
876 </xsl:when>
877 <xsl:when test="@class = 'service'">
878 <sup>SM</sup>
879 </xsl:when>
880 <xsl:otherwise>
881 <xsl:call-template name="dingbat">
882 <xsl:with-param name="dingbat" select="'trademark'"/>
883 </xsl:call-template>
884 </xsl:otherwise>
885 </xsl:choose>
886</xsl:template>
887
888<xsl:template match="firstterm">
889 <xsl:call-template name="glossterm">
890 <xsl:with-param name="firstterm" select="1"/>
891 </xsl:call-template>
892</xsl:template>
893
894<xsl:template match="glossterm" name="glossterm">
895 <xsl:param name="firstterm" select="0"/>
896
897 <!-- To avoid extra <a name=""> anchor from inline.italicseq -->
898 <xsl:variable name="content">
899 <xsl:apply-templates/>
900 </xsl:variable>
901
902 <xsl:choose>
903 <xsl:when test="($firstterm.only.link = 0 or $firstterm = 1) and @linkend">
904 <xsl:variable name="targets" select="key('id',@linkend)"/>
905 <xsl:variable name="target" select="$targets[1]"/>
906
907 <xsl:call-template name="check.id.unique">
908 <xsl:with-param name="linkend" select="@linkend"/>
909 </xsl:call-template>
910
911 <xsl:choose>
912 <xsl:when test="$target">
913 <a>
914 <xsl:apply-templates select="." mode="common.html.attributes"/>
915 <xsl:if test="@id or @xml:id">
916 <xsl:attribute name="id">
917 <xsl:value-of select="(@id|@xml:id)[1]"/>
918 </xsl:attribute>
919 </xsl:if>
920
921 <xsl:attribute name="href">
922 <xsl:call-template name="href.target">
923 <xsl:with-param name="object" select="$target"/>
924 </xsl:call-template>
925 </xsl:attribute>
926
927 <xsl:call-template name="inline.italicseq">
928 <xsl:with-param name="content" select="$content"/>
929 </xsl:call-template>
930 </a>
931 </xsl:when>
932 <xsl:otherwise>
933 <xsl:call-template name="inline.italicseq">
934 <xsl:with-param name="content" select="$content"/>
935 </xsl:call-template>
936 </xsl:otherwise>
937 </xsl:choose>
938 </xsl:when>
939
940 <xsl:when test="not(@linkend) and ($firstterm.only.link = 0 or $firstterm = 1) and ($glossterm.auto.link != 0) and $glossary.collection != ''">
941 <xsl:variable name="term">
942 <xsl:choose>
943 <xsl:when test="@baseform"><xsl:value-of select="@baseform"/></xsl:when>
944 <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
945 </xsl:choose>
946 </xsl:variable>
947
948 <xsl:variable name="cterm" select="(document($glossary.collection,.)//glossentry[glossterm=$term])[1]"/>
949
950 <!-- HACK HACK HACK! But it works... -->
951 <!-- You'd need to do more work if you wanted to chunk on glossdiv, though -->
952
953 <xsl:variable name="glossary" select="//glossary[@role='auto']"/>
954
955 <xsl:if test="count($glossary) != 1">
956 <xsl:message>
957 <xsl:text>Warning: glossary.collection specified, but there are </xsl:text>
958 <xsl:value-of select="count($glossary)"/>
959 <xsl:text> automatic glossaries</xsl:text>
960 </xsl:message>
961 </xsl:if>
962
963 <xsl:variable name="glosschunk">
964 <xsl:call-template name="href.target">
965 <xsl:with-param name="object" select="$glossary"/>
966 </xsl:call-template>
967 </xsl:variable>
968
969 <xsl:variable name="chunkbase">
970 <xsl:choose>
971 <xsl:when test="contains($glosschunk, '#')">
972 <xsl:value-of select="substring-before($glosschunk, '#')"/>
973 </xsl:when>
974 <xsl:otherwise>
975 <xsl:value-of select="$glosschunk"/>
976 </xsl:otherwise>
977 </xsl:choose>
978 </xsl:variable>
979
980 <xsl:choose>
981 <xsl:when test="not($cterm)">
982 <xsl:message>
983 <xsl:text>There's no entry for </xsl:text>
984 <xsl:value-of select="$term"/>
985 <xsl:text> in </xsl:text>
986 <xsl:value-of select="$glossary.collection"/>
987 </xsl:message>
988 <xsl:call-template name="inline.italicseq"/>
989 </xsl:when>
990 <xsl:otherwise>
991 <xsl:variable name="id">
992 <xsl:call-template name="object.id">
993 <xsl:with-param name="object" select="$cterm"/>
994 </xsl:call-template>
995 </xsl:variable>
996 <a href="{$chunkbase}#{$id}">
997 <xsl:apply-templates select="." mode="common.html.attributes"/>
998 <xsl:call-template name="inline.italicseq">
999 <xsl:with-param name="content" select="$content"/>
1000 </xsl:call-template>
1001 </a>
1002 </xsl:otherwise>
1003 </xsl:choose>
1004 </xsl:when>
1005
1006 <xsl:when test="not(@linkend) and ($firstterm.only.link = 0 or $firstterm = 1) and $glossterm.auto.link != 0">
1007 <xsl:variable name="term">
1008 <xsl:choose>
1009 <xsl:when test="@baseform">
1010 <xsl:value-of select="normalize-space(@baseform)"/>
1011 </xsl:when>
1012 <xsl:otherwise>
1013 <xsl:value-of select="normalize-space(.)"/>
1014 </xsl:otherwise>
1015 </xsl:choose>
1016 </xsl:variable>
1017 <xsl:variable name="targets" select="key('glossentries', $term)"/>
1018 <xsl:variable name="target" select="$targets[1]"/>
1019
1020 <xsl:choose>
1021 <xsl:when test="count($targets)=0">
1022 <xsl:message>
1023 <xsl:text>Error: no glossentry for glossterm: </xsl:text>
1024 <xsl:value-of select="."/>
1025 <xsl:text>.</xsl:text>
1026 </xsl:message>
1027 <xsl:call-template name="inline.italicseq"/>
1028 </xsl:when>
1029 <xsl:otherwise>
1030 <a>
1031 <xsl:apply-templates select="." mode="common.html.attributes"/>
1032 <xsl:if test="@id or @xml:id">
1033 <xsl:attribute name="id">
1034 <xsl:value-of select="(@id|@xml:id)[1]"/>
1035 </xsl:attribute>
1036 </xsl:if>
1037
1038 <xsl:attribute name="href">
1039 <xsl:call-template name="href.target">
1040 <xsl:with-param name="object" select="$target"/>
1041 </xsl:call-template>
1042 </xsl:attribute>
1043
1044 <xsl:call-template name="inline.italicseq">
1045 <xsl:with-param name="content" select="$content"/>
1046 </xsl:call-template>
1047 </a>
1048 </xsl:otherwise>
1049 </xsl:choose>
1050 </xsl:when>
1051
1052 <xsl:otherwise>
1053 <xsl:call-template name="inline.italicseq"/>
1054 </xsl:otherwise>
1055 </xsl:choose>
1056</xsl:template>
1057
1058<xsl:template match="termdef">
1059 <span>
1060 <xsl:apply-templates select="." mode="common.html.attributes"/>
1061 <xsl:call-template name="gentext.template">
1062 <xsl:with-param name="context" select="'termdef'"/>
1063 <xsl:with-param name="name" select="'prefix'"/>
1064 </xsl:call-template>
1065 <xsl:apply-templates/>
1066 <xsl:call-template name="gentext.template">
1067 <xsl:with-param name="context" select="'termdef'"/>
1068 <xsl:with-param name="name" select="'suffix'"/>
1069 </xsl:call-template>
1070 </span>
1071</xsl:template>
1072
1073<xsl:template match="sgmltag|tag">
1074 <xsl:call-template name="format.sgmltag"/>
1075</xsl:template>
1076
1077<xsl:template name="format.sgmltag">
1078 <xsl:param name="class">
1079 <xsl:choose>
1080 <xsl:when test="@class">
1081 <xsl:value-of select="@class"/>
1082 </xsl:when>
1083 <xsl:otherwise>element</xsl:otherwise>
1084 </xsl:choose>
1085 </xsl:param>
1086
1087 <xsl:variable name="content">
1088 <xsl:choose>
1089 <xsl:when test="$class='attribute'">
1090 <xsl:apply-templates/>
1091 </xsl:when>
1092 <xsl:when test="$class='attvalue'">
1093 <xsl:apply-templates/>
1094 </xsl:when>
1095 <xsl:when test="$class='element'">
1096 <xsl:apply-templates/>
1097 </xsl:when>
1098 <xsl:when test="$class='endtag'">
1099 <xsl:text>&lt;/</xsl:text>
1100 <xsl:apply-templates/>
1101 <xsl:text>&gt;</xsl:text>
1102 </xsl:when>
1103 <xsl:when test="$class='genentity'">
1104 <xsl:text>&amp;</xsl:text>
1105 <xsl:apply-templates/>
1106 <xsl:text>;</xsl:text>
1107 </xsl:when>
1108 <xsl:when test="$class='numcharref'">
1109 <xsl:text>&amp;#</xsl:text>
1110 <xsl:apply-templates/>
1111 <xsl:text>;</xsl:text>
1112 </xsl:when>
1113 <xsl:when test="$class='paramentity'">
1114 <xsl:text>%</xsl:text>
1115 <xsl:apply-templates/>
1116 <xsl:text>;</xsl:text>
1117 </xsl:when>
1118 <xsl:when test="$class='pi'">
1119 <xsl:text>&lt;?</xsl:text>
1120 <xsl:apply-templates/>
1121 <xsl:text>&gt;</xsl:text>
1122 </xsl:when>
1123 <xsl:when test="$class='xmlpi'">
1124 <xsl:text>&lt;?</xsl:text>
1125 <xsl:apply-templates/>
1126 <xsl:text>?&gt;</xsl:text>
1127 </xsl:when>
1128 <xsl:when test="$class='starttag'">
1129 <xsl:text>&lt;</xsl:text>
1130 <xsl:apply-templates/>
1131 <xsl:text>&gt;</xsl:text>
1132 </xsl:when>
1133 <xsl:when test="$class='emptytag'">
1134 <xsl:text>&lt;</xsl:text>
1135 <xsl:apply-templates/>
1136 <xsl:text>/&gt;</xsl:text>
1137 </xsl:when>
1138 <xsl:when test="$class='sgmlcomment' or $class='comment'">
1139 <xsl:text>&lt;!--</xsl:text>
1140 <xsl:apply-templates/>
1141 <xsl:text>--&gt;</xsl:text>
1142 </xsl:when>
1143 <xsl:otherwise>
1144 <xsl:apply-templates/>
1145 </xsl:otherwise>
1146 </xsl:choose>
1147 </xsl:variable>
1148
1149 <code>
1150 <xsl:apply-templates select="." mode="common.html.attributes">
1151 <xsl:with-param name="class" select="concat('sgmltag-', $class)"/>
1152 </xsl:apply-templates>
1153 <xsl:call-template name="simple.xlink">
1154 <xsl:with-param name="content" select="$content"/>
1155 </xsl:call-template>
1156 </code>
1157</xsl:template>
1158
1159<xsl:template match="email">
1160 <xsl:call-template name="inline.monoseq">
1161 <xsl:with-param name="content">
1162 <xsl:if test="not($email.delimiters.enabled = 0)">
1163 <xsl:text>&lt;</xsl:text>
1164 </xsl:if>
1165 <a>
1166 <xsl:apply-templates select="." mode="common.html.attributes"/>
1167 <xsl:call-template name="id.attribute"/>
1168 <xsl:attribute name="href">
1169 <xsl:text>mailto:</xsl:text>
1170 <xsl:value-of select="."/>
1171 </xsl:attribute>
1172 <xsl:apply-templates/>
1173 </a>
1174 <xsl:if test="not($email.delimiters.enabled = 0)">
1175 <xsl:text>&gt;</xsl:text>
1176 </xsl:if>
1177 </xsl:with-param>
1178 </xsl:call-template>
1179</xsl:template>
1180
1181<xsl:template match="keycombo">
1182 <xsl:variable name="action" select="@action"/>
1183 <xsl:variable name="joinchar">
1184 <xsl:choose>
1185 <xsl:when test="$action='seq'"><xsl:text> </xsl:text></xsl:when>
1186 <xsl:when test="$action='simul'">+</xsl:when>
1187 <xsl:when test="$action='press'">-</xsl:when>
1188 <xsl:when test="$action='click'">-</xsl:when>
1189 <xsl:when test="$action='double-click'">-</xsl:when>
1190 <xsl:when test="$action='other'"/>
1191 <xsl:otherwise>+</xsl:otherwise>
1192 </xsl:choose>
1193 </xsl:variable>
1194 <xsl:for-each select="*">
1195 <xsl:if test="position()&gt;1"><xsl:value-of select="$joinchar"/></xsl:if>
1196 <xsl:apply-templates select="."/>
1197 </xsl:for-each>
1198</xsl:template>
1199
1200<xsl:template match="uri">
1201 <xsl:call-template name="inline.monoseq"/>
1202</xsl:template>
1203
1204<!-- ==================================================================== -->
1205
1206<xsl:template match="menuchoice">
1207 <xsl:variable name="shortcut" select="./shortcut"/>
1208 <xsl:call-template name="process.menuchoice"/>
1209 <xsl:if test="$shortcut">
1210 <xsl:text> (</xsl:text>
1211 <xsl:apply-templates select="$shortcut"/>
1212 <xsl:text>)</xsl:text>
1213 </xsl:if>
1214</xsl:template>
1215
1216<xsl:template name="process.menuchoice">
1217 <xsl:param name="nodelist" select="guibutton|guiicon|guilabel|guimenu|guimenuitem|guisubmenu|interface"/><!-- not(shortcut) -->
1218 <xsl:param name="count" select="1"/>
1219
1220 <xsl:choose>
1221 <xsl:when test="$count&gt;count($nodelist)"/>
1222 <xsl:when test="$count=1">
1223 <xsl:apply-templates select="$nodelist[$count=position()]"/>
1224 <xsl:call-template name="process.menuchoice">
1225 <xsl:with-param name="nodelist" select="$nodelist"/>
1226 <xsl:with-param name="count" select="$count+1"/>
1227 </xsl:call-template>
1228 </xsl:when>
1229 <xsl:otherwise>
1230 <xsl:variable name="node" select="$nodelist[$count=position()]"/>
1231 <xsl:choose>
1232 <xsl:when test="local-name($node)='guimenuitem' or local-name($node)='guisubmenu'">
1233 <xsl:value-of select="$menuchoice.menu.separator"/>
1234 </xsl:when>
1235 <xsl:otherwise>
1236 <xsl:value-of select="$menuchoice.separator"/>
1237 </xsl:otherwise>
1238 </xsl:choose>
1239 <xsl:apply-templates select="$node"/>
1240 <xsl:call-template name="process.menuchoice">
1241 <xsl:with-param name="nodelist" select="$nodelist"/>
1242 <xsl:with-param name="count" select="$count+1"/>
1243 </xsl:call-template>
1244 </xsl:otherwise>
1245 </xsl:choose>
1246</xsl:template>
1247
1248<!-- ==================================================================== -->
1249
1250<xsl:template match="optional">
1251 <xsl:value-of select="$arg.choice.opt.open.str"/>
1252 <xsl:call-template name="inline.charseq"/>
1253 <xsl:value-of select="$arg.choice.opt.close.str"/>
1254</xsl:template>
1255
1256<xsl:template match="citation">
1257 <!-- todo: integrate with bibliography collection -->
1258 <xsl:variable name="targets" select="(//biblioentry | //bibliomixed)[abbrev = string(current())]"/>
1259 <xsl:variable name="target" select="$targets[1]"/>
1260
1261 <xsl:choose>
1262 <!-- try automatic linking based on match to abbrev -->
1263 <xsl:when test="$target and not(xref) and not(link)">
1264
1265 <xsl:text>[</xsl:text>
1266 <a>
1267 <xsl:apply-templates select="." mode="common.html.attributes"/>
1268 <xsl:attribute name="href">
1269 <xsl:call-template name="href.target">
1270 <xsl:with-param name="object" select="$target"/>
1271 </xsl:call-template>
1272 </xsl:attribute>
1273
1274 <xsl:choose>
1275 <xsl:when test="$bibliography.numbered != 0">
1276 <xsl:call-template name="id.attribute"/>
1277 <xsl:apply-templates select="$target" mode="citation"/>
1278 </xsl:when>
1279 <xsl:otherwise>
1280 <xsl:call-template name="inline.charseq"/>
1281 </xsl:otherwise>
1282 </xsl:choose>
1283
1284 </a>
1285 <xsl:text>]</xsl:text>
1286 </xsl:when>
1287 <xsl:otherwise>
1288 <xsl:text>[</xsl:text>
1289 <xsl:call-template name="inline.charseq"/>
1290 <xsl:text>]</xsl:text>
1291 </xsl:otherwise>
1292 </xsl:choose>
1293</xsl:template>
1294
1295<xsl:template match="citebiblioid">
1296 <xsl:variable name="targets" select="//*[biblioid = string(current())]"/>
1297 <xsl:variable name="target" select="$targets[1]"/>
1298
1299 <xsl:choose>
1300 <!-- try automatic linking based on match to parent of biblioid -->
1301 <xsl:when test="$target and not(xref) and not(link)">
1302
1303 <xsl:text>[</xsl:text>
1304 <a>
1305 <xsl:apply-templates select="." mode="common.html.attributes"/>
1306 <xsl:attribute name="href">
1307 <xsl:call-template name="href.target">
1308 <xsl:with-param name="object" select="$target"/>
1309 </xsl:call-template>
1310 </xsl:attribute>
1311
1312 <xsl:call-template name="inline.charseq"/>
1313
1314 </a>
1315 <xsl:text>]</xsl:text>
1316 </xsl:when>
1317 <xsl:otherwise>
1318 <xsl:text>[</xsl:text>
1319 <xsl:call-template name="inline.charseq"/>
1320 <xsl:text>]</xsl:text>
1321 </xsl:otherwise>
1322 </xsl:choose>
1323</xsl:template>
1324
1325<xsl:template match="biblioentry|bibliomixed" mode="citation">
1326 <xsl:number from="bibliography" count="biblioentry|bibliomixed" level="any" format="1"/>
1327</xsl:template>
1328
1329<!-- ==================================================================== -->
1330
1331<xsl:template match="comment[parent::answer|parent::appendix|parent::article|parent::bibliodiv| parent::bibliography|parent::blockquote|parent::caution|parent::chapter| parent::glossary|parent::glossdiv|parent::important|parent::index| parent::indexdiv|parent::listitem|parent::note|parent::orderedlist| parent::partintro|parent::preface|parent::procedure|parent::qandadiv| parent::qandaset|parent::question|parent::refentry|parent::refnamediv| parent::refsect1|parent::refsect2|parent::refsect3|parent::refsection| parent::refsynopsisdiv|parent::sect1|parent::sect2|parent::sect3|parent::sect4| parent::sect5|parent::section|parent::setindex|parent::sidebar| parent::simplesect|parent::taskprerequisites|parent::taskrelated| parent::tasksummary|parent::warning|parent::topic]|remark[parent::answer|parent::appendix|parent::article|parent::bibliodiv| parent::bibliography|parent::blockquote|parent::caution|parent::chapter| parent::glossary|parent::glossdiv|parent::important|parent::index| parent::indexdiv|parent::listitem|parent::note|parent::orderedlist| parent::partintro|parent::preface|parent::procedure|parent::qandadiv| parent::qandaset|parent::question|parent::refentry|parent::refnamediv| parent::refsect1|parent::refsect2|parent::refsect3|parent::refsection| parent::refsynopsisdiv|parent::sect1|parent::sect2|parent::sect3|parent::sect4| parent::sect5|parent::section|parent::setindex|parent::sidebar| parent::simplesect|parent::taskprerequisites|parent::taskrelated| parent::tasksummary|parent::warning|parent::topic]">
1332 <xsl:if test="$show.comments != 0">
1333 <p class="remark"><em><xsl:call-template name="inline.charseq"/></em></p>
1334 </xsl:if>
1335</xsl:template>
1336
1337<xsl:template match="comment|remark">
1338 <xsl:if test="$show.comments != 0">
1339 <em><xsl:call-template name="inline.charseq"/></em>
1340 </xsl:if>
1341</xsl:template>
1342
1343<!-- ==================================================================== -->
1344
1345<xsl:template match="productname">
1346 <xsl:call-template name="inline.charseq"/>
1347 <xsl:if test="@class">
1348 <xsl:call-template name="dingbat">
1349 <xsl:with-param name="dingbat" select="@class"/>
1350 </xsl:call-template>
1351 </xsl:if>
1352</xsl:template>
1353
1354<xsl:template match="productnumber">
1355 <xsl:call-template name="inline.charseq"/>
1356</xsl:template>
1357
1358<!-- ==================================================================== -->
1359
1360<xsl:template match="pob|street|city|state|postcode|country|otheraddr">
1361 <xsl:call-template name="inline.charseq"/>
1362</xsl:template>
1363
1364<xsl:template match="phone|fax">
1365 <xsl:call-template name="inline.charseq"/>
1366</xsl:template>
1367
1368<!-- in Addresses, for example -->
1369<xsl:template match="honorific|firstname|surname|lineage|othername">
1370 <xsl:call-template name="inline.charseq"/>
1371</xsl:template>
1372
1373<!-- ==================================================================== -->
1374
1375<xsl:template match="person">
1376 <xsl:param name="content">
1377 <xsl:call-template name="anchor"/>
1378 <xsl:call-template name="simple.xlink">
1379 <xsl:with-param name="content">
1380 <xsl:apply-templates select="personname"/>
1381 </xsl:with-param>
1382 </xsl:call-template>
1383 <xsl:call-template name="apply-annotations"/>
1384 </xsl:param>
1385
1386 <span>
1387 <xsl:apply-templates select="." mode="common.html.attributes"/>
1388 <xsl:call-template name="id.attribute"/>
1389 <xsl:copy-of select="$content"/>
1390 </span>
1391</xsl:template>
1392
1393<xsl:template match="personname">
1394 <xsl:param name="content">
1395 <xsl:call-template name="anchor"/>
1396 <xsl:call-template name="simple.xlink">
1397 <xsl:with-param name="content">
1398 <xsl:call-template name="person.name"/>
1399 </xsl:with-param>
1400 </xsl:call-template>
1401 <xsl:call-template name="apply-annotations"/>
1402 </xsl:param>
1403
1404 <span>
1405 <xsl:apply-templates select="." mode="common.html.attributes"/>
1406 <xsl:call-template name="id.attribute"/>
1407 <xsl:copy-of select="$content"/>
1408 </span>
1409</xsl:template>
1410
1411<!-- ==================================================================== -->
1412
1413<xsl:template match="org">
1414 <xsl:param name="content">
1415 <xsl:call-template name="anchor"/>
1416 <xsl:call-template name="simple.xlink">
1417 <xsl:with-param name="content">
1418 <xsl:apply-templates/>
1419 </xsl:with-param>
1420 </xsl:call-template>
1421 <xsl:call-template name="apply-annotations"/>
1422 </xsl:param>
1423
1424 <span>
1425 <xsl:apply-templates select="." mode="common.html.attributes"/>
1426 <xsl:call-template name="id.attribute"/>
1427 <xsl:copy-of select="$content"/>
1428 </span>
1429</xsl:template>
1430
1431<xsl:template match="orgname">
1432 <xsl:param name="content">
1433 <xsl:call-template name="anchor"/>
1434 <xsl:call-template name="simple.xlink">
1435 <xsl:with-param name="content">
1436 <xsl:apply-templates/>
1437 </xsl:with-param>
1438 </xsl:call-template>
1439 <xsl:call-template name="apply-annotations"/>
1440 </xsl:param>
1441
1442 <span>
1443 <xsl:apply-templates select="." mode="common.html.attributes"/>
1444 <xsl:call-template name="id.attribute"/>
1445 <xsl:copy-of select="$content"/>
1446 </span>
1447</xsl:template>
1448
1449<xsl:template match="orgdiv">
1450 <xsl:param name="content">
1451 <xsl:call-template name="anchor"/>
1452 <xsl:call-template name="simple.xlink">
1453 <xsl:with-param name="content">
1454 <xsl:apply-templates/>
1455 </xsl:with-param>
1456 </xsl:call-template>
1457 <xsl:call-template name="apply-annotations"/>
1458 </xsl:param>
1459
1460 <span>
1461 <xsl:apply-templates select="." mode="common.html.attributes"/>
1462 <xsl:copy-of select="$content"/>
1463 </span>
1464</xsl:template>
1465
1466<xsl:template match="affiliation">
1467 <xsl:param name="content">
1468 <xsl:call-template name="anchor"/>
1469 <xsl:call-template name="simple.xlink">
1470 <xsl:with-param name="content">
1471 <xsl:call-template name="person.name"/>
1472 </xsl:with-param>
1473 </xsl:call-template>
1474 <xsl:call-template name="apply-annotations"/>
1475 </xsl:param>
1476
1477 <span>
1478 <xsl:apply-templates select="." mode="common.html.attributes"/>
1479 <xsl:call-template name="id.attribute"/>
1480 <xsl:copy-of select="$content"/>
1481 </span>
1482</xsl:template>
1483
1484<!-- ==================================================================== -->
1485
1486<xsl:template match="beginpage">
1487 <!-- does nothing; this *is not* markup to force a page break. -->
1488</xsl:template>
1489
1490</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.