1 <?xml version="1.0" encoding="ASCII"?><!--This file was created automatically by html2xhtml--><!--from the HTML stylesheets.--><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:d="http://docbook.org/ns/docbook" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="d" version="1.0">
3 <!-- ********************************************************************
5 This file is part of the XSL DocBook Stylesheet distribution.
6 See ../README or http://cdn.docbook.org/release/xsl/current/ for
7 copyright and other information.
9 ******************************************************************** -->
11 <!-- ==================================================================== -->
13 <xsl:template match="d:itemizedlist">
14 <!-- Handle spacing="compact" as multiple class attribute instead
15 of the deprecated HTML compact attribute -->
16 <xsl:variable name="default.class">
17 <xsl:value-of select="local-name()"/>
18 <xsl:if test="@spacing = 'compact'">
19 <xsl:text> compact</xsl:text>
23 <xsl:variable name="style.value">
24 <xsl:variable name="type">
25 <xsl:call-template name="list.itemsymbol"/>
28 <xsl:text>list-style-type: </xsl:text>
29 <xsl:value-of select="$type"/>
30 <xsl:text>; </xsl:text>
34 <xsl:call-template name="common.html.attributes"/>
35 <xsl:call-template name="id.attribute"/>
36 <xsl:call-template name="anchor"/>
37 <xsl:if test="d:title|d:info/d:title">
38 <xsl:call-template name="formal.object.heading"/>
41 <!-- Preserve order of PIs and comments -->
42 <xsl:apply-templates select="*[not(self::d:listitem or self::d:title or self::d:titleabbrev)] |comment()[not(preceding-sibling::d:listitem)] |processing-instruction()[not(preceding-sibling::d:listitem)]"/>
45 <xsl:call-template name="generate.class.attribute">
46 <xsl:with-param name="class" select="$default.class"/>
49 <xsl:when test="$css.decoration != 0">
50 <xsl:attribute name="style">
51 <xsl:value-of select="$style.value"/>
54 <xsl:when test="$make.clean.html != 0">
55 <!-- styled by separate css only -->
58 <!-- use the old @type attribute -->
59 <xsl:attribute name="type">
60 <xsl:call-template name="list.itemsymbol"/>
65 <xsl:apply-templates select="d:listitem |comment()[preceding-sibling::d:listitem] |processing-instruction()[preceding-sibling::d:listitem]"/>
70 <xsl:template match="d:itemizedlist/d:title">
74 <xsl:template match="d:itemizedlist/d:listitem">
75 <xsl:variable name="mark" select="../@mark"/>
76 <xsl:variable name="override" select="@override"/>
78 <xsl:variable name="usemark">
80 <xsl:when test="$override != ''">
81 <xsl:value-of select="$override"/>
84 <xsl:value-of select="$mark"/>
89 <xsl:variable name="cssmark">
91 <xsl:when test="$usemark = 'opencircle'">circle</xsl:when>
92 <xsl:when test="$usemark = 'bullet'">disc</xsl:when>
93 <xsl:when test="$usemark = 'box'">square</xsl:when>
95 <xsl:value-of select="$usemark"/>
101 <xsl:call-template name="common.html.attributes"/>
102 <xsl:call-template name="id.attribute"/>
103 <xsl:if test="$css.decoration = '1' and $cssmark != ''">
104 <xsl:attribute name="style">
105 <xsl:text>list-style-type: </xsl:text>
106 <xsl:value-of select="$cssmark"/>
110 <!-- we can't just drop the anchor in since some browsers (Opera)
111 get confused about line breaks if we do. So if the first child
112 is a para, assume the para will put in the anchor. Otherwise,
113 put the anchor in anyway. -->
114 <xsl:if test="local-name(child::*[1]) != 'para'">
115 <xsl:call-template name="anchor"/>
119 <xsl:when test="$show.revisionflag != 0 and @revisionflag">
120 <div class="{@revisionflag}">
121 <xsl:apply-templates/>
125 <xsl:apply-templates/>
131 <xsl:template match="d:orderedlist">
132 <!-- Handle spacing="compact" as multiple class attribute instead
133 of the deprecated HTML compact attribute -->
134 <xsl:variable name="default.class">
135 <xsl:value-of select="local-name()"/>
136 <xsl:if test="@spacing = 'compact'">
137 <xsl:text> compact</xsl:text>
141 <xsl:variable name="start">
142 <xsl:call-template name="orderedlist-starting-number"/>
145 <xsl:variable name="numeration">
146 <xsl:call-template name="list.numeration"/>
149 <xsl:variable name="type">
151 <xsl:when test="$numeration='arabic'">1</xsl:when>
152 <xsl:when test="$numeration='loweralpha'">a</xsl:when>
153 <xsl:when test="$numeration='lowerroman'">i</xsl:when>
154 <xsl:when test="$numeration='upperalpha'">A</xsl:when>
155 <xsl:when test="$numeration='upperroman'">I</xsl:when>
156 <!-- What!? This should never happen -->
159 <xsl:text>Unexpected numeration: </xsl:text>
160 <xsl:value-of select="$numeration"/>
162 <xsl:value-of select="1"/>
168 <xsl:call-template name="common.html.attributes"/>
169 <xsl:call-template name="id.attribute"/>
170 <xsl:call-template name="anchor"/>
172 <xsl:if test="d:title|d:info/d:title">
173 <xsl:call-template name="formal.object.heading"/>
176 <!-- Preserve order of PIs and comments -->
177 <xsl:apply-templates select="*[not(self::d:listitem or self::d:title or self::d:titleabbrev)] |comment()[not(preceding-sibling::d:listitem)] |processing-instruction()[not(preceding-sibling::d:listitem)]"/>
180 <xsl:when test="@inheritnum='inherit' and ancestor::d:listitem[parent::d:orderedlist]">
181 <table border="{$table.border.off}">
182 <xsl:call-template name="generate.class.attribute">
183 <xsl:with-param name="class" select="$default.class"/>
186 <col align="{$direction.align.start}" valign="top"/>
190 <xsl:apply-templates mode="orderedlist-table" select="d:listitem |comment()[preceding-sibling::d:listitem] |processing-instruction()[preceding-sibling::d:listitem]"/>
196 <xsl:call-template name="generate.class.attribute">
197 <xsl:with-param name="class" select="$default.class"/>
199 <xsl:if test="$start != '1'">
200 <xsl:attribute name="start">
201 <xsl:value-of select="$start"/>
204 <xsl:if test="$numeration != ''">
205 <xsl:attribute name="type">
206 <xsl:value-of select="$type"/>
209 <xsl:apply-templates select="d:listitem |comment()[preceding-sibling::d:listitem] |processing-instruction()[preceding-sibling::d:listitem]"/>
216 <xsl:template match="d:orderedlist/d:title">
220 <xsl:template match="d:orderedlist/d:listitem">
222 <xsl:call-template name="common.html.attributes"/>
223 <xsl:call-template name="id.attribute"/>
224 <xsl:if test="@override">
225 <xsl:attribute name="value">
226 <xsl:value-of select="@override"/>
230 <!-- we can't just drop the anchor in since some browsers (Opera)
231 get confused about line breaks if we do. So if the first child
232 is a para, assume the para will put in the anchor. Otherwise,
233 put the anchor in anyway. -->
234 <xsl:if test="local-name(child::*[1]) != 'para'">
235 <xsl:call-template name="anchor"/>
239 <xsl:when test="$show.revisionflag != 0 and @revisionflag">
240 <div class="{@revisionflag}">
241 <xsl:apply-templates/>
245 <xsl:apply-templates/>
251 <xsl:template match="d:orderedlist/d:listitem" mode="orderedlist-table">
254 <xsl:apply-templates select="." mode="item-number"/>
257 <xsl:if test="local-name(child::*[1]) != 'para'">
258 <xsl:call-template name="id.attribute"/>
259 <xsl:call-template name="anchor"/>
263 <xsl:when test="$show.revisionflag != 0 and @revisionflag">
264 <div class="{@revisionflag}">
265 <xsl:apply-templates/>
269 <xsl:apply-templates/>
276 <xsl:template match="d:variablelist">
277 <xsl:variable name="pi-presentation">
278 <xsl:call-template name="pi.dbhtml_list-presentation"/>
280 <!-- Handle spacing="compact" as multiple class attribute instead
281 of the deprecated HTML compact attribute -->
282 <xsl:variable name="default.class">
283 <xsl:value-of select="local-name()"/>
284 <xsl:if test="@spacing = 'compact'">
285 <xsl:text> compact</xsl:text>
290 <xsl:variable name="presentation">
292 <xsl:when test="$pi-presentation != ''">
293 <xsl:value-of select="$pi-presentation"/>
295 <xsl:when test="$variablelist.as.table != 0">
296 <xsl:value-of select="'table'"/>
299 <xsl:value-of select="'list'"/>
304 <xsl:variable name="list-width">
305 <xsl:call-template name="pi.dbhtml_list-width"/>
308 <xsl:variable name="term-width">
309 <xsl:call-template name="pi.dbhtml_term-width"/>
312 <xsl:variable name="table-summary">
313 <xsl:call-template name="pi.dbhtml_table-summary"/>
317 <xsl:call-template name="common.html.attributes"/>
318 <xsl:call-template name="id.attribute"/>
319 <xsl:call-template name="anchor"/>
320 <xsl:if test="d:title|d:info/d:title">
321 <xsl:call-template name="formal.object.heading"/>
325 <xsl:when test="$presentation = 'table'">
326 <!-- Preserve order of PIs and comments -->
327 <xsl:apply-templates select="*[not(self::d:varlistentry or self::d:title or self::d:titleabbrev)] |comment()[not(preceding-sibling::d:varlistentry)] |processing-instruction()[not(preceding-sibling::d:varlistentry)]"/>
328 <table border="{$table.border.off}">
329 <xsl:call-template name="generate.class.attribute">
330 <xsl:with-param name="class" select="$default.class"/>
332 <xsl:if test="$list-width != ''">
333 <xsl:attribute name="width">
334 <xsl:value-of select="$list-width"/>
337 <xsl:if test="$table-summary != ''">
338 <xsl:attribute name="summary">
339 <xsl:value-of select="$table-summary"/>
343 <col align="{$direction.align.start}" valign="top">
344 <xsl:if test="$term-width != ''">
345 <xsl:attribute name="width">
346 <xsl:value-of select="$term-width"/>
353 <xsl:apply-templates mode="varlist-table" select="d:varlistentry |comment()[preceding-sibling::d:varlistentry] |processing-instruction()[preceding-sibling::d:varlistentry]"/>
358 <!-- Preserve order of PIs and comments -->
359 <xsl:apply-templates select="*[not(self::d:varlistentry or self::d:title or self::d:titleabbrev)] |comment()[not(preceding-sibling::d:varlistentry)] |processing-instruction()[not(preceding-sibling::d:varlistentry)]"/>
361 <xsl:call-template name="generate.class.attribute">
362 <xsl:with-param name="class" select="$default.class"/>
364 <xsl:apply-templates select="d:varlistentry |comment()[preceding-sibling::d:varlistentry] |processing-instruction()[preceding-sibling::d:varlistentry]"/>
371 <xsl:template match="d:variablelist/d:title">
375 <xsl:template match="d:itemizedlist/d:titleabbrev|d:orderedlist/d:titleabbrev">
379 <xsl:template match="d:variablelist/d:titleabbrev">
383 <xsl:template match="d:listitem" mode="xref">
384 <xsl:number format="1"/>
387 <xsl:template match="d:listitem/d:simpara" priority="2">
388 <!-- If a listitem contains only a single simpara, don't output
389 the <p> wrapper; this has the effect of creating an li
390 with simple text content. -->
392 <xsl:when test="not(preceding-sibling::*) and not (following-sibling::*)">
393 <xsl:call-template name="anchor"/>
394 <xsl:apply-templates/>
398 <xsl:call-template name="id.attribute"/>
400 <xsl:when test="@role and $para.propagates.style != 0">
401 <xsl:call-template name="common.html.attributes">
402 <xsl:with-param name="class" select="@role"/>
406 <xsl:call-template name="common.html.attributes"/>
410 <xsl:call-template name="anchor"/>
411 <xsl:apply-templates/>
417 <xsl:template match="d:varlistentry">
419 <xsl:call-template name="id.attribute"/>
420 <xsl:call-template name="anchor"/>
421 <xsl:apply-templates select="d:term"/>
424 <xsl:apply-templates select="d:listitem"/>
428 <xsl:template match="d:varlistentry" mode="varlist-table">
429 <xsl:variable name="presentation">
430 <xsl:call-template name="pi.dbhtml_term-presentation">
431 <xsl:with-param name="node" select=".."/>
435 <xsl:variable name="separator">
436 <xsl:call-template name="pi.dbhtml_term-separator">
437 <xsl:with-param name="node" select=".."/>
441 <xsl:call-template name="tr.attributes">
442 <xsl:with-param name="rownum">
443 <xsl:number from="d:variablelist" count="d:varlistentry"/>
448 <xsl:call-template name="id.attribute"/>
450 <xsl:call-template name="anchor"/>
452 <xsl:when test="$presentation = 'bold'">
454 <xsl:apply-templates select="d:term"/>
455 <xsl:value-of select="$separator"/>
458 <xsl:when test="$presentation = 'italic'">
460 <xsl:apply-templates select="d:term"/>
461 <xsl:value-of select="$separator"/>
464 <xsl:when test="$presentation = 'bold-italic'">
467 <xsl:apply-templates select="d:term"/>
468 <xsl:value-of select="$separator"/>
473 <xsl:apply-templates select="d:term"/>
474 <xsl:value-of select="$separator"/>
480 <xsl:apply-templates select="d:listitem"/>
485 <xsl:template match="d:varlistentry/d:term">
487 <xsl:call-template name="common.html.attributes"/>
488 <xsl:call-template name="id.attribute"/>
489 <xsl:call-template name="anchor"/>
490 <xsl:call-template name="simple.xlink">
491 <xsl:with-param name="content">
492 <xsl:apply-templates/>
496 <xsl:when test="position() = last()"/> <!-- do nothing -->
498 <!-- * if we have multiple terms in the same varlistentry, generate -->
499 <!-- * a separator (", " by default) and/or an additional line -->
500 <!-- * break after each one except the last -->
501 <xsl:value-of select="$variablelist.term.separator"/>
502 <xsl:if test="not($variablelist.term.break.after = '0')">
510 <xsl:template match="d:varlistentry/d:listitem">
511 <!-- we can't just drop the anchor in since some browsers (Opera)
512 get confused about line breaks if we do. So if the first child
513 is a para, assume the para will put in the anchor. Otherwise,
514 put the anchor in anyway. -->
515 <xsl:if test="local-name(child::*[1]) != 'para'">
516 <xsl:call-template name="anchor"/>
520 <xsl:when test="$show.revisionflag != 0 and @revisionflag">
521 <div class="{@revisionflag}">
522 <xsl:apply-templates/>
526 <xsl:apply-templates/>
531 <!-- ==================================================================== -->
533 <xsl:template match="d:simplelist">
534 <!-- with no type specified, the default is 'vert' -->
535 <xsl:call-template name="anchor"/>
536 <table border="{$table.border.off}">
537 <xsl:if test="$div.element != 'section'">
538 <xsl:attribute name="summary">Simple list</xsl:attribute>
540 <xsl:call-template name="common.html.attributes"/>
541 <xsl:call-template name="id.attribute"/>
542 <xsl:call-template name="simplelist.vert">
543 <xsl:with-param name="cols">
545 <xsl:when test="@columns">
546 <xsl:value-of select="@columns"/>
548 <xsl:otherwise>1</xsl:otherwise>
555 <xsl:template match="d:simplelist[@type='inline']">
557 <xsl:call-template name="common.html.attributes"/>
558 <xsl:call-template name="id.attribute"/>
559 <!-- if dbchoice PI exists, use that to determine the choice separator -->
560 <!-- (that is, equivalent of "and" or "or" in current locale), or literal -->
561 <!-- value of "choice" otherwise -->
562 <xsl:variable name="localized-choice-separator">
564 <xsl:when test="processing-instruction('dbchoice')">
565 <xsl:call-template name="select.choice.separator"/>
573 <xsl:for-each select="d:member">
574 <xsl:call-template name="simple.xlink">
575 <xsl:with-param name="content">
576 <xsl:apply-templates/>
580 <xsl:when test="position() = last()"/> <!-- do nothing -->
582 <xsl:text>, </xsl:text>
583 <xsl:if test="position() = last() - 1">
584 <xsl:if test="$localized-choice-separator != ''">
585 <xsl:value-of select="$localized-choice-separator"/>
586 <xsl:text> </xsl:text>
595 <xsl:template match="d:simplelist[@type='horiz']">
596 <xsl:call-template name="anchor"/>
597 <table border="{$table.border.off}">
598 <xsl:if test="$div.element != 'section'">
599 <xsl:attribute name="summary">Simple list</xsl:attribute>
601 <xsl:call-template name="common.html.attributes"/>
602 <xsl:call-template name="id.attribute"/>
603 <xsl:call-template name="simplelist.horiz">
604 <xsl:with-param name="cols">
606 <xsl:when test="@columns">
607 <xsl:value-of select="@columns"/>
609 <xsl:otherwise>1</xsl:otherwise>
616 <xsl:template match="d:simplelist[@type='vert']">
617 <xsl:call-template name="anchor"/>
618 <table border="{$table.border.off}">
619 <xsl:if test="$div.element != 'section'">
620 <xsl:attribute name="summary">Simple list</xsl:attribute>
622 <xsl:call-template name="common.html.attributes"/>
623 <xsl:call-template name="id.attribute"/>
624 <xsl:call-template name="simplelist.vert">
625 <xsl:with-param name="cols">
627 <xsl:when test="@columns">
628 <xsl:value-of select="@columns"/>
630 <xsl:otherwise>1</xsl:otherwise>
637 <xsl:template name="simplelist.horiz">
638 <xsl:param name="cols">1</xsl:param>
639 <xsl:param name="cell">1</xsl:param>
640 <xsl:param name="members" select="./d:member"/>
642 <xsl:if test="$cell <= count($members)">
644 <xsl:call-template name="tr.attributes">
645 <xsl:with-param name="row" select="$members[1]"/>
646 <xsl:with-param name="rownum" select="(($cell - 1) div $cols) + 1"/>
649 <xsl:call-template name="simplelist.horiz.row">
650 <xsl:with-param name="cols" select="$cols"/>
651 <xsl:with-param name="cell" select="$cell"/>
652 <xsl:with-param name="members" select="$members"/>
655 <xsl:call-template name="simplelist.horiz">
656 <xsl:with-param name="cols" select="$cols"/>
657 <xsl:with-param name="cell" select="$cell + $cols"/>
658 <xsl:with-param name="members" select="$members"/>
663 <xsl:template name="simplelist.horiz.row">
664 <xsl:param name="cols">1</xsl:param>
665 <xsl:param name="cell">1</xsl:param>
666 <xsl:param name="members" select="./d:member"/>
667 <xsl:param name="curcol">1</xsl:param>
669 <xsl:if test="$curcol <= $cols">
672 <xsl:when test="$members[position()=$cell]">
673 <xsl:apply-templates select="$members[position()=$cell]"/>
676 <xsl:text> </xsl:text>
680 <xsl:call-template name="simplelist.horiz.row">
681 <xsl:with-param name="cols" select="$cols"/>
682 <xsl:with-param name="cell" select="$cell+1"/>
683 <xsl:with-param name="members" select="$members"/>
684 <xsl:with-param name="curcol" select="$curcol+1"/>
689 <xsl:template name="simplelist.vert">
690 <xsl:param name="cols">1</xsl:param>
691 <xsl:param name="cell">1</xsl:param>
692 <xsl:param name="members" select="./d:member"/>
693 <xsl:param name="rows" select="floor((count($members)+$cols - 1) div $cols)"/>
695 <xsl:if test="$cell <= $rows">
697 <xsl:call-template name="tr.attributes">
698 <xsl:with-param name="row" select="$members[1]"/>
699 <xsl:with-param name="rownum" select="$cell"/>
702 <xsl:call-template name="simplelist.vert.row">
703 <xsl:with-param name="cols" select="$cols"/>
704 <xsl:with-param name="rows" select="$rows"/>
705 <xsl:with-param name="cell" select="$cell"/>
706 <xsl:with-param name="members" select="$members"/>
709 <xsl:call-template name="simplelist.vert">
710 <xsl:with-param name="cols" select="$cols"/>
711 <xsl:with-param name="cell" select="$cell+1"/>
712 <xsl:with-param name="members" select="$members"/>
713 <xsl:with-param name="rows" select="$rows"/>
718 <xsl:template name="simplelist.vert.row">
719 <xsl:param name="cols">1</xsl:param>
720 <xsl:param name="rows">1</xsl:param>
721 <xsl:param name="cell">1</xsl:param>
722 <xsl:param name="members" select="./d:member"/>
723 <xsl:param name="curcol">1</xsl:param>
725 <xsl:if test="$curcol <= $cols">
728 <xsl:when test="$members[position()=$cell]">
729 <xsl:apply-templates select="$members[position()=$cell]"/>
732 <xsl:text> </xsl:text>
736 <xsl:call-template name="simplelist.vert.row">
737 <xsl:with-param name="cols" select="$cols"/>
738 <xsl:with-param name="rows" select="$rows"/>
739 <xsl:with-param name="cell" select="$cell+$rows"/>
740 <xsl:with-param name="members" select="$members"/>
741 <xsl:with-param name="curcol" select="$curcol+1"/>
746 <xsl:template match="d:member">
747 <xsl:call-template name="anchor"/>
748 <xsl:call-template name="simple.xlink">
749 <xsl:with-param name="content">
750 <xsl:apply-templates/>
755 <!-- ==================================================================== -->
757 <xsl:template match="d:procedure">
758 <xsl:variable name="param.placement" select="substring-after(normalize-space($formal.title.placement), concat(local-name(.), ' '))"/>
760 <xsl:variable name="placement">
762 <xsl:when test="contains($param.placement, ' ')">
763 <xsl:value-of select="substring-before($param.placement, ' ')"/>
765 <xsl:when test="$param.placement = ''">before</xsl:when>
767 <xsl:value-of select="$param.placement"/>
772 <!-- Preserve order of PIs and comments -->
773 <xsl:variable name="preamble" select="*[not(self::d:step or self::d:title or self::d:titleabbrev)] |comment()[not(preceding-sibling::d:step)] |processing-instruction()[not(preceding-sibling::d:step)]"/>
776 <xsl:call-template name="common.html.attributes"/>
777 <xsl:call-template name="id.attribute">
778 <xsl:with-param name="conditional">
780 <xsl:when test="d:title">0</xsl:when>
781 <xsl:otherwise>1</xsl:otherwise>
785 <xsl:call-template name="anchor">
786 <xsl:with-param name="conditional">
788 <xsl:when test="d:title|d:info/d:title|d:blockinfo/d:title">0</xsl:when>
789 <xsl:otherwise>1</xsl:otherwise>
794 <xsl:if test="(d:title or d:info/d:title or d:blockinfo/d:title) and $placement = 'before'">
795 <xsl:call-template name="formal.object.heading"/>
798 <xsl:apply-templates select="$preamble"/>
801 <xsl:when test="count(d:step) = 1">
803 <xsl:call-template name="generate.class.attribute"/>
804 <xsl:apply-templates select="d:step |comment()[preceding-sibling::d:step] |processing-instruction()[preceding-sibling::d:step]"/>
809 <xsl:call-template name="generate.class.attribute"/>
810 <xsl:attribute name="type">
811 <xsl:value-of select="substring($procedure.step.numeration.formats,1,1)"/>
813 <xsl:apply-templates select="d:step |comment()[preceding-sibling::d:step] |processing-instruction()[preceding-sibling::d:step]"/>
818 <xsl:if test="(d:title or d:info/d:title or d:blockinfo/d:title) and $placement != 'before'">
819 <xsl:call-template name="formal.object.heading"/>
824 <xsl:template match="d:procedure/d:title">
828 <xsl:template match="d:substeps">
829 <xsl:variable name="numeration">
830 <xsl:call-template name="procedure.step.numeration"/>
833 <xsl:call-template name="anchor"/>
835 <ol type="{$numeration}">
836 <xsl:call-template name="common.html.attributes"/>
837 <xsl:call-template name="id.attribute"/>
838 <xsl:apply-templates/>
842 <xsl:template match="d:step">
844 <xsl:call-template name="common.html.attributes"/>
845 <xsl:call-template name="id.attribute"/>
846 <xsl:call-template name="anchor"/>
847 <xsl:apply-templates/>
851 <xsl:template match="d:stepalternatives">
852 <xsl:call-template name="anchor"/>
854 <xsl:call-template name="common.html.attributes"/>
855 <xsl:call-template name="id.attribute"/>
856 <xsl:apply-templates/>
860 <xsl:template match="d:step/d:title">
862 <xsl:call-template name="common.html.attributes"/>
864 <xsl:apply-templates/>
869 <!-- ==================================================================== -->
871 <xsl:template match="d:segmentedlist">
872 <xsl:variable name="presentation">
873 <xsl:call-template name="pi.dbhtml_list-presentation"/>
877 <xsl:call-template name="common.html.attributes"/>
878 <xsl:call-template name="id.attribute"/>
879 <xsl:call-template name="anchor"/>
882 <xsl:when test="$presentation = 'table'">
883 <xsl:apply-templates select="." mode="seglist-table"/>
885 <xsl:when test="$presentation = 'list'">
886 <xsl:apply-templates/>
888 <xsl:when test="$segmentedlist.as.table != 0">
889 <xsl:apply-templates select="." mode="seglist-table"/>
892 <xsl:apply-templates/>
898 <xsl:template match="d:segmentedlist/d:title">
900 <xsl:call-template name="common.html.attributes"/>
903 <xsl:call-template name="generate.class.attribute"/>
904 <xsl:apply-templates/>
910 <xsl:template match="d:segtitle">
913 <xsl:template match="d:segtitle" mode="segtitle-in-seg">
914 <xsl:apply-templates/>
917 <xsl:template match="d:seglistitem">
919 <xsl:call-template name="common.html.attributes"/>
920 <xsl:call-template name="id.attribute"/>
921 <xsl:call-template name="anchor"/>
922 <xsl:apply-templates/>
926 <xsl:template match="d:seg">
927 <xsl:variable name="segnum" select="count(preceding-sibling::d:seg)+1"/>
928 <xsl:variable name="seglist" select="ancestor::d:segmentedlist"/>
929 <xsl:variable name="segtitles" select="$seglist/d:segtitle"/>
932 Note: segtitle is only going to be the right thing in a well formed
933 SegmentedList. If there are too many Segs or too few SegTitles,
934 you'll get something odd...maybe an error
938 <xsl:call-template name="common.html.attributes"/>
939 <xsl:call-template name="id.attribute"/>
941 <span class="segtitle">
942 <xsl:apply-templates select="$segtitles[$segnum=position()]" mode="segtitle-in-seg"/>
943 <xsl:text>: </xsl:text>
946 <xsl:apply-templates/>
950 <xsl:template match="d:segmentedlist" mode="seglist-table">
951 <xsl:variable name="table-summary">
952 <xsl:call-template name="pi.dbhtml_table-summary"/>
955 <xsl:variable name="list-width">
956 <xsl:call-template name="pi.dbhtml_list-width"/>
959 <xsl:apply-templates select="d:title"/>
961 <table border="{$table.border.off}">
962 <xsl:if test="$list-width != ''">
963 <xsl:attribute name="width">
964 <xsl:value-of select="$list-width"/>
967 <xsl:if test="$table-summary != '' and $div.element != 'section'">
968 <xsl:attribute name="summary">
969 <xsl:value-of select="$table-summary"/>
973 <tr class="segtitle">
974 <xsl:call-template name="tr.attributes">
975 <xsl:with-param name="row" select="d:segtitle[1]"/>
976 <xsl:with-param name="rownum" select="1"/>
978 <xsl:apply-templates select="d:segtitle" mode="seglist-table"/>
982 <xsl:apply-templates select="d:seglistitem" mode="seglist-table"/>
987 <xsl:template match="d:segtitle" mode="seglist-table">
988 <th><xsl:apply-templates/></th>
991 <xsl:template match="d:seglistitem" mode="seglist-table">
992 <xsl:variable name="seglinum">
993 <xsl:number from="d:segmentedlist" count="d:seglistitem"/>
997 <xsl:call-template name="common.html.attributes"/>
998 <xsl:call-template name="id.attribute"/>
999 <xsl:call-template name="tr.attributes">
1000 <xsl:with-param name="rownum" select="$seglinum + 1"/>
1001 </xsl:call-template>
1002 <xsl:apply-templates mode="seglist-table"/>
1006 <xsl:template match="d:seg" mode="seglist-table">
1008 <xsl:call-template name="common.html.attributes"/>
1009 <xsl:call-template name="id.attribute"/>
1010 <xsl:apply-templates/>
1014 <xsl:template match="d:seg[1]" mode="seglist-table">
1016 <xsl:call-template name="common.html.attributes"/>
1017 <xsl:call-template name="id.attribute"/>
1018 <xsl:call-template name="anchor">
1019 <xsl:with-param name="node" select="ancestor::d:seglistitem"/>
1020 </xsl:call-template>
1021 <xsl:apply-templates/>
1025 <!-- ==================================================================== -->
1027 <xsl:template match="d:calloutlist">
1029 <xsl:call-template name="common.html.attributes"/>
1030 <xsl:call-template name="id.attribute"/>
1031 <xsl:call-template name="anchor"/>
1032 <xsl:if test="d:title|d:info/d:title">
1033 <xsl:call-template name="formal.object.heading"/>
1036 <!-- Preserve order of PIs and comments -->
1037 <xsl:apply-templates select="*[not(self::d:callout or self::d:title or self::d:titleabbrev)] |comment()[not(preceding-sibling::d:callout)] |processing-instruction()[not(preceding-sibling::d:callout)]"/>
1040 <xsl:when test="$callout.list.table != 0">
1041 <table border="{$table.border.off}">
1042 <xsl:if test="$div.element != 'section'">
1043 <xsl:attribute name="summary">Callout list</xsl:attribute>
1045 <xsl:apply-templates select="d:callout |comment()[preceding-sibling::d:callout] |processing-instruction()[preceding-sibling::d:callout]"/>
1050 <xsl:apply-templates select="." mode="class.attribute"/>
1051 <xsl:apply-templates select="d:callout |comment()[preceding-sibling::d:callout] |processing-instruction()[preceding-sibling::d:callout]"/>
1058 <xsl:template match="d:calloutlist/d:title">
1061 <xsl:template match="d:callout">
1063 <xsl:when test="$callout.list.table != 0">
1065 <xsl:call-template name="tr.attributes">
1066 <xsl:with-param name="rownum">
1067 <xsl:number from="d:calloutlist" count="d:callout"/>
1069 </xsl:call-template>
1071 <td width="5%" valign="top" align="{$direction.align.start}">
1072 <xsl:call-template name="id.attribute"/>
1074 <xsl:call-template name="anchor"/>
1075 <xsl:call-template name="callout.arearefs">
1076 <xsl:with-param name="arearefs" select="@arearefs"/>
1077 </xsl:call-template>
1080 <td valign="top" align="{$direction.align.start}">
1081 <xsl:apply-templates/>
1087 <xsl:call-template name="id.attribute"/>
1088 <xsl:call-template name="anchor"/>
1089 <xsl:call-template name="callout.arearefs">
1090 <xsl:with-param name="arearefs" select="@arearefs"/>
1091 </xsl:call-template>
1093 <dd><xsl:apply-templates/></dd>
1098 <xsl:template match="d:callout/d:simpara" priority="2">
1099 <!-- If a callout contains only a single simpara, don't output
1100 the <p> wrapper; this has the effect of creating an li
1101 with simple text content. -->
1103 <xsl:when test="not(preceding-sibling::*) and not (following-sibling::*)">
1104 <xsl:call-template name="anchor"/>
1105 <xsl:apply-templates/>
1109 <xsl:call-template name="id.attribute"/>
1110 <xsl:if test="@role and $para.propagates.style != 0">
1112 <xsl:when test="@role and $para.propagates.style != 0">
1113 <xsl:call-template name="common.html.attributes">
1114 <xsl:with-param name="class" select="@role"/>
1115 </xsl:call-template>
1118 <xsl:call-template name="common.html.attributes"/>
1123 <xsl:call-template name="anchor"/>
1124 <xsl:apply-templates/>
1130 <xsl:template name="callout.arearefs">
1131 <xsl:param name="arearefs"/>
1132 <xsl:if test="$arearefs!=''">
1134 <xsl:when test="substring-before($arearefs,' ')=''">
1135 <xsl:call-template name="callout.arearef">
1136 <xsl:with-param name="arearef" select="$arearefs"/>
1137 </xsl:call-template>
1140 <xsl:call-template name="callout.arearef">
1141 <xsl:with-param name="arearef" select="substring-before($arearefs,' ')"/>
1142 </xsl:call-template>
1145 <xsl:call-template name="callout.arearefs">
1146 <xsl:with-param name="arearefs" select="substring-after($arearefs,' ')"/>
1147 </xsl:call-template>
1151 <xsl:template name="callout.arearef">
1152 <xsl:param name="arearef"/>
1153 <xsl:variable name="targets" select="key('id',$arearef)"/>
1154 <xsl:variable name="target" select="$targets[1]"/>
1156 <xsl:call-template name="check.id.unique">
1157 <xsl:with-param name="linkend" select="$arearef"/>
1158 </xsl:call-template>
1161 <xsl:when test="count($target)=0">
1162 <xsl:text>???</xsl:text>
1164 <xsl:when test="local-name($target)='co'">
1166 <xsl:attribute name="href">
1167 <xsl:text>#</xsl:text>
1168 <xsl:value-of select="$arearef"/>
1170 <xsl:apply-templates select="$target" mode="callout-bug"/>
1172 <xsl:text> </xsl:text>
1174 <xsl:when test="local-name($target)='areaset'">
1175 <xsl:call-template name="callout-bug">
1176 <xsl:with-param name="conum">
1177 <xsl:apply-templates select="$target" mode="conumber"/>
1179 </xsl:call-template>
1181 <xsl:when test="local-name($target)='area'">
1183 <xsl:when test="$target/parent::d:areaset">
1184 <xsl:call-template name="callout-bug">
1185 <xsl:with-param name="conum">
1186 <xsl:apply-templates select="$target/parent::d:areaset" mode="conumber"/>
1188 </xsl:call-template>
1191 <xsl:call-template name="callout-bug">
1192 <xsl:with-param name="conum">
1193 <xsl:apply-templates select="$target" mode="conumber"/>
1195 </xsl:call-template>
1200 <xsl:text>???</xsl:text>
1205 <!-- ==================================================================== -->
1207 <xsl:template name="orderedlist-starting-number">
1208 <xsl:param name="list" select="."/>
1209 <xsl:variable name="pi-start">
1210 <xsl:call-template name="pi.dbhtml_start">
1211 <xsl:with-param name="node" select="$list"/>
1212 </xsl:call-template>
1214 <xsl:call-template name="output-orderedlist-starting-number">
1215 <xsl:with-param name="list" select="$list"/>
1216 <xsl:with-param name="pi-start" select="$pi-start"/>
1217 </xsl:call-template>