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="http://www.w3.org/1999/xhtml" version="1.0">
6 <!-- ********************************************************************
7 $Id: lists.xsl 8524 2009-10-10 02:45:47Z abdelazer $
8 ********************************************************************
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.
14 ******************************************************************** -->
16 <!-- ==================================================================== -->
18 <xsl:template match="itemizedlist">
20 <xsl:call-template name="common.html.attributes"/>
21 <xsl:call-template name="anchor"/>
23 <xsl:call-template name="formal.object.heading"/>
26 <!-- Preserve order of PIs and comments -->
27 <xsl:apply-templates select="*[not(self::listitem or self::title or self::titleabbrev)] |comment()[not(preceding-sibling::listitem)] |processing-instruction()[not(preceding-sibling::listitem)]"/>
30 <xsl:call-template name="generate.class.attribute"/>
31 <xsl:if test="$css.decoration != 0">
32 <xsl:attribute name="type">
33 <xsl:call-template name="list.itemsymbol"/>
37 <xsl:if test="@spacing='compact'">
38 <xsl:attribute name="compact">
39 <xsl:value-of select="@spacing"/>
42 <xsl:apply-templates select="listitem |comment()[preceding-sibling::listitem] |processing-instruction()[preceding-sibling::listitem]"/>
47 <xsl:template match="itemizedlist/title">
51 <xsl:template match="itemizedlist/listitem">
52 <xsl:variable name="mark" select="../@mark"/>
53 <xsl:variable name="override" select="@override"/>
55 <xsl:variable name="usemark">
57 <xsl:when test="$override != ''">
58 <xsl:value-of select="$override"/>
61 <xsl:value-of select="$mark"/>
66 <xsl:variable name="cssmark">
68 <xsl:when test="$usemark = 'opencircle'">circle</xsl:when>
69 <xsl:when test="$usemark = 'bullet'">disc</xsl:when>
70 <xsl:when test="$usemark = 'box'">square</xsl:when>
72 <xsl:value-of select="$usemark"/>
78 <xsl:call-template name="common.html.attributes"/>
79 <xsl:if test="$css.decoration = '1' and $cssmark != ''">
80 <xsl:attribute name="style">
81 <xsl:text>list-style-type: </xsl:text>
82 <xsl:value-of select="$cssmark"/>
86 <!-- we can't just drop the anchor in since some browsers (Opera)
87 get confused about line breaks if we do. So if the first child
88 is a para, assume the para will put in the anchor. Otherwise,
89 put the anchor in anyway. -->
90 <xsl:if test="local-name(child::*[1]) != 'para'">
91 <xsl:call-template name="anchor"/>
95 <xsl:when test="$show.revisionflag != 0 and @revisionflag">
96 <div class="{@revisionflag}">
97 <xsl:apply-templates/>
101 <xsl:apply-templates/>
107 <xsl:template match="orderedlist">
108 <xsl:variable name="start">
109 <xsl:call-template name="orderedlist-starting-number"/>
112 <xsl:variable name="numeration">
113 <xsl:call-template name="list.numeration"/>
116 <xsl:variable name="type">
118 <xsl:when test="$numeration='arabic'">1</xsl:when>
119 <xsl:when test="$numeration='loweralpha'">a</xsl:when>
120 <xsl:when test="$numeration='lowerroman'">i</xsl:when>
121 <xsl:when test="$numeration='upperalpha'">A</xsl:when>
122 <xsl:when test="$numeration='upperroman'">I</xsl:when>
123 <!-- What!? This should never happen -->
126 <xsl:text>Unexpected numeration: </xsl:text>
127 <xsl:value-of select="$numeration"/>
129 <xsl:value-of select="1"/>
135 <xsl:call-template name="common.html.attributes"/>
136 <xsl:call-template name="anchor"/>
138 <xsl:if test="title">
139 <xsl:call-template name="formal.object.heading"/>
142 <!-- Preserve order of PIs and comments -->
143 <xsl:apply-templates select="*[not(self::listitem or self::title or self::titleabbrev)] |comment()[not(preceding-sibling::listitem)] |processing-instruction()[not(preceding-sibling::listitem)]"/>
146 <xsl:when test="@inheritnum='inherit' and ancestor::listitem[parent::orderedlist]">
148 <xsl:call-template name="generate.class.attribute"/>
149 <col align="{$direction.align.start}" valign="top"/>
151 <xsl:apply-templates mode="orderedlist-table" select="listitem |comment()[preceding-sibling::listitem] |processing-instruction()[preceding-sibling::listitem]"/>
157 <xsl:call-template name="generate.class.attribute"/>
158 <xsl:if test="$start != '1'">
159 <xsl:attribute name="start">
160 <xsl:value-of select="$start"/>
163 <xsl:if test="$numeration != ''">
164 <xsl:attribute name="type">
165 <xsl:value-of select="$type"/>
168 <xsl:if test="@spacing='compact'">
169 <xsl:attribute name="compact">
170 <xsl:value-of select="@spacing"/>
173 <xsl:apply-templates select="listitem |comment()[preceding-sibling::listitem] |processing-instruction()[preceding-sibling::listitem]"/>
180 <xsl:template match="orderedlist/title">
184 <xsl:template match="orderedlist/listitem">
186 <xsl:call-template name="common.html.attributes"/>
187 <xsl:if test="@override">
188 <xsl:attribute name="value">
189 <xsl:value-of select="@override"/>
193 <!-- we can't just drop the anchor in since some browsers (Opera)
194 get confused about line breaks if we do. So if the first child
195 is a para, assume the para will put in the anchor. Otherwise,
196 put the anchor in anyway. -->
197 <xsl:if test="local-name(child::*[1]) != 'para'">
198 <xsl:call-template name="anchor"/>
202 <xsl:when test="$show.revisionflag != 0 and @revisionflag">
203 <div class="{@revisionflag}">
204 <xsl:apply-templates/>
208 <xsl:apply-templates/>
214 <xsl:template match="orderedlist/listitem" mode="orderedlist-table">
217 <xsl:apply-templates select="." mode="item-number"/>
220 <xsl:if test="local-name(child::*[1]) != 'para'">
221 <xsl:call-template name="anchor"/>
225 <xsl:when test="$show.revisionflag != 0 and @revisionflag">
226 <div class="{@revisionflag}">
227 <xsl:apply-templates/>
231 <xsl:apply-templates/>
238 <xsl:template match="variablelist">
239 <xsl:variable name="pi-presentation">
240 <xsl:call-template name="pi.dbhtml_list-presentation"/>
243 <xsl:variable name="presentation">
245 <xsl:when test="$pi-presentation != ''">
246 <xsl:value-of select="$pi-presentation"/>
248 <xsl:when test="$variablelist.as.table != 0">
249 <xsl:value-of select="'table'"/>
252 <xsl:value-of select="'list'"/>
257 <xsl:variable name="list-width">
258 <xsl:call-template name="pi.dbhtml_list-width"/>
261 <xsl:variable name="term-width">
262 <xsl:call-template name="pi.dbhtml_term-width"/>
265 <xsl:variable name="table-summary">
266 <xsl:call-template name="pi.dbhtml_table-summary"/>
270 <xsl:call-template name="common.html.attributes"/>
271 <xsl:call-template name="anchor"/>
272 <xsl:if test="title">
273 <xsl:call-template name="formal.object.heading"/>
277 <xsl:when test="$presentation = 'table'">
278 <!-- Preserve order of PIs and comments -->
279 <xsl:apply-templates select="*[not(self::varlistentry or self::title or self::titleabbrev)] |comment()[not(preceding-sibling::varlistentry)] |processing-instruction()[not(preceding-sibling::varlistentry)]"/>
281 <xsl:if test="$list-width != ''">
282 <xsl:attribute name="width">
283 <xsl:value-of select="$list-width"/>
286 <xsl:if test="$table-summary != ''">
287 <xsl:attribute name="summary">
288 <xsl:value-of select="$table-summary"/>
291 <col align="{$direction.align.start}" valign="top">
292 <xsl:if test="$term-width != ''">
293 <xsl:attribute name="width">
294 <xsl:value-of select="$term-width"/>
299 <xsl:apply-templates mode="varlist-table" select="varlistentry |comment()[preceding-sibling::varlistentry] |processing-instruction()[preceding-sibling::varlistentry]"/>
304 <!-- Preserve order of PIs and comments -->
305 <xsl:apply-templates select="*[not(self::varlistentry or self::title or self::titleabbrev)] |comment()[not(preceding-sibling::varlistentry)] |processing-instruction()[not(preceding-sibling::varlistentry)]"/>
307 <xsl:apply-templates select="varlistentry |comment()[preceding-sibling::varlistentry] |processing-instruction()[preceding-sibling::varlistentry]"/>
314 <xsl:template match="variablelist/title">
318 <xsl:template match="itemizedlist/titleabbrev|orderedlist/titleabbrev">
322 <xsl:template match="variablelist/titleabbrev">
326 <xsl:template match="listitem" mode="xref">
327 <xsl:number format="1"/>
330 <xsl:template match="listitem/simpara" priority="2">
331 <!-- If a listitem contains only a single simpara, don't output
332 the <p> wrapper; this has the effect of creating an li
333 with simple text content. -->
335 <xsl:when test="not(preceding-sibling::*) and not (following-sibling::*)">
336 <xsl:call-template name="anchor"/>
337 <xsl:apply-templates/>
342 <xsl:when test="@role and $para.propagates.style != 0">
343 <xsl:call-template name="common.html.attributes">
344 <xsl:with-param name="class" select="@role"/>
348 <xsl:call-template name="common.html.attributes"/>
352 <xsl:call-template name="anchor"/>
353 <xsl:apply-templates/>
359 <xsl:template match="varlistentry">
361 <xsl:call-template name="anchor"/>
362 <xsl:apply-templates select="term"/>
365 <xsl:apply-templates select="listitem"/>
369 <xsl:template match="varlistentry" mode="varlist-table">
370 <xsl:variable name="presentation">
371 <xsl:call-template name="pi.dbhtml_term-presentation">
372 <xsl:with-param name="node" select=".."/>
376 <xsl:variable name="separator">
377 <xsl:call-template name="pi.dbhtml_term-separator">
378 <xsl:with-param name="node" select=".."/>
382 <xsl:call-template name="tr.attributes">
383 <xsl:with-param name="rownum">
384 <xsl:number from="variablelist" count="varlistentry"/>
390 <xsl:call-template name="anchor"/>
392 <xsl:when test="$presentation = 'bold'">
394 <xsl:apply-templates select="term"/>
395 <xsl:value-of select="$separator"/>
398 <xsl:when test="$presentation = 'italic'">
400 <xsl:apply-templates select="term"/>
401 <xsl:value-of select="$separator"/>
404 <xsl:when test="$presentation = 'bold-italic'">
407 <xsl:apply-templates select="term"/>
408 <xsl:value-of select="$separator"/>
413 <xsl:apply-templates select="term"/>
414 <xsl:value-of select="$separator"/>
420 <xsl:apply-templates select="listitem"/>
425 <xsl:template match="varlistentry/term">
427 <xsl:call-template name="common.html.attributes"/>
428 <xsl:call-template name="anchor"/>
429 <xsl:call-template name="simple.xlink">
430 <xsl:with-param name="content">
431 <xsl:apply-templates/>
435 <xsl:when test="position() = last()"/> <!-- do nothing -->
437 <!-- * if we have multiple terms in the same varlistentry, generate -->
438 <!-- * a separator (", " by default) and/or an additional line -->
439 <!-- * break after each one except the last -->
440 <xsl:value-of select="$variablelist.term.separator"/>
441 <xsl:if test="not($variablelist.term.break.after = '0')">
449 <xsl:template match="varlistentry/listitem">
450 <!-- we can't just drop the anchor in since some browsers (Opera)
451 get confused about line breaks if we do. So if the first child
452 is a para, assume the para will put in the anchor. Otherwise,
453 put the anchor in anyway. -->
454 <xsl:if test="local-name(child::*[1]) != 'para'">
455 <xsl:call-template name="anchor"/>
459 <xsl:when test="$show.revisionflag != 0 and @revisionflag">
460 <div class="{@revisionflag}">
461 <xsl:apply-templates/>
465 <xsl:apply-templates/>
470 <!-- ==================================================================== -->
472 <xsl:template match="simplelist">
473 <!-- with no type specified, the default is 'vert' -->
474 <xsl:call-template name="anchor"/>
475 <table border="0" summary="Simple list">
476 <xsl:call-template name="common.html.attributes"/>
477 <xsl:call-template name="simplelist.vert">
478 <xsl:with-param name="cols">
480 <xsl:when test="@columns">
481 <xsl:value-of select="@columns"/>
483 <xsl:otherwise>1</xsl:otherwise>
490 <xsl:template match="simplelist[@type='inline']">
492 <xsl:call-template name="common.html.attributes"/>
493 <!-- if dbchoice PI exists, use that to determine the choice separator -->
494 <!-- (that is, equivalent of "and" or "or" in current locale), or literal -->
495 <!-- value of "choice" otherwise -->
496 <xsl:variable name="localized-choice-separator">
498 <xsl:when test="processing-instruction('dbchoice')">
499 <xsl:call-template name="select.choice.separator"/>
507 <xsl:for-each select="member">
508 <xsl:call-template name="simple.xlink">
509 <xsl:with-param name="content">
510 <xsl:apply-templates/>
514 <xsl:when test="position() = last()"/> <!-- do nothing -->
516 <xsl:text>, </xsl:text>
517 <xsl:if test="position() = last() - 1">
518 <xsl:if test="$localized-choice-separator != ''">
519 <xsl:value-of select="$localized-choice-separator"/>
520 <xsl:text> </xsl:text>
529 <xsl:template match="simplelist[@type='horiz']">
530 <xsl:call-template name="anchor"/>
531 <table border="0" summary="Simple list">
532 <xsl:call-template name="common.html.attributes"/>
533 <xsl:call-template name="simplelist.horiz">
534 <xsl:with-param name="cols">
536 <xsl:when test="@columns">
537 <xsl:value-of select="@columns"/>
539 <xsl:otherwise>1</xsl:otherwise>
546 <xsl:template match="simplelist[@type='vert']">
547 <xsl:call-template name="anchor"/>
548 <table border="0" summary="Simple list">
549 <xsl:call-template name="common.html.attributes"/>
550 <xsl:call-template name="simplelist.vert">
551 <xsl:with-param name="cols">
553 <xsl:when test="@columns">
554 <xsl:value-of select="@columns"/>
556 <xsl:otherwise>1</xsl:otherwise>
563 <xsl:template name="simplelist.horiz">
564 <xsl:param name="cols">1</xsl:param>
565 <xsl:param name="cell">1</xsl:param>
566 <xsl:param name="members" select="./member"/>
568 <xsl:if test="$cell <= count($members)">
570 <xsl:call-template name="tr.attributes">
571 <xsl:with-param name="row" select="$members[1]"/>
572 <xsl:with-param name="rownum" select="(($cell - 1) div $cols) + 1"/>
575 <xsl:call-template name="simplelist.horiz.row">
576 <xsl:with-param name="cols" select="$cols"/>
577 <xsl:with-param name="cell" select="$cell"/>
578 <xsl:with-param name="members" select="$members"/>
581 <xsl:call-template name="simplelist.horiz">
582 <xsl:with-param name="cols" select="$cols"/>
583 <xsl:with-param name="cell" select="$cell + $cols"/>
584 <xsl:with-param name="members" select="$members"/>
589 <xsl:template name="simplelist.horiz.row">
590 <xsl:param name="cols">1</xsl:param>
591 <xsl:param name="cell">1</xsl:param>
592 <xsl:param name="members" select="./member"/>
593 <xsl:param name="curcol">1</xsl:param>
595 <xsl:if test="$curcol <= $cols">
598 <xsl:when test="$members[position()=$cell]">
599 <xsl:apply-templates select="$members[position()=$cell]"/>
602 <xsl:text> </xsl:text>
606 <xsl:call-template name="simplelist.horiz.row">
607 <xsl:with-param name="cols" select="$cols"/>
608 <xsl:with-param name="cell" select="$cell+1"/>
609 <xsl:with-param name="members" select="$members"/>
610 <xsl:with-param name="curcol" select="$curcol+1"/>
615 <xsl:template name="simplelist.vert">
616 <xsl:param name="cols">1</xsl:param>
617 <xsl:param name="cell">1</xsl:param>
618 <xsl:param name="members" select="./member"/>
619 <xsl:param name="rows" select="floor((count($members)+$cols - 1) div $cols)"/>
621 <xsl:if test="$cell <= $rows">
623 <xsl:call-template name="tr.attributes">
624 <xsl:with-param name="row" select="$members[1]"/>
625 <xsl:with-param name="rownum" select="$cell"/>
628 <xsl:call-template name="simplelist.vert.row">
629 <xsl:with-param name="cols" select="$cols"/>
630 <xsl:with-param name="rows" select="$rows"/>
631 <xsl:with-param name="cell" select="$cell"/>
632 <xsl:with-param name="members" select="$members"/>
635 <xsl:call-template name="simplelist.vert">
636 <xsl:with-param name="cols" select="$cols"/>
637 <xsl:with-param name="cell" select="$cell+1"/>
638 <xsl:with-param name="members" select="$members"/>
639 <xsl:with-param name="rows" select="$rows"/>
644 <xsl:template name="simplelist.vert.row">
645 <xsl:param name="cols">1</xsl:param>
646 <xsl:param name="rows">1</xsl:param>
647 <xsl:param name="cell">1</xsl:param>
648 <xsl:param name="members" select="./member"/>
649 <xsl:param name="curcol">1</xsl:param>
651 <xsl:if test="$curcol <= $cols">
654 <xsl:when test="$members[position()=$cell]">
655 <xsl:apply-templates select="$members[position()=$cell]"/>
658 <xsl:text> </xsl:text>
662 <xsl:call-template name="simplelist.vert.row">
663 <xsl:with-param name="cols" select="$cols"/>
664 <xsl:with-param name="rows" select="$rows"/>
665 <xsl:with-param name="cell" select="$cell+$rows"/>
666 <xsl:with-param name="members" select="$members"/>
667 <xsl:with-param name="curcol" select="$curcol+1"/>
672 <xsl:template match="member">
673 <xsl:call-template name="anchor"/>
674 <xsl:call-template name="simple.xlink">
675 <xsl:with-param name="content">
676 <xsl:apply-templates/>
681 <!-- ==================================================================== -->
683 <xsl:template match="procedure">
684 <xsl:variable name="param.placement" select="substring-after(normalize-space($formal.title.placement), concat(local-name(.), ' '))"/>
686 <xsl:variable name="placement">
688 <xsl:when test="contains($param.placement, ' ')">
689 <xsl:value-of select="substring-before($param.placement, ' ')"/>
691 <xsl:when test="$param.placement = ''">before</xsl:when>
693 <xsl:value-of select="$param.placement"/>
698 <!-- Preserve order of PIs and comments -->
699 <xsl:variable name="preamble" select="*[not(self::step or self::title or self::titleabbrev)] |comment()[not(preceding-sibling::step)] |processing-instruction()[not(preceding-sibling::step)]"/>
702 <xsl:call-template name="common.html.attributes"/>
703 <xsl:call-template name="anchor">
704 <xsl:with-param name="conditional">
706 <xsl:when test="title">0</xsl:when>
707 <xsl:otherwise>1</xsl:otherwise>
712 <xsl:if test="title and $placement = 'before'">
713 <xsl:call-template name="formal.object.heading"/>
716 <xsl:apply-templates select="$preamble"/>
719 <xsl:when test="count(step) = 1">
721 <xsl:call-template name="generate.class.attribute"/>
722 <xsl:apply-templates select="step |comment()[preceding-sibling::step] |processing-instruction()[preceding-sibling::step]"/>
727 <xsl:call-template name="generate.class.attribute"/>
728 <xsl:attribute name="type">
729 <xsl:value-of select="substring($procedure.step.numeration.formats,1,1)"/>
731 <xsl:apply-templates select="step |comment()[preceding-sibling::step] |processing-instruction()[preceding-sibling::step]"/>
736 <xsl:if test="title and $placement != 'before'">
737 <xsl:call-template name="formal.object.heading"/>
742 <xsl:template match="procedure/title">
746 <xsl:template match="substeps">
747 <xsl:variable name="numeration">
748 <xsl:call-template name="procedure.step.numeration"/>
751 <xsl:call-template name="anchor"/>
753 <ol type="{$numeration}">
754 <xsl:call-template name="common.html.attributes"/>
755 <xsl:apply-templates/>
759 <xsl:template match="step">
761 <xsl:call-template name="common.html.attributes"/>
762 <xsl:call-template name="anchor"/>
763 <xsl:apply-templates/>
767 <xsl:template match="stepalternatives">
768 <xsl:call-template name="anchor"/>
770 <xsl:call-template name="common.html.attributes"/>
771 <xsl:apply-templates/>
775 <xsl:template match="step/title">
777 <xsl:call-template name="common.html.attributes"/>
778 <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform">
779 <xsl:apply-templates/>
784 <!-- ==================================================================== -->
786 <xsl:template match="segmentedlist">
787 <xsl:variable name="presentation">
788 <xsl:call-template name="pi.dbhtml_list-presentation"/>
792 <xsl:call-template name="common.html.attributes"/>
793 <xsl:call-template name="anchor"/>
796 <xsl:when test="$presentation = 'table'">
797 <xsl:apply-templates select="." mode="seglist-table"/>
799 <xsl:when test="$presentation = 'list'">
800 <xsl:apply-templates/>
802 <xsl:when test="$segmentedlist.as.table != 0">
803 <xsl:apply-templates select="." mode="seglist-table"/>
806 <xsl:apply-templates/>
812 <xsl:template match="segmentedlist/title">
814 <xsl:call-template name="common.html.attributes"/>
817 <xsl:call-template name="generate.class.attribute"/>
818 <xsl:apply-templates/>
824 <xsl:template match="segtitle">
827 <xsl:template match="segtitle" mode="segtitle-in-seg">
828 <xsl:apply-templates/>
831 <xsl:template match="seglistitem">
833 <xsl:call-template name="common.html.attributes"/>
834 <xsl:call-template name="anchor"/>
835 <xsl:apply-templates/>
839 <xsl:template match="seg">
840 <xsl:variable name="segnum" select="count(preceding-sibling::seg)+1"/>
841 <xsl:variable name="seglist" select="ancestor::segmentedlist"/>
842 <xsl:variable name="segtitles" select="$seglist/segtitle"/>
845 Note: segtitle is only going to be the right thing in a well formed
846 SegmentedList. If there are too many Segs or too few SegTitles,
847 you'll get something odd...maybe an error
851 <xsl:call-template name="common.html.attributes"/>
853 <span class="segtitle">
854 <xsl:apply-templates select="$segtitles[$segnum=position()]" mode="segtitle-in-seg"/>
855 <xsl:text>: </xsl:text>
858 <xsl:apply-templates/>
862 <xsl:template match="segmentedlist" mode="seglist-table">
863 <xsl:variable name="table-summary">
864 <xsl:call-template name="pi.dbhtml_table-summary"/>
867 <xsl:variable name="list-width">
868 <xsl:call-template name="pi.dbhtml_list-width"/>
871 <xsl:apply-templates select="title"/>
874 <xsl:if test="$list-width != ''">
875 <xsl:attribute name="width">
876 <xsl:value-of select="$list-width"/>
879 <xsl:if test="$table-summary != ''">
880 <xsl:attribute name="summary">
881 <xsl:value-of select="$table-summary"/>
885 <tr class="segtitle">
886 <xsl:call-template name="tr.attributes">
887 <xsl:with-param name="row" select="segtitle[1]"/>
888 <xsl:with-param name="rownum" select="1"/>
890 <xsl:apply-templates select="segtitle" mode="seglist-table"/>
894 <xsl:apply-templates select="seglistitem" mode="seglist-table"/>
899 <xsl:template match="segtitle" mode="seglist-table">
900 <th><xsl:apply-templates/></th>
903 <xsl:template match="seglistitem" mode="seglist-table">
904 <xsl:variable name="seglinum">
905 <xsl:number from="segmentedlist" count="seglistitem"/>
909 <xsl:call-template name="common.html.attributes"/>
910 <xsl:call-template name="tr.attributes">
911 <xsl:with-param name="rownum" select="$seglinum + 1"/>
913 <xsl:apply-templates mode="seglist-table"/>
917 <xsl:template match="seg" mode="seglist-table">
919 <xsl:call-template name="common.html.attributes"/>
920 <xsl:apply-templates/>
924 <xsl:template match="seg[1]" mode="seglist-table">
926 <xsl:call-template name="common.html.attributes"/>
927 <xsl:call-template name="anchor">
928 <xsl:with-param name="node" select="ancestor::seglistitem"/>
930 <xsl:apply-templates/>
934 <!-- ==================================================================== -->
936 <xsl:template match="calloutlist">
938 <xsl:call-template name="common.html.attributes"/>
939 <xsl:call-template name="anchor"/>
940 <xsl:if test="title|info/title">
941 <xsl:call-template name="formal.object.heading"/>
944 <!-- Preserve order of PIs and comments -->
945 <xsl:apply-templates select="*[not(self::callout or self::title or self::titleabbrev)] |comment()[not(preceding-sibling::callout)] |processing-instruction()[not(preceding-sibling::callout)]"/>
948 <xsl:when test="$callout.list.table != 0">
949 <table border="0" summary="Callout list">
950 <xsl:apply-templates select="callout |comment()[preceding-sibling::callout] |processing-instruction()[preceding-sibling::callout]"/>
954 <dl compact="compact">
955 <xsl:apply-templates select="callout |comment()[preceding-sibling::callout] |processing-instruction()[preceding-sibling::callout]"/>
962 <xsl:template match="calloutlist/title">
965 <xsl:template match="callout">
967 <xsl:when test="$callout.list.table != 0">
969 <xsl:call-template name="tr.attributes">
970 <xsl:with-param name="rownum">
971 <xsl:number from="calloutlist" count="callout"/>
975 <td width="5%" valign="top" align="{$direction.align.start}">
977 <xsl:call-template name="anchor"/>
978 <xsl:call-template name="callout.arearefs">
979 <xsl:with-param name="arearefs" select="@arearefs"/>
983 <td valign="top" align="{$direction.align.start}">
984 <xsl:apply-templates/>
990 <xsl:call-template name="anchor"/>
991 <xsl:call-template name="callout.arearefs">
992 <xsl:with-param name="arearefs" select="@arearefs"/>
995 <dd><xsl:apply-templates/></dd>
1000 <xsl:template match="callout/simpara" priority="2">
1001 <!-- If a callout contains only a single simpara, don't output
1002 the <p> wrapper; this has the effect of creating an li
1003 with simple text content. -->
1005 <xsl:when test="not(preceding-sibling::*) and not (following-sibling::*)">
1006 <xsl:call-template name="anchor"/>
1007 <xsl:apply-templates/>
1011 <xsl:if test="@role and $para.propagates.style != 0">
1013 <xsl:when test="@role and $para.propagates.style != 0">
1014 <xsl:call-template name="common.html.attributes">
1015 <xsl:with-param name="class" select="@role"/>
1016 </xsl:call-template>
1019 <xsl:call-template name="common.html.attributes"/>
1024 <xsl:call-template name="anchor"/>
1025 <xsl:apply-templates/>
1031 <xsl:template name="callout.arearefs">
1032 <xsl:param name="arearefs"/>
1033 <xsl:if test="$arearefs!=''">
1035 <xsl:when test="substring-before($arearefs,' ')=''">
1036 <xsl:call-template name="callout.arearef">
1037 <xsl:with-param name="arearef" select="$arearefs"/>
1038 </xsl:call-template>
1041 <xsl:call-template name="callout.arearef">
1042 <xsl:with-param name="arearef" select="substring-before($arearefs,' ')"/>
1043 </xsl:call-template>
1046 <xsl:call-template name="callout.arearefs">
1047 <xsl:with-param name="arearefs" select="substring-after($arearefs,' ')"/>
1048 </xsl:call-template>
1052 <xsl:template name="callout.arearef">
1053 <xsl:param name="arearef"/>
1054 <xsl:variable name="targets" select="key('id',$arearef)"/>
1055 <xsl:variable name="target" select="$targets[1]"/>
1057 <xsl:call-template name="check.id.unique">
1058 <xsl:with-param name="linkend" select="$arearef"/>
1059 </xsl:call-template>
1062 <xsl:when test="count($target)=0">
1063 <xsl:text>???</xsl:text>
1065 <xsl:when test="local-name($target)='co'">
1067 <xsl:attribute name="href">
1068 <xsl:text>#</xsl:text>
1069 <xsl:value-of select="$arearef"/>
1071 <xsl:apply-templates select="$target" mode="callout-bug"/>
1073 <xsl:text> </xsl:text>
1075 <xsl:when test="local-name($target)='areaset'">
1076 <xsl:call-template name="callout-bug">
1077 <xsl:with-param name="conum">
1078 <xsl:apply-templates select="$target" mode="conumber"/>
1080 </xsl:call-template>
1082 <xsl:when test="local-name($target)='area'">
1084 <xsl:when test="$target/parent::areaset">
1085 <xsl:call-template name="callout-bug">
1086 <xsl:with-param name="conum">
1087 <xsl:apply-templates select="$target/parent::areaset" mode="conumber"/>
1089 </xsl:call-template>
1092 <xsl:call-template name="callout-bug">
1093 <xsl:with-param name="conum">
1094 <xsl:apply-templates select="$target" mode="conumber"/>
1096 </xsl:call-template>
1101 <xsl:text>???</xsl:text>
1106 <!-- ==================================================================== -->
1108 <xsl:template name="orderedlist-starting-number">
1109 <xsl:param name="list" select="."/>
1110 <xsl:variable name="pi-start">
1111 <xsl:call-template name="pi.dbhtml_start">
1112 <xsl:with-param name="node" select="$list"/>
1113 </xsl:call-template>
1115 <xsl:call-template name="output-orderedlist-starting-number">
1116 <xsl:with-param name="list" select="$list"/>
1117 <xsl:with-param name="pi-start" select="$pi-start"/>
1118 </xsl:call-template>