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