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