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">
35 <xsl:if test="@spacing='compact'"><xsl:message><xsl:text>Compact spacing via @spacing attribute cannot be set in strict XHTML output for listitem: </xsl:text><xsl:value-of select="@spacing"/></xsl:message></xsl:if>
36 <xsl:apply-templates select="listitem |comment()[preceding-sibling::listitem] |processing-instruction()[preceding-sibling::listitem]"/>
41 <xsl:template match="itemizedlist/title">
45 <xsl:template match="itemizedlist/listitem">
46 <xsl:variable name="mark" select="../@mark"/>
47 <xsl:variable name="override" select="@override"/>
49 <xsl:variable name="usemark">
51 <xsl:when test="$override != ''">
52 <xsl:value-of select="$override"/>
55 <xsl:value-of select="$mark"/>
60 <xsl:variable name="cssmark">
62 <xsl:when test="$usemark = 'opencircle'">circle</xsl:when>
63 <xsl:when test="$usemark = 'bullet'">disc</xsl:when>
64 <xsl:when test="$usemark = 'box'">square</xsl:when>
66 <xsl:value-of select="$usemark"/>
72 <xsl:call-template name="common.html.attributes"/>
73 <xsl:if test="$css.decoration = '1' and $cssmark != ''">
74 <xsl:attribute name="style">
75 <xsl:text>list-style-type: </xsl:text>
76 <xsl:value-of select="$cssmark"/>
80 <!-- we can't just drop the anchor in since some browsers (Opera)
81 get confused about line breaks if we do. So if the first child
82 is a para, assume the para will put in the anchor. Otherwise,
83 put the anchor in anyway. -->
84 <xsl:if test="local-name(child::*[1]) != 'para'">
85 <xsl:call-template name="anchor"/>
89 <xsl:when test="$show.revisionflag != 0 and @revisionflag">
90 <div class="{@revisionflag}">
91 <xsl:apply-templates/>
95 <xsl:apply-templates/>
101 <xsl:template match="orderedlist">
102 <xsl:variable name="start">
103 <xsl:call-template name="orderedlist-starting-number"/>
106 <xsl:variable name="numeration">
107 <xsl:call-template name="list.numeration"/>
110 <xsl:variable name="type">
112 <xsl:when test="$numeration='arabic'">1</xsl:when>
113 <xsl:when test="$numeration='loweralpha'">a</xsl:when>
114 <xsl:when test="$numeration='lowerroman'">i</xsl:when>
115 <xsl:when test="$numeration='upperalpha'">A</xsl:when>
116 <xsl:when test="$numeration='upperroman'">I</xsl:when>
117 <!-- What!? This should never happen -->
120 <xsl:text>Unexpected numeration: </xsl:text>
121 <xsl:value-of select="$numeration"/>
123 <xsl:value-of select="1"/>
129 <xsl:call-template name="common.html.attributes"/>
130 <xsl:call-template name="anchor"/>
132 <xsl:if test="title">
133 <xsl:call-template name="formal.object.heading"/>
136 <!-- Preserve order of PIs and comments -->
137 <xsl:apply-templates select="*[not(self::listitem or self::title or self::titleabbrev)] |comment()[not(preceding-sibling::listitem)] |processing-instruction()[not(preceding-sibling::listitem)]"/>
140 <xsl:when test="@inheritnum='inherit' and ancestor::listitem[parent::orderedlist]">
142 <xsl:call-template name="generate.class.attribute"/>
143 <col align="{$direction.align.start}" valign="top"/>
145 <xsl:apply-templates mode="orderedlist-table" select="listitem |comment()[preceding-sibling::listitem] |processing-instruction()[preceding-sibling::listitem]"/>
151 <xsl:call-template name="generate.class.attribute"/>
152 <xsl:if test="$start != '1'"><xsl:message><xsl:text>Strict XHTML does not allow setting @start attribute for lists! </xsl:text></xsl:message></xsl:if>
153 <xsl:if test="$numeration != ''">
156 <xsl:if test="@spacing='compact'"><xsl:message><xsl:text>Compact spacing via @spacing attribute cannot be set in strict XHTML output for listitem: </xsl:text><xsl:value-of select="@spacing"/></xsl:message></xsl:if>
157 <xsl:apply-templates select="listitem |comment()[preceding-sibling::listitem] |processing-instruction()[preceding-sibling::listitem]"/>
164 <xsl:template match="orderedlist/title">
168 <xsl:template match="orderedlist/listitem">
170 <xsl:call-template name="common.html.attributes"/>
171 <xsl:if test="@override"><xsl:message><xsl:text>@override attribute cannot be set in strict XHTML output for listitem: </xsl:text><xsl:value-of select="@override"/></xsl:message></xsl:if>
173 <!-- we can't just drop the anchor in since some browsers (Opera)
174 get confused about line breaks if we do. So if the first child
175 is a para, assume the para will put in the anchor. Otherwise,
176 put the anchor in anyway. -->
177 <xsl:if test="local-name(child::*[1]) != 'para'">
178 <xsl:call-template name="anchor"/>
182 <xsl:when test="$show.revisionflag != 0 and @revisionflag">
183 <div class="{@revisionflag}">
184 <xsl:apply-templates/>
188 <xsl:apply-templates/>
194 <xsl:template match="orderedlist/listitem" mode="orderedlist-table">
197 <xsl:apply-templates select="." mode="item-number"/>
200 <xsl:if test="local-name(child::*[1]) != 'para'">
201 <xsl:call-template name="anchor"/>
205 <xsl:when test="$show.revisionflag != 0 and @revisionflag">
206 <div class="{@revisionflag}">
207 <xsl:apply-templates/>
211 <xsl:apply-templates/>
218 <xsl:template match="variablelist">
219 <xsl:variable name="pi-presentation">
220 <xsl:call-template name="pi.dbhtml_list-presentation"/>
223 <xsl:variable name="presentation">
225 <xsl:when test="$pi-presentation != ''">
226 <xsl:value-of select="$pi-presentation"/>
228 <xsl:when test="$variablelist.as.table != 0">
229 <xsl:value-of select="'table'"/>
232 <xsl:value-of select="'list'"/>
237 <xsl:variable name="list-width">
238 <xsl:call-template name="pi.dbhtml_list-width"/>
241 <xsl:variable name="term-width">
242 <xsl:call-template name="pi.dbhtml_term-width"/>
245 <xsl:variable name="table-summary">
246 <xsl:call-template name="pi.dbhtml_table-summary"/>
250 <xsl:call-template name="common.html.attributes"/>
251 <xsl:call-template name="anchor"/>
252 <xsl:if test="title">
253 <xsl:call-template name="formal.object.heading"/>
257 <xsl:when test="$presentation = 'table'">
258 <!-- Preserve order of PIs and comments -->
259 <xsl:apply-templates select="*[not(self::varlistentry or self::title or self::titleabbrev)] |comment()[not(preceding-sibling::varlistentry)] |processing-instruction()[not(preceding-sibling::varlistentry)]"/>
261 <xsl:if test="$list-width != ''">
262 <xsl:attribute name="width">
263 <xsl:value-of select="$list-width"/>
266 <xsl:if test="$table-summary != ''">
267 <xsl:attribute name="summary">
268 <xsl:value-of select="$table-summary"/>
271 <col align="{$direction.align.start}" valign="top">
272 <xsl:if test="$term-width != ''">
273 <xsl:attribute name="width">
274 <xsl:value-of select="$term-width"/>
279 <xsl:apply-templates mode="varlist-table" select="varlistentry |comment()[preceding-sibling::varlistentry] |processing-instruction()[preceding-sibling::varlistentry]"/>
284 <!-- Preserve order of PIs and comments -->
285 <xsl:apply-templates select="*[not(self::varlistentry or self::title or self::titleabbrev)] |comment()[not(preceding-sibling::varlistentry)] |processing-instruction()[not(preceding-sibling::varlistentry)]"/>
287 <xsl:apply-templates select="varlistentry |comment()[preceding-sibling::varlistentry] |processing-instruction()[preceding-sibling::varlistentry]"/>
294 <xsl:template match="variablelist/title">
298 <xsl:template match="itemizedlist/titleabbrev|orderedlist/titleabbrev">
302 <xsl:template match="variablelist/titleabbrev">
306 <xsl:template match="listitem" mode="xref">
307 <xsl:number format="1"/>
310 <xsl:template match="listitem/simpara" priority="2">
311 <!-- If a listitem contains only a single simpara, don't output
312 the <p> wrapper; this has the effect of creating an li
313 with simple text content. -->
315 <xsl:when test="not(preceding-sibling::*) and not (following-sibling::*)">
316 <xsl:call-template name="anchor"/>
317 <xsl:apply-templates/>
322 <xsl:when test="@role and $para.propagates.style != 0">
323 <xsl:call-template name="common.html.attributes">
324 <xsl:with-param name="class" select="@role"/>
328 <xsl:call-template name="common.html.attributes"/>
332 <xsl:call-template name="anchor"/>
333 <xsl:apply-templates/>
339 <xsl:template match="varlistentry">
341 <xsl:call-template name="anchor"/>
342 <xsl:apply-templates select="term"/>
345 <xsl:apply-templates select="listitem"/>
349 <xsl:template match="varlistentry" mode="varlist-table">
350 <xsl:variable name="presentation">
351 <xsl:call-template name="pi.dbhtml_term-presentation">
352 <xsl:with-param name="node" select=".."/>
356 <xsl:variable name="separator">
357 <xsl:call-template name="pi.dbhtml_term-separator">
358 <xsl:with-param name="node" select=".."/>
362 <xsl:call-template name="tr.attributes">
363 <xsl:with-param name="rownum">
364 <xsl:number from="variablelist" count="varlistentry"/>
370 <xsl:call-template name="anchor"/>
372 <xsl:when test="$presentation = 'bold'">
374 <xsl:apply-templates select="term"/>
375 <xsl:value-of select="$separator"/>
378 <xsl:when test="$presentation = 'italic'">
380 <xsl:apply-templates select="term"/>
381 <xsl:value-of select="$separator"/>
384 <xsl:when test="$presentation = 'bold-italic'">
387 <xsl:apply-templates select="term"/>
388 <xsl:value-of select="$separator"/>
393 <xsl:apply-templates select="term"/>
394 <xsl:value-of select="$separator"/>
400 <xsl:apply-templates select="listitem"/>
405 <xsl:template match="varlistentry/term">
407 <xsl:call-template name="common.html.attributes"/>
408 <xsl:call-template name="anchor"/>
409 <xsl:call-template name="simple.xlink">
410 <xsl:with-param name="content">
411 <xsl:apply-templates/>
415 <xsl:when test="position() = last()"/> <!-- do nothing -->
417 <!-- * if we have multiple terms in the same varlistentry, generate -->
418 <!-- * a separator (", " by default) and/or an additional line -->
419 <!-- * break after each one except the last -->
420 <xsl:value-of select="$variablelist.term.separator"/>
421 <xsl:if test="not($variablelist.term.break.after = '0')">
429 <xsl:template match="varlistentry/listitem">
430 <!-- we can't just drop the anchor in since some browsers (Opera)
431 get confused about line breaks if we do. So if the first child
432 is a para, assume the para will put in the anchor. Otherwise,
433 put the anchor in anyway. -->
434 <xsl:if test="local-name(child::*[1]) != 'para'">
435 <xsl:call-template name="anchor"/>
439 <xsl:when test="$show.revisionflag != 0 and @revisionflag">
440 <div class="{@revisionflag}">
441 <xsl:apply-templates/>
445 <xsl:apply-templates/>
450 <!-- ==================================================================== -->
452 <xsl:template match="simplelist">
453 <!-- with no type specified, the default is 'vert' -->
454 <xsl:call-template name="anchor"/>
455 <table border="0" summary="Simple list">
456 <xsl:call-template name="common.html.attributes"/>
457 <xsl:call-template name="simplelist.vert">
458 <xsl:with-param name="cols">
460 <xsl:when test="@columns">
461 <xsl:value-of select="@columns"/>
463 <xsl:otherwise>1</xsl:otherwise>
470 <xsl:template match="simplelist[@type='inline']">
472 <xsl:call-template name="common.html.attributes"/>
473 <!-- if dbchoice PI exists, use that to determine the choice separator -->
474 <!-- (that is, equivalent of "and" or "or" in current locale), or literal -->
475 <!-- value of "choice" otherwise -->
476 <xsl:variable name="localized-choice-separator">
478 <xsl:when test="processing-instruction('dbchoice')">
479 <xsl:call-template name="select.choice.separator"/>
487 <xsl:for-each select="member">
488 <xsl:call-template name="simple.xlink">
489 <xsl:with-param name="content">
490 <xsl:apply-templates/>
494 <xsl:when test="position() = last()"/> <!-- do nothing -->
496 <xsl:text>, </xsl:text>
497 <xsl:if test="position() = last() - 1">
498 <xsl:if test="$localized-choice-separator != ''">
499 <xsl:value-of select="$localized-choice-separator"/>
500 <xsl:text> </xsl:text>
509 <xsl:template match="simplelist[@type='horiz']">
510 <xsl:call-template name="anchor"/>
511 <table border="0" summary="Simple list">
512 <xsl:call-template name="common.html.attributes"/>
513 <xsl:call-template name="simplelist.horiz">
514 <xsl:with-param name="cols">
516 <xsl:when test="@columns">
517 <xsl:value-of select="@columns"/>
519 <xsl:otherwise>1</xsl:otherwise>
526 <xsl:template match="simplelist[@type='vert']">
527 <xsl:call-template name="anchor"/>
528 <table border="0" summary="Simple list">
529 <xsl:call-template name="common.html.attributes"/>
530 <xsl:call-template name="simplelist.vert">
531 <xsl:with-param name="cols">
533 <xsl:when test="@columns">
534 <xsl:value-of select="@columns"/>
536 <xsl:otherwise>1</xsl:otherwise>
543 <xsl:template name="simplelist.horiz">
544 <xsl:param name="cols">1</xsl:param>
545 <xsl:param name="cell">1</xsl:param>
546 <xsl:param name="members" select="./member"/>
548 <xsl:if test="$cell <= count($members)">
550 <xsl:call-template name="tr.attributes">
551 <xsl:with-param name="row" select="$members[1]"/>
552 <xsl:with-param name="rownum" select="(($cell - 1) div $cols) + 1"/>
555 <xsl:call-template name="simplelist.horiz.row">
556 <xsl:with-param name="cols" select="$cols"/>
557 <xsl:with-param name="cell" select="$cell"/>
558 <xsl:with-param name="members" select="$members"/>
561 <xsl:call-template name="simplelist.horiz">
562 <xsl:with-param name="cols" select="$cols"/>
563 <xsl:with-param name="cell" select="$cell + $cols"/>
564 <xsl:with-param name="members" select="$members"/>
569 <xsl:template name="simplelist.horiz.row">
570 <xsl:param name="cols">1</xsl:param>
571 <xsl:param name="cell">1</xsl:param>
572 <xsl:param name="members" select="./member"/>
573 <xsl:param name="curcol">1</xsl:param>
575 <xsl:if test="$curcol <= $cols">
578 <xsl:when test="$members[position()=$cell]">
579 <xsl:apply-templates select="$members[position()=$cell]"/>
582 <xsl:text> </xsl:text>
586 <xsl:call-template name="simplelist.horiz.row">
587 <xsl:with-param name="cols" select="$cols"/>
588 <xsl:with-param name="cell" select="$cell+1"/>
589 <xsl:with-param name="members" select="$members"/>
590 <xsl:with-param name="curcol" select="$curcol+1"/>
595 <xsl:template name="simplelist.vert">
596 <xsl:param name="cols">1</xsl:param>
597 <xsl:param name="cell">1</xsl:param>
598 <xsl:param name="members" select="./member"/>
599 <xsl:param name="rows" select="floor((count($members)+$cols - 1) div $cols)"/>
601 <xsl:if test="$cell <= $rows">
603 <xsl:call-template name="tr.attributes">
604 <xsl:with-param name="row" select="$members[1]"/>
605 <xsl:with-param name="rownum" select="$cell"/>
608 <xsl:call-template name="simplelist.vert.row">
609 <xsl:with-param name="cols" select="$cols"/>
610 <xsl:with-param name="rows" select="$rows"/>
611 <xsl:with-param name="cell" select="$cell"/>
612 <xsl:with-param name="members" select="$members"/>
615 <xsl:call-template name="simplelist.vert">
616 <xsl:with-param name="cols" select="$cols"/>
617 <xsl:with-param name="cell" select="$cell+1"/>
618 <xsl:with-param name="members" select="$members"/>
619 <xsl:with-param name="rows" select="$rows"/>
624 <xsl:template name="simplelist.vert.row">
625 <xsl:param name="cols">1</xsl:param>
626 <xsl:param name="rows">1</xsl:param>
627 <xsl:param name="cell">1</xsl:param>
628 <xsl:param name="members" select="./member"/>
629 <xsl:param name="curcol">1</xsl:param>
631 <xsl:if test="$curcol <= $cols">
634 <xsl:when test="$members[position()=$cell]">
635 <xsl:apply-templates select="$members[position()=$cell]"/>
638 <xsl:text> </xsl:text>
642 <xsl:call-template name="simplelist.vert.row">
643 <xsl:with-param name="cols" select="$cols"/>
644 <xsl:with-param name="rows" select="$rows"/>
645 <xsl:with-param name="cell" select="$cell+$rows"/>
646 <xsl:with-param name="members" select="$members"/>
647 <xsl:with-param name="curcol" select="$curcol+1"/>
652 <xsl:template match="member">
653 <xsl:call-template name="anchor"/>
654 <xsl:call-template name="simple.xlink">
655 <xsl:with-param name="content">
656 <xsl:apply-templates/>
661 <!-- ==================================================================== -->
663 <xsl:template match="procedure">
664 <xsl:variable name="param.placement" select="substring-after(normalize-space($formal.title.placement), concat(local-name(.), ' '))"/>
666 <xsl:variable name="placement">
668 <xsl:when test="contains($param.placement, ' ')">
669 <xsl:value-of select="substring-before($param.placement, ' ')"/>
671 <xsl:when test="$param.placement = ''">before</xsl:when>
673 <xsl:value-of select="$param.placement"/>
678 <!-- Preserve order of PIs and comments -->
679 <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)]"/>
682 <xsl:call-template name="common.html.attributes"/>
683 <xsl:call-template name="anchor">
684 <xsl:with-param name="conditional">
686 <xsl:when test="title">0</xsl:when>
687 <xsl:otherwise>1</xsl:otherwise>
692 <xsl:if test="title and $placement = 'before'">
693 <xsl:call-template name="formal.object.heading"/>
696 <xsl:apply-templates select="$preamble"/>
699 <xsl:when test="count(step) = 1">
701 <xsl:call-template name="generate.class.attribute"/>
702 <xsl:apply-templates select="step |comment()[preceding-sibling::step] |processing-instruction()[preceding-sibling::step]"/>
707 <xsl:call-template name="generate.class.attribute"/>
709 <xsl:apply-templates select="step |comment()[preceding-sibling::step] |processing-instruction()[preceding-sibling::step]"/>
714 <xsl:if test="title and $placement != 'before'">
715 <xsl:call-template name="formal.object.heading"/>
720 <xsl:template match="procedure/title">
724 <xsl:template match="substeps"><xsl:variable name="numeration"><xsl:call-template name="procedure.step.numeration"/></xsl:variable><xsl:variable name="cssstyle"><xsl:choose><xsl:when test="$numeration = '1'">decimal</xsl:when><xsl:when test="$numeration = 'a'">lower-alpha</xsl:when><xsl:when test="$numeration = 'i'">lower-roman</xsl:when><xsl:when test="$numeration = 'A'">upper-alpha</xsl:when><xsl:when test="$numeration = 'I'">upper-roman</xsl:when><xsl:otherwise><xsl:message>Warning: unknown procedure.step.numeration value: <xsl:value-of select="$numeration"/></xsl:message></xsl:otherwise></xsl:choose></xsl:variable><xsl:call-template name="anchor"/><ol><xsl:attribute name="style"><xsl:text>list-style-type: </xsl:text><xsl:value-of select="$cssstyle"/></xsl:attribute><xsl:apply-templates/></ol></xsl:template>
726 <xsl:template match="step">
728 <xsl:call-template name="common.html.attributes"/>
729 <xsl:call-template name="anchor"/>
730 <xsl:apply-templates/>
734 <xsl:template match="stepalternatives">
735 <xsl:call-template name="anchor"/>
737 <xsl:call-template name="common.html.attributes"/>
738 <xsl:apply-templates/>
742 <xsl:template match="step/title">
744 <xsl:call-template name="common.html.attributes"/>
745 <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform">
746 <xsl:apply-templates/>
751 <!-- ==================================================================== -->
753 <xsl:template match="segmentedlist">
754 <xsl:variable name="presentation">
755 <xsl:call-template name="pi.dbhtml_list-presentation"/>
759 <xsl:call-template name="common.html.attributes"/>
760 <xsl:call-template name="anchor"/>
763 <xsl:when test="$presentation = 'table'">
764 <xsl:apply-templates select="." mode="seglist-table"/>
766 <xsl:when test="$presentation = 'list'">
767 <xsl:apply-templates/>
769 <xsl:when test="$segmentedlist.as.table != 0">
770 <xsl:apply-templates select="." mode="seglist-table"/>
773 <xsl:apply-templates/>
779 <xsl:template match="segmentedlist/title">
781 <xsl:call-template name="common.html.attributes"/>
784 <xsl:call-template name="generate.class.attribute"/>
785 <xsl:apply-templates/>
791 <xsl:template match="segtitle">
794 <xsl:template match="segtitle" mode="segtitle-in-seg">
795 <xsl:apply-templates/>
798 <xsl:template match="seglistitem">
800 <xsl:call-template name="common.html.attributes"/>
801 <xsl:call-template name="anchor"/>
802 <xsl:apply-templates/>
806 <xsl:template match="seg">
807 <xsl:variable name="segnum" select="count(preceding-sibling::seg)+1"/>
808 <xsl:variable name="seglist" select="ancestor::segmentedlist"/>
809 <xsl:variable name="segtitles" select="$seglist/segtitle"/>
812 Note: segtitle is only going to be the right thing in a well formed
813 SegmentedList. If there are too many Segs or too few SegTitles,
814 you'll get something odd...maybe an error
818 <xsl:call-template name="common.html.attributes"/>
820 <span class="segtitle">
821 <xsl:apply-templates select="$segtitles[$segnum=position()]" mode="segtitle-in-seg"/>
822 <xsl:text>: </xsl:text>
825 <xsl:apply-templates/>
829 <xsl:template match="segmentedlist" mode="seglist-table">
830 <xsl:variable name="table-summary">
831 <xsl:call-template name="pi.dbhtml_table-summary"/>
834 <xsl:variable name="list-width">
835 <xsl:call-template name="pi.dbhtml_list-width"/>
838 <xsl:apply-templates select="title"/>
841 <xsl:if test="$list-width != ''">
842 <xsl:attribute name="width">
843 <xsl:value-of select="$list-width"/>
846 <xsl:if test="$table-summary != ''">
847 <xsl:attribute name="summary">
848 <xsl:value-of select="$table-summary"/>
852 <tr class="segtitle">
853 <xsl:call-template name="tr.attributes">
854 <xsl:with-param name="row" select="segtitle[1]"/>
855 <xsl:with-param name="rownum" select="1"/>
857 <xsl:apply-templates select="segtitle" mode="seglist-table"/>
861 <xsl:apply-templates select="seglistitem" mode="seglist-table"/>
866 <xsl:template match="segtitle" mode="seglist-table">
867 <th><xsl:apply-templates/></th>
870 <xsl:template match="seglistitem" mode="seglist-table">
871 <xsl:variable name="seglinum">
872 <xsl:number from="segmentedlist" count="seglistitem"/>
876 <xsl:call-template name="common.html.attributes"/>
877 <xsl:call-template name="tr.attributes">
878 <xsl:with-param name="rownum" select="$seglinum + 1"/>
880 <xsl:apply-templates mode="seglist-table"/>
884 <xsl:template match="seg" mode="seglist-table">
886 <xsl:call-template name="common.html.attributes"/>
887 <xsl:apply-templates/>
891 <xsl:template match="seg[1]" mode="seglist-table">
893 <xsl:call-template name="common.html.attributes"/>
894 <xsl:call-template name="anchor">
895 <xsl:with-param name="node" select="ancestor::seglistitem"/>
897 <xsl:apply-templates/>
901 <!-- ==================================================================== -->
903 <xsl:template match="calloutlist">
905 <xsl:call-template name="common.html.attributes"/>
906 <xsl:call-template name="anchor"/>
907 <xsl:if test="title|info/title">
908 <xsl:call-template name="formal.object.heading"/>
911 <!-- Preserve order of PIs and comments -->
912 <xsl:apply-templates select="*[not(self::callout or self::title or self::titleabbrev)] |comment()[not(preceding-sibling::callout)] |processing-instruction()[not(preceding-sibling::callout)]"/>
915 <xsl:when test="$callout.list.table != 0">
916 <table border="0" summary="Callout list">
917 <xsl:apply-templates select="callout |comment()[preceding-sibling::callout] |processing-instruction()[preceding-sibling::callout]"/>
921 <dl compact="compact">
922 <xsl:apply-templates select="callout |comment()[preceding-sibling::callout] |processing-instruction()[preceding-sibling::callout]"/>
929 <xsl:template match="calloutlist/title">
932 <xsl:template match="callout">
934 <xsl:when test="$callout.list.table != 0">
936 <xsl:call-template name="tr.attributes">
937 <xsl:with-param name="rownum">
938 <xsl:number from="calloutlist" count="callout"/>
942 <td valign="top" align="{$direction.align.start}">
944 <xsl:call-template name="anchor"/>
945 <xsl:call-template name="callout.arearefs">
946 <xsl:with-param name="arearefs" select="@arearefs"/>
950 <td valign="top" align="{$direction.align.start}">
951 <xsl:apply-templates/>
957 <xsl:call-template name="anchor"/>
958 <xsl:call-template name="callout.arearefs">
959 <xsl:with-param name="arearefs" select="@arearefs"/>
962 <dd><xsl:apply-templates/></dd>
967 <xsl:template match="callout/simpara" priority="2">
968 <!-- If a callout contains only a single simpara, don't output
969 the <p> wrapper; this has the effect of creating an li
970 with simple text content. -->
972 <xsl:when test="not(preceding-sibling::*) and not (following-sibling::*)">
973 <xsl:call-template name="anchor"/>
974 <xsl:apply-templates/>
978 <xsl:if test="@role and $para.propagates.style != 0">
980 <xsl:when test="@role and $para.propagates.style != 0">
981 <xsl:call-template name="common.html.attributes">
982 <xsl:with-param name="class" select="@role"/>
986 <xsl:call-template name="common.html.attributes"/>
991 <xsl:call-template name="anchor"/>
992 <xsl:apply-templates/>
998 <xsl:template name="callout.arearefs">
999 <xsl:param name="arearefs"/>
1000 <xsl:if test="$arearefs!=''">
1002 <xsl:when test="substring-before($arearefs,' ')=''">
1003 <xsl:call-template name="callout.arearef">
1004 <xsl:with-param name="arearef" select="$arearefs"/>
1005 </xsl:call-template>
1008 <xsl:call-template name="callout.arearef">
1009 <xsl:with-param name="arearef" select="substring-before($arearefs,' ')"/>
1010 </xsl:call-template>
1013 <xsl:call-template name="callout.arearefs">
1014 <xsl:with-param name="arearefs" select="substring-after($arearefs,' ')"/>
1015 </xsl:call-template>
1019 <xsl:template name="callout.arearef">
1020 <xsl:param name="arearef"/>
1021 <xsl:variable name="targets" select="key('id',$arearef)"/>
1022 <xsl:variable name="target" select="$targets[1]"/>
1024 <xsl:call-template name="check.id.unique">
1025 <xsl:with-param name="linkend" select="$arearef"/>
1026 </xsl:call-template>
1029 <xsl:when test="count($target)=0">
1030 <xsl:text>???</xsl:text>
1032 <xsl:when test="local-name($target)='co'">
1034 <xsl:attribute name="href">
1035 <xsl:text>#</xsl:text>
1036 <xsl:value-of select="$arearef"/>
1038 <xsl:apply-templates select="$target" mode="callout-bug"/>
1040 <xsl:text> </xsl:text>
1042 <xsl:when test="local-name($target)='areaset'">
1043 <xsl:call-template name="callout-bug">
1044 <xsl:with-param name="conum">
1045 <xsl:apply-templates select="$target" mode="conumber"/>
1047 </xsl:call-template>
1049 <xsl:when test="local-name($target)='area'">
1051 <xsl:when test="$target/parent::areaset">
1052 <xsl:call-template name="callout-bug">
1053 <xsl:with-param name="conum">
1054 <xsl:apply-templates select="$target/parent::areaset" mode="conumber"/>
1056 </xsl:call-template>
1059 <xsl:call-template name="callout-bug">
1060 <xsl:with-param name="conum">
1061 <xsl:apply-templates select="$target" mode="conumber"/>
1063 </xsl:call-template>
1068 <xsl:text>???</xsl:text>
1073 <!-- ==================================================================== -->
1075 <xsl:template name="orderedlist-starting-number">
1076 <xsl:param name="list" select="."/>
1077 <xsl:variable name="pi-start">
1078 <xsl:call-template name="pi.dbhtml_start">
1079 <xsl:with-param name="node" select="$list"/>
1080 </xsl:call-template>
1082 <xsl:call-template name="output-orderedlist-starting-number">
1083 <xsl:with-param name="list" select="$list"/>
1084 <xsl:with-param name="pi-start" select="$pi-start"/>
1085 </xsl:call-template>