Debian Codegraph @

docs/xsl-generic/html/inline.xsl

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