docbook_xsl_wrapper 0.1.2 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/CHANGELOG +41 -0
- data/README.md +9 -17
- data/bin/docbook_xsl_wrapper +9 -14
- data/docbook_xsl_wrapper.gemspec +8 -7
- data/lib/docbook_xsl_wrapper.rb +24 -1
- data/lib/docbook_xsl_wrapper/epub.rb +124 -122
- data/lib/docbook_xsl_wrapper/options.rb +1 -1
- data/lib/docbook_xsl_wrapper/validate.rb +22 -0
- data/lib/docbook_xsl_wrapper/version.rb +1 -1
- data/schema/docbookxi.rng +18654 -0
- data/spec/docbook_xsl_wrapper/validate_spec.rb +64 -0
- data/xsl/AUTHORS +4 -0
- data/xsl/COPYING +48 -0
- data/xsl/REVISION +1 -0
- data/xsl/VERSION.xsl +115 -0
- data/xsl/common/addns.xsl +124 -0
- data/xsl/common/af.xml +1272 -0
- data/xsl/common/am.xml +1272 -0
- data/xsl/common/ar.xml +1272 -0
- data/xsl/common/as.xml +703 -0
- data/xsl/common/ast.xml +703 -0
- data/xsl/common/autoidx-kimber.xsl +45 -0
- data/xsl/common/autoidx-kosek.xsl +155 -0
- data/xsl/common/az.xml +715 -0
- data/xsl/common/bg.xml +767 -0
- data/xsl/common/bn.xml +1272 -0
- data/xsl/common/bn_in.xml +703 -0
- data/xsl/common/bs.xml +705 -0
- data/xsl/common/ca.xml +703 -0
- data/xsl/common/charmap.xsl +222 -0
- data/xsl/common/common.xsl +2129 -0
- data/xsl/common/cs.xml +743 -0
- data/xsl/common/cy.xml +1288 -0
- data/xsl/common/da.xml +707 -0
- data/xsl/common/de.xml +709 -0
- data/xsl/common/el.xml +772 -0
- data/xsl/common/en.xml +1272 -0
- data/xsl/common/entities.ent +67 -0
- data/xsl/common/eo.xml +1272 -0
- data/xsl/common/es.xml +719 -0
- data/xsl/common/et.xml +1272 -0
- data/xsl/common/eu.xml +1272 -0
- data/xsl/common/fa.xml +703 -0
- data/xsl/common/fi.xml +713 -0
- data/xsl/common/fr.xml +733 -0
- data/xsl/common/ga.xml +1272 -0
- data/xsl/common/gentext.xsl +855 -0
- data/xsl/common/gl.xml +1272 -0
- data/xsl/common/gu.xml +703 -0
- data/xsl/common/he.xml +1272 -0
- data/xsl/common/hi.xml +703 -0
- data/xsl/common/hr.xml +705 -0
- data/xsl/common/hu.xml +721 -0
- data/xsl/common/id.xml +1272 -0
- data/xsl/common/insertfile.xsl +113 -0
- data/xsl/common/is.xml +715 -0
- data/xsl/common/it.xml +1272 -0
- data/xsl/common/ja.xml +703 -0
- data/xsl/common/ka.xml +743 -0
- data/xsl/common/kn.xml +1272 -0
- data/xsl/common/ko.xml +1272 -0
- data/xsl/common/ky.xml +775 -0
- data/xsl/common/l10n.dtd +64 -0
- data/xsl/common/l10n.xml +78 -0
- data/xsl/common/l10n.xsl +598 -0
- data/xsl/common/la.xml +1272 -0
- data/xsl/common/labels.xsl +933 -0
- data/xsl/common/lt.xml +721 -0
- data/xsl/common/lv.xml +1272 -0
- data/xsl/common/ml.xml +703 -0
- data/xsl/common/mn.xml +773 -0
- data/xsl/common/mr.xml +703 -0
- data/xsl/common/nb.xml +1272 -0
- data/xsl/common/nds.xml +709 -0
- data/xsl/common/nl.xml +703 -0
- data/xsl/common/nn.xml +1272 -0
- data/xsl/common/olink.xsl +1284 -0
- data/xsl/common/or.xml +1272 -0
- data/xsl/common/pa.xml +703 -0
- data/xsl/common/pi.xml +168 -0
- data/xsl/common/pi.xsl +347 -0
- data/xsl/common/pl.xml +721 -0
- data/xsl/common/pt.xml +1272 -0
- data/xsl/common/pt_br.xml +1272 -0
- data/xsl/common/refentry.xsl +1353 -0
- data/xsl/common/ro.xml +1272 -0
- data/xsl/common/ru.xml +769 -0
- data/xsl/common/sk.xml +1272 -0
- data/xsl/common/sl.xml +1272 -0
- data/xsl/common/sq.xml +1272 -0
- data/xsl/common/sr.xml +763 -0
- data/xsl/common/sr_Latn.xml +722 -0
- data/xsl/common/subtitles.xsl +181 -0
- data/xsl/common/sv.xml +707 -0
- data/xsl/common/ta.xml +703 -0
- data/xsl/common/table.xsl +515 -0
- data/xsl/common/targetdatabase.dtd +49 -0
- data/xsl/common/targets.xsl +338 -0
- data/xsl/common/te.xml +703 -0
- data/xsl/common/th.xml +1272 -0
- data/xsl/common/titles.xsl +850 -0
- data/xsl/common/tl.xml +1272 -0
- data/xsl/common/tr.xml +709 -0
- data/xsl/common/uk.xml +769 -0
- data/xsl/common/ur.xml +705 -0
- data/xsl/common/utility.xsl +291 -0
- data/xsl/common/vi.xml +1272 -0
- data/xsl/common/xh.xml +1272 -0
- data/xsl/common/zh.xml +703 -0
- data/xsl/common/zh_cn.xml +703 -0
- data/xsl/common/zh_tw.xml +703 -0
- data/xsl/epub/docbook.xsl +1769 -0
- data/xsl/epub3/chunk.xsl +30 -0
- data/xsl/epub3/docbook-epub.css.xml +142 -0
- data/xsl/epub3/docbook.xsl +20 -0
- data/xsl/epub3/epub3-chunk-mods.xsl +52 -0
- data/xsl/epub3/epub3-element-mods.xsl +2533 -0
- data/xsl/epub3/titlepage.templates.xml +712 -0
- data/xsl/epub3/titlepage.templates.xsl +3842 -0
- data/xsl/lib/lib.xsl +533 -0
- data/xsl/xhtml/admon.xsl +142 -0
- data/xsl/xhtml/annotations.xsl +160 -0
- data/xsl/xhtml/autoidx.xsl +831 -0
- data/xsl/xhtml/autotoc.xsl +706 -0
- data/xsl/xhtml/biblio-iso690.xsl +1302 -0
- data/xsl/xhtml/biblio.xsl +1371 -0
- data/xsl/xhtml/block.xsl +584 -0
- data/xsl/xhtml/callout.xsl +210 -0
- data/xsl/xhtml/chunk-code.xsl +675 -0
- data/xsl/xhtml/chunk-common.xsl +1627 -0
- data/xsl/xhtml/chunker.xsl +317 -0
- data/xsl/xhtml/component.xsl +440 -0
- data/xsl/xhtml/division.xsl +214 -0
- data/xsl/xhtml/ebnf.xsl +331 -0
- data/xsl/xhtml/footnote.xsl +346 -0
- data/xsl/xhtml/formal.xsl +496 -0
- data/xsl/xhtml/glossary.xsl +602 -0
- data/xsl/xhtml/graphics.xsl +1537 -0
- data/xsl/xhtml/html-rtf.xsl +321 -0
- data/xsl/xhtml/html.xsl +690 -0
- data/xsl/xhtml/htmltbl.xsl +102 -0
- data/xsl/xhtml/index.xsl +264 -0
- data/xsl/xhtml/info.xsl +48 -0
- data/xsl/xhtml/inline.xsl +1508 -0
- data/xsl/xhtml/its.xsl +109 -0
- data/xsl/xhtml/keywords.xsl +38 -0
- data/xsl/xhtml/lists.xsl +1227 -0
- data/xsl/xhtml/math.xsl +286 -0
- data/xsl/xhtml/param.xsl +449 -0
- data/xsl/xhtml/pi.xsl +1237 -0
- data/xsl/xhtml/qandaset.xsl +440 -0
- data/xsl/xhtml/refentry.xsl +307 -0
- data/xsl/xhtml/sections.xsl +564 -0
- data/xsl/xhtml/synop.xsl +1623 -0
- data/xsl/xhtml/table.xsl +1179 -0
- data/xsl/xhtml/task.xsl +76 -0
- data/xsl/xhtml/titlepage.templates.xsl +4005 -0
- data/xsl/xhtml/titlepage.xsl +1108 -0
- data/xsl/xhtml/toc.xsl +334 -0
- data/xsl/xhtml/verbatim.xsl +389 -0
- data/xsl/xhtml/xref.xsl +1268 -0
- data/xsl/xhtml5/docbook.xsl +22 -0
- data/xsl/xhtml5/html5-chunk-mods.xsl +112 -0
- data/xsl/xhtml5/html5-element-mods.xsl +791 -0
- data/xsl/xhtml5/xhtml-docbook.xsl +531 -0
- metadata +207 -27
- data/.rvmrc +0 -48
- data/xslt/obfuscate.xsl +0 -12
data/xsl/xhtml/its.xsl
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
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:d="http://docbook.org/ns/docbook"
|
|
5
|
+
xmlns:its="http://www.w3.org/2005/11/its" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="its d" version="1.0">
|
|
6
|
+
|
|
7
|
+
<!-- ********************************************************************
|
|
8
|
+
$Id: html.xsl 9306 2012-04-28 03:49:00Z bobstayton $
|
|
9
|
+
********************************************************************
|
|
10
|
+
|
|
11
|
+
This file is part of the XSL DocBook Stylesheet distribution.
|
|
12
|
+
See ../README or http://docbook.sf.net/release/xsl/current/ for
|
|
13
|
+
copyright and other information.
|
|
14
|
+
|
|
15
|
+
Templates in this stylesheet convert ITS 2.0 markup
|
|
16
|
+
http://www.w3.org/TR/its20/ into corresponding HTML5 attributes
|
|
17
|
+
(prefixed with its-*).
|
|
18
|
+
|
|
19
|
+
******************************************************************** -->
|
|
20
|
+
|
|
21
|
+
<!-- List of recognized ITS attributes -->
|
|
22
|
+
<xsl:variable name="its-attrs"> its-allowed-characters its-annotators-ref its-line-break-type its-loc-note its-loc-note-ref its-loc-note-type its-loc-quality-issue-comment its-loc-quality-issue-enabled its-loc-quality-issue-profile-ref its-loc-quality-issue-severity its-loc-quality-issue-type its-loc-quality-issues-ref its-loc-quality-rating-profile-ref its-loc-quality-rating-score its-loc-quality-rating-score-threshold its-loc-quality-rating-vote its-loc-quality-rating-vote-threshold its-locale-filter-list its-locale-filter-type its-mt-confidence its-org its-org-ref its-person its-person-ref its-prov-ref its-provenance-records-ref its-rev-org its-rev-org-ref its-rev-person its-rev-person-ref its-rev-tool its-rev-tool-ref its-storage-encoding its-storage-size its-ta-class-ref its-ta-confidence its-ta-ident its-ta-ident-ref its-ta-source its-term its-term-confidence its-term-info-ref its-tool its-tool-ref its-within-text </xsl:variable>
|
|
23
|
+
|
|
24
|
+
<xsl:template name="its.attributes">
|
|
25
|
+
<xsl:param name="inherit" select="0"/>
|
|
26
|
+
<xsl:apply-templates select="." mode="its.attributes">
|
|
27
|
+
<xsl:with-param name="inherit" select="$inherit"/>
|
|
28
|
+
</xsl:apply-templates>
|
|
29
|
+
</xsl:template>
|
|
30
|
+
|
|
31
|
+
<xsl:template match="*" mode="its.attributes">
|
|
32
|
+
<xsl:param name="inherit" select="0"/>
|
|
33
|
+
|
|
34
|
+
<xsl:choose>
|
|
35
|
+
<!-- Handle inheritance; especially necessary for chunking -->
|
|
36
|
+
<xsl:when test="$inherit = 1">
|
|
37
|
+
<xsl:variable name="attrs" select="ancestor-or-self::*/@*[namespace-uri() = 'http://www.w3.org/2005/11/its']"/>
|
|
38
|
+
<xsl:for-each select="$attrs">
|
|
39
|
+
<xsl:variable name="name" select="local-name(.)"/>
|
|
40
|
+
<xsl:if test="not(..//*/@*[local-name(.) = $name and (count(. | $attrs) = 1)])">
|
|
41
|
+
<xsl:apply-templates select="."/>
|
|
42
|
+
</xsl:if>
|
|
43
|
+
</xsl:for-each>
|
|
44
|
+
</xsl:when>
|
|
45
|
+
<xsl:otherwise>
|
|
46
|
+
<xsl:apply-templates select="@*[namespace-uri() = 'http://www.w3.org/2005/11/its']"/>
|
|
47
|
+
</xsl:otherwise>
|
|
48
|
+
</xsl:choose>
|
|
49
|
+
</xsl:template>
|
|
50
|
+
|
|
51
|
+
<!-- translate attribute is special in HTML -->
|
|
52
|
+
<xsl:template match="@its:translate">
|
|
53
|
+
<xsl:attribute name="translate">
|
|
54
|
+
<xsl:value-of select="."/>
|
|
55
|
+
</xsl:attribute>
|
|
56
|
+
</xsl:template>
|
|
57
|
+
|
|
58
|
+
<xsl:template match="@its:*">
|
|
59
|
+
<xsl:variable name="attr">
|
|
60
|
+
<xsl:call-template name="its-html-attribute-name">
|
|
61
|
+
<xsl:with-param name="name" select="local-name(.)"/>
|
|
62
|
+
</xsl:call-template>
|
|
63
|
+
</xsl:variable>
|
|
64
|
+
|
|
65
|
+
<xsl:choose>
|
|
66
|
+
<xsl:when test="contains($its-attrs, concat(' ', $attr, ' '))">
|
|
67
|
+
<xsl:attribute name="{$attr}">
|
|
68
|
+
<xsl:value-of select="."/>
|
|
69
|
+
</xsl:attribute>
|
|
70
|
+
</xsl:when>
|
|
71
|
+
<xsl:otherwise>
|
|
72
|
+
<xsl:message>Attribute <xsl:value-of select="name(.)"/> is not recognized as ITS attribute. Ignoring.</xsl:message>
|
|
73
|
+
</xsl:otherwise>
|
|
74
|
+
</xsl:choose>
|
|
75
|
+
</xsl:template>
|
|
76
|
+
|
|
77
|
+
<xsl:template name="its-html-attribute-name">
|
|
78
|
+
<xsl:param name="name"/>
|
|
79
|
+
|
|
80
|
+
<xsl:text>its-</xsl:text>
|
|
81
|
+
<xsl:call-template name="its-camel-case-to-dashes">
|
|
82
|
+
<xsl:with-param name="text" select="$name"/>
|
|
83
|
+
</xsl:call-template>
|
|
84
|
+
</xsl:template>
|
|
85
|
+
|
|
86
|
+
<xsl:template name="its-camel-case-to-dashes">
|
|
87
|
+
<xsl:param name="text"/>
|
|
88
|
+
|
|
89
|
+
<xsl:variable name="first" select="substring($text, 1, 1)"/>
|
|
90
|
+
<xsl:variable name="rest" select="substring($text, 2)"/>
|
|
91
|
+
|
|
92
|
+
<xsl:choose>
|
|
93
|
+
<xsl:when test="$first != translate($first, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')">
|
|
94
|
+
<xsl:value-of select="'-'"/>
|
|
95
|
+
<xsl:value-of select="translate($first, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/>
|
|
96
|
+
</xsl:when>
|
|
97
|
+
<xsl:otherwise>
|
|
98
|
+
<xsl:value-of select="$first"/>
|
|
99
|
+
</xsl:otherwise>
|
|
100
|
+
</xsl:choose>
|
|
101
|
+
|
|
102
|
+
<xsl:if test="$rest != ''">
|
|
103
|
+
<xsl:call-template name="its-camel-case-to-dashes">
|
|
104
|
+
<xsl:with-param name="text" select="$rest"/>
|
|
105
|
+
</xsl:call-template>
|
|
106
|
+
</xsl:if>
|
|
107
|
+
</xsl:template>
|
|
108
|
+
|
|
109
|
+
</xsl:stylesheet>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="ASCII"?>
|
|
2
|
+
<!--This file was created automatically by html2xhtml-->
|
|
3
|
+
<!--from the HTML stylesheets.-->
|
|
4
|
+
<xsl:stylesheet exclude-result-prefixes="d"
|
|
5
|
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:d="http://docbook.org/ns/docbook"
|
|
6
|
+
xmlns="http://www.w3.org/1999/xhtml" version="1.0">
|
|
7
|
+
|
|
8
|
+
<!-- ********************************************************************
|
|
9
|
+
$Id: keywords.xsl 6910 2007-06-28 23:23:30Z xmldoc $
|
|
10
|
+
********************************************************************
|
|
11
|
+
|
|
12
|
+
This file is part of the XSL DocBook Stylesheet distribution.
|
|
13
|
+
See ../README or http://docbook.sf.net/release/xsl/current/ for
|
|
14
|
+
copyright and other information.
|
|
15
|
+
|
|
16
|
+
******************************************************************** -->
|
|
17
|
+
|
|
18
|
+
<xsl:template match="d:keywordset"/>
|
|
19
|
+
<xsl:template match="d:subjectset"/>
|
|
20
|
+
|
|
21
|
+
<!-- ==================================================================== -->
|
|
22
|
+
|
|
23
|
+
<xsl:template match="d:keywordset" mode="html.header">
|
|
24
|
+
<meta name="keywords">
|
|
25
|
+
<xsl:attribute name="content">
|
|
26
|
+
<xsl:apply-templates select="d:keyword" mode="html.header"/>
|
|
27
|
+
</xsl:attribute>
|
|
28
|
+
</meta>
|
|
29
|
+
</xsl:template>
|
|
30
|
+
|
|
31
|
+
<xsl:template match="d:keyword" mode="html.header">
|
|
32
|
+
<xsl:apply-templates/>
|
|
33
|
+
<xsl:if test="following-sibling::d:keyword">, </xsl:if>
|
|
34
|
+
</xsl:template>
|
|
35
|
+
|
|
36
|
+
<!-- ==================================================================== -->
|
|
37
|
+
|
|
38
|
+
</xsl:stylesheet>
|
data/xsl/xhtml/lists.xsl
ADDED
|
@@ -0,0 +1,1227 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="ASCII"?>
|
|
2
|
+
<!--This file was created automatically by html2xhtml-->
|
|
3
|
+
<!--from the HTML stylesheets.-->
|
|
4
|
+
<xsl:stylesheet exclude-result-prefixes="d"
|
|
5
|
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:d="http://docbook.org/ns/docbook"
|
|
6
|
+
xmlns="http://www.w3.org/1999/xhtml" version="1.0">
|
|
7
|
+
|
|
8
|
+
<!-- ********************************************************************
|
|
9
|
+
$Id: lists.xsl 9792 2013-08-28 23:03:16Z bobstayton $
|
|
10
|
+
********************************************************************
|
|
11
|
+
|
|
12
|
+
This file is part of the XSL DocBook Stylesheet distribution.
|
|
13
|
+
See ../README or http://docbook.sf.net/release/xsl/current/ for
|
|
14
|
+
copyright and other information.
|
|
15
|
+
|
|
16
|
+
******************************************************************** -->
|
|
17
|
+
|
|
18
|
+
<!-- ==================================================================== -->
|
|
19
|
+
|
|
20
|
+
<xsl:template match="d:itemizedlist">
|
|
21
|
+
<!-- Handle spacing="compact" as multiple class attribute instead
|
|
22
|
+
of the deprecated HTML compact attribute -->
|
|
23
|
+
<xsl:variable name="default.class">
|
|
24
|
+
<xsl:value-of select="local-name()"/>
|
|
25
|
+
<xsl:if test="@spacing = 'compact'">
|
|
26
|
+
<xsl:text> compact</xsl:text>
|
|
27
|
+
</xsl:if>
|
|
28
|
+
</xsl:variable>
|
|
29
|
+
|
|
30
|
+
<xsl:variable name="style.value">
|
|
31
|
+
<xsl:variable name="type">
|
|
32
|
+
<xsl:call-template name="list.itemsymbol"/>
|
|
33
|
+
</xsl:variable>
|
|
34
|
+
|
|
35
|
+
<xsl:text>list-style-type: </xsl:text>
|
|
36
|
+
<xsl:value-of select="$type"/>
|
|
37
|
+
<xsl:text>; </xsl:text>
|
|
38
|
+
</xsl:variable>
|
|
39
|
+
|
|
40
|
+
<div>
|
|
41
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
42
|
+
<xsl:call-template name="id.attribute"/>
|
|
43
|
+
<xsl:call-template name="anchor"/>
|
|
44
|
+
<xsl:if test="d:title|d:info/d:title">
|
|
45
|
+
<xsl:call-template name="formal.object.heading"/>
|
|
46
|
+
</xsl:if>
|
|
47
|
+
|
|
48
|
+
<!-- Preserve order of PIs and comments -->
|
|
49
|
+
<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)]"/>
|
|
50
|
+
|
|
51
|
+
<ul>
|
|
52
|
+
<xsl:call-template name="generate.class.attribute">
|
|
53
|
+
<xsl:with-param name="class" select="$default.class"/>
|
|
54
|
+
</xsl:call-template>
|
|
55
|
+
<xsl:choose>
|
|
56
|
+
<xsl:when test="$css.decoration != 0">
|
|
57
|
+
<xsl:attribute name="style">
|
|
58
|
+
<xsl:value-of select="$style.value"/>
|
|
59
|
+
</xsl:attribute>
|
|
60
|
+
</xsl:when>
|
|
61
|
+
<xsl:when test="$make.clean.html != 0">
|
|
62
|
+
<!-- styled by separate css only -->
|
|
63
|
+
</xsl:when>
|
|
64
|
+
<xsl:otherwise>
|
|
65
|
+
<!-- use the old @type attribute -->
|
|
66
|
+
<xsl:attribute name="type">
|
|
67
|
+
<xsl:call-template name="list.itemsymbol"/>
|
|
68
|
+
</xsl:attribute>
|
|
69
|
+
</xsl:otherwise>
|
|
70
|
+
</xsl:choose>
|
|
71
|
+
|
|
72
|
+
<xsl:apply-templates select="d:listitem |comment()[preceding-sibling::d:listitem] |processing-instruction()[preceding-sibling::d:listitem]"/>
|
|
73
|
+
</ul>
|
|
74
|
+
</div>
|
|
75
|
+
</xsl:template>
|
|
76
|
+
|
|
77
|
+
<xsl:template match="d:itemizedlist/d:title">
|
|
78
|
+
<!-- nop -->
|
|
79
|
+
</xsl:template>
|
|
80
|
+
|
|
81
|
+
<xsl:template match="d:itemizedlist/d:listitem">
|
|
82
|
+
<xsl:variable name="mark" select="../@mark"/>
|
|
83
|
+
<xsl:variable name="override" select="@override"/>
|
|
84
|
+
|
|
85
|
+
<xsl:variable name="usemark">
|
|
86
|
+
<xsl:choose>
|
|
87
|
+
<xsl:when test="$override != ''">
|
|
88
|
+
<xsl:value-of select="$override"/>
|
|
89
|
+
</xsl:when>
|
|
90
|
+
<xsl:otherwise>
|
|
91
|
+
<xsl:value-of select="$mark"/>
|
|
92
|
+
</xsl:otherwise>
|
|
93
|
+
</xsl:choose>
|
|
94
|
+
</xsl:variable>
|
|
95
|
+
|
|
96
|
+
<xsl:variable name="cssmark">
|
|
97
|
+
<xsl:choose>
|
|
98
|
+
<xsl:when test="$usemark = 'opencircle'">circle</xsl:when>
|
|
99
|
+
<xsl:when test="$usemark = 'bullet'">disc</xsl:when>
|
|
100
|
+
<xsl:when test="$usemark = 'box'">square</xsl:when>
|
|
101
|
+
<xsl:otherwise>
|
|
102
|
+
<xsl:value-of select="$usemark"/>
|
|
103
|
+
</xsl:otherwise>
|
|
104
|
+
</xsl:choose>
|
|
105
|
+
</xsl:variable>
|
|
106
|
+
|
|
107
|
+
<li>
|
|
108
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
109
|
+
<xsl:call-template name="id.attribute"/>
|
|
110
|
+
<xsl:if test="$css.decoration = '1' and $cssmark != ''">
|
|
111
|
+
<xsl:attribute name="style">
|
|
112
|
+
<xsl:text>list-style-type: </xsl:text>
|
|
113
|
+
<xsl:value-of select="$cssmark"/>
|
|
114
|
+
</xsl:attribute>
|
|
115
|
+
</xsl:if>
|
|
116
|
+
|
|
117
|
+
<!-- we can't just drop the anchor in since some browsers (Opera)
|
|
118
|
+
get confused about line breaks if we do. So if the first child
|
|
119
|
+
is a para, assume the para will put in the anchor. Otherwise,
|
|
120
|
+
put the anchor in anyway. -->
|
|
121
|
+
<xsl:if test="local-name(child::*[1]) != 'para'">
|
|
122
|
+
<xsl:call-template name="anchor"/>
|
|
123
|
+
</xsl:if>
|
|
124
|
+
|
|
125
|
+
<xsl:choose>
|
|
126
|
+
<xsl:when test="$show.revisionflag != 0 and @revisionflag">
|
|
127
|
+
<div class="{@revisionflag}">
|
|
128
|
+
<xsl:apply-templates/>
|
|
129
|
+
</div>
|
|
130
|
+
</xsl:when>
|
|
131
|
+
<xsl:otherwise>
|
|
132
|
+
<xsl:apply-templates/>
|
|
133
|
+
</xsl:otherwise>
|
|
134
|
+
</xsl:choose>
|
|
135
|
+
</li>
|
|
136
|
+
</xsl:template>
|
|
137
|
+
|
|
138
|
+
<xsl:template match="d:orderedlist">
|
|
139
|
+
<!-- Handle spacing="compact" as multiple class attribute instead
|
|
140
|
+
of the deprecated HTML compact attribute -->
|
|
141
|
+
<xsl:variable name="default.class">
|
|
142
|
+
<xsl:value-of select="local-name()"/>
|
|
143
|
+
<xsl:if test="@spacing = 'compact'">
|
|
144
|
+
<xsl:text> compact</xsl:text>
|
|
145
|
+
</xsl:if>
|
|
146
|
+
</xsl:variable>
|
|
147
|
+
|
|
148
|
+
<xsl:variable name="start">
|
|
149
|
+
<xsl:call-template name="orderedlist-starting-number"/>
|
|
150
|
+
</xsl:variable>
|
|
151
|
+
|
|
152
|
+
<xsl:variable name="numeration">
|
|
153
|
+
<xsl:call-template name="list.numeration"/>
|
|
154
|
+
</xsl:variable>
|
|
155
|
+
|
|
156
|
+
<xsl:variable name="type">
|
|
157
|
+
<xsl:choose>
|
|
158
|
+
<xsl:when test="$numeration='arabic'">1</xsl:when>
|
|
159
|
+
<xsl:when test="$numeration='loweralpha'">a</xsl:when>
|
|
160
|
+
<xsl:when test="$numeration='lowerroman'">i</xsl:when>
|
|
161
|
+
<xsl:when test="$numeration='upperalpha'">A</xsl:when>
|
|
162
|
+
<xsl:when test="$numeration='upperroman'">I</xsl:when>
|
|
163
|
+
<!-- What!? This should never happen -->
|
|
164
|
+
<xsl:otherwise>
|
|
165
|
+
<xsl:message>
|
|
166
|
+
<xsl:text>Unexpected numeration: </xsl:text>
|
|
167
|
+
<xsl:value-of select="$numeration"/>
|
|
168
|
+
</xsl:message>
|
|
169
|
+
<xsl:value-of select="1"/>
|
|
170
|
+
</xsl:otherwise>
|
|
171
|
+
</xsl:choose>
|
|
172
|
+
</xsl:variable>
|
|
173
|
+
|
|
174
|
+
<div>
|
|
175
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
176
|
+
<xsl:call-template name="id.attribute"/>
|
|
177
|
+
<xsl:call-template name="anchor"/>
|
|
178
|
+
|
|
179
|
+
<xsl:if test="d:title|d:info/d:title">
|
|
180
|
+
<xsl:call-template name="formal.object.heading"/>
|
|
181
|
+
</xsl:if>
|
|
182
|
+
|
|
183
|
+
<!-- Preserve order of PIs and comments -->
|
|
184
|
+
<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)]"/>
|
|
185
|
+
|
|
186
|
+
<xsl:choose>
|
|
187
|
+
<xsl:when test="@inheritnum='inherit' and ancestor::d:listitem[parent::d:orderedlist]">
|
|
188
|
+
<table border="{$table.border.off}">
|
|
189
|
+
<xsl:call-template name="generate.class.attribute">
|
|
190
|
+
<xsl:with-param name="class" select="$default.class"/>
|
|
191
|
+
</xsl:call-template>
|
|
192
|
+
<colgroup>
|
|
193
|
+
<col align="{$direction.align.start}" valign="top"/>
|
|
194
|
+
<col/>
|
|
195
|
+
</colgroup>
|
|
196
|
+
<tbody>
|
|
197
|
+
<xsl:apply-templates mode="orderedlist-table" select="d:listitem |comment()[preceding-sibling::d:listitem] |processing-instruction()[preceding-sibling::d:listitem]"/>
|
|
198
|
+
</tbody>
|
|
199
|
+
</table>
|
|
200
|
+
</xsl:when>
|
|
201
|
+
<xsl:otherwise>
|
|
202
|
+
<ol>
|
|
203
|
+
<xsl:call-template name="generate.class.attribute">
|
|
204
|
+
<xsl:with-param name="class" select="$default.class"/>
|
|
205
|
+
</xsl:call-template>
|
|
206
|
+
<xsl:if test="$start != '1'">
|
|
207
|
+
<xsl:attribute name="start">
|
|
208
|
+
<xsl:value-of select="$start"/>
|
|
209
|
+
</xsl:attribute>
|
|
210
|
+
</xsl:if>
|
|
211
|
+
<xsl:if test="$numeration != ''">
|
|
212
|
+
<xsl:attribute name="type">
|
|
213
|
+
<xsl:value-of select="$type"/>
|
|
214
|
+
</xsl:attribute>
|
|
215
|
+
</xsl:if>
|
|
216
|
+
<xsl:apply-templates select="d:listitem |comment()[preceding-sibling::d:listitem] |processing-instruction()[preceding-sibling::d:listitem]"/>
|
|
217
|
+
</ol>
|
|
218
|
+
</xsl:otherwise>
|
|
219
|
+
</xsl:choose>
|
|
220
|
+
</div>
|
|
221
|
+
</xsl:template>
|
|
222
|
+
|
|
223
|
+
<xsl:template match="d:orderedlist/d:title">
|
|
224
|
+
<!-- nop -->
|
|
225
|
+
</xsl:template>
|
|
226
|
+
|
|
227
|
+
<xsl:template match="d:orderedlist/d:listitem">
|
|
228
|
+
<li>
|
|
229
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
230
|
+
<xsl:call-template name="id.attribute"/>
|
|
231
|
+
<xsl:if test="@override">
|
|
232
|
+
<xsl:attribute name="value">
|
|
233
|
+
<xsl:value-of select="@override"/>
|
|
234
|
+
</xsl:attribute>
|
|
235
|
+
</xsl:if>
|
|
236
|
+
|
|
237
|
+
<!-- we can't just drop the anchor in since some browsers (Opera)
|
|
238
|
+
get confused about line breaks if we do. So if the first child
|
|
239
|
+
is a para, assume the para will put in the anchor. Otherwise,
|
|
240
|
+
put the anchor in anyway. -->
|
|
241
|
+
<xsl:if test="local-name(child::*[1]) != 'para'">
|
|
242
|
+
<xsl:call-template name="anchor"/>
|
|
243
|
+
</xsl:if>
|
|
244
|
+
|
|
245
|
+
<xsl:choose>
|
|
246
|
+
<xsl:when test="$show.revisionflag != 0 and @revisionflag">
|
|
247
|
+
<div class="{@revisionflag}">
|
|
248
|
+
<xsl:apply-templates/>
|
|
249
|
+
</div>
|
|
250
|
+
</xsl:when>
|
|
251
|
+
<xsl:otherwise>
|
|
252
|
+
<xsl:apply-templates/>
|
|
253
|
+
</xsl:otherwise>
|
|
254
|
+
</xsl:choose>
|
|
255
|
+
</li>
|
|
256
|
+
</xsl:template>
|
|
257
|
+
|
|
258
|
+
<xsl:template match="d:orderedlist/d:listitem" mode="orderedlist-table">
|
|
259
|
+
<tr>
|
|
260
|
+
<td>
|
|
261
|
+
<xsl:apply-templates select="." mode="item-number"/>
|
|
262
|
+
</td>
|
|
263
|
+
<td>
|
|
264
|
+
<xsl:if test="local-name(child::*[1]) != 'para'">
|
|
265
|
+
<xsl:call-template name="id.attribute"/>
|
|
266
|
+
<xsl:call-template name="anchor"/>
|
|
267
|
+
</xsl:if>
|
|
268
|
+
|
|
269
|
+
<xsl:choose>
|
|
270
|
+
<xsl:when test="$show.revisionflag != 0 and @revisionflag">
|
|
271
|
+
<div class="{@revisionflag}">
|
|
272
|
+
<xsl:apply-templates/>
|
|
273
|
+
</div>
|
|
274
|
+
</xsl:when>
|
|
275
|
+
<xsl:otherwise>
|
|
276
|
+
<xsl:apply-templates/>
|
|
277
|
+
</xsl:otherwise>
|
|
278
|
+
</xsl:choose>
|
|
279
|
+
</td>
|
|
280
|
+
</tr>
|
|
281
|
+
</xsl:template>
|
|
282
|
+
|
|
283
|
+
<xsl:template match="d:variablelist">
|
|
284
|
+
<xsl:variable name="pi-presentation">
|
|
285
|
+
<xsl:call-template name="pi.dbhtml_list-presentation"/>
|
|
286
|
+
</xsl:variable>
|
|
287
|
+
<!-- Handle spacing="compact" as multiple class attribute instead
|
|
288
|
+
of the deprecated HTML compact attribute -->
|
|
289
|
+
<xsl:variable name="default.class">
|
|
290
|
+
<xsl:value-of select="local-name()"/>
|
|
291
|
+
<xsl:if test="@spacing = 'compact'">
|
|
292
|
+
<xsl:text> compact</xsl:text>
|
|
293
|
+
</xsl:if>
|
|
294
|
+
</xsl:variable>
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
<xsl:variable name="presentation">
|
|
298
|
+
<xsl:choose>
|
|
299
|
+
<xsl:when test="$pi-presentation != ''">
|
|
300
|
+
<xsl:value-of select="$pi-presentation"/>
|
|
301
|
+
</xsl:when>
|
|
302
|
+
<xsl:when test="$variablelist.as.table != 0">
|
|
303
|
+
<xsl:value-of select="'table'"/>
|
|
304
|
+
</xsl:when>
|
|
305
|
+
<xsl:otherwise>
|
|
306
|
+
<xsl:value-of select="'list'"/>
|
|
307
|
+
</xsl:otherwise>
|
|
308
|
+
</xsl:choose>
|
|
309
|
+
</xsl:variable>
|
|
310
|
+
|
|
311
|
+
<xsl:variable name="list-width">
|
|
312
|
+
<xsl:call-template name="pi.dbhtml_list-width"/>
|
|
313
|
+
</xsl:variable>
|
|
314
|
+
|
|
315
|
+
<xsl:variable name="term-width">
|
|
316
|
+
<xsl:call-template name="pi.dbhtml_term-width"/>
|
|
317
|
+
</xsl:variable>
|
|
318
|
+
|
|
319
|
+
<xsl:variable name="table-summary">
|
|
320
|
+
<xsl:call-template name="pi.dbhtml_table-summary"/>
|
|
321
|
+
</xsl:variable>
|
|
322
|
+
|
|
323
|
+
<div>
|
|
324
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
325
|
+
<xsl:call-template name="id.attribute"/>
|
|
326
|
+
<xsl:call-template name="anchor"/>
|
|
327
|
+
<xsl:if test="d:title|d:info/d:title">
|
|
328
|
+
<xsl:call-template name="formal.object.heading"/>
|
|
329
|
+
</xsl:if>
|
|
330
|
+
|
|
331
|
+
<xsl:choose>
|
|
332
|
+
<xsl:when test="$presentation = 'table'">
|
|
333
|
+
<!-- Preserve order of PIs and comments -->
|
|
334
|
+
<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)]"/>
|
|
335
|
+
<table border="{$table.border.off}">
|
|
336
|
+
<xsl:call-template name="generate.class.attribute">
|
|
337
|
+
<xsl:with-param name="class" select="$default.class"/>
|
|
338
|
+
</xsl:call-template>
|
|
339
|
+
<xsl:if test="$list-width != ''">
|
|
340
|
+
<xsl:attribute name="width">
|
|
341
|
+
<xsl:value-of select="$list-width"/>
|
|
342
|
+
</xsl:attribute>
|
|
343
|
+
</xsl:if>
|
|
344
|
+
<xsl:if test="$table-summary != ''">
|
|
345
|
+
<xsl:attribute name="summary">
|
|
346
|
+
<xsl:value-of select="$table-summary"/>
|
|
347
|
+
</xsl:attribute>
|
|
348
|
+
</xsl:if>
|
|
349
|
+
<colgroup>
|
|
350
|
+
<col align="{$direction.align.start}" valign="top">
|
|
351
|
+
<xsl:if test="$term-width != ''">
|
|
352
|
+
<xsl:attribute name="width">
|
|
353
|
+
<xsl:value-of select="$term-width"/>
|
|
354
|
+
</xsl:attribute>
|
|
355
|
+
</xsl:if>
|
|
356
|
+
</col>
|
|
357
|
+
<col/>
|
|
358
|
+
</colgroup>
|
|
359
|
+
<tbody>
|
|
360
|
+
<xsl:apply-templates mode="varlist-table" select="d:varlistentry |comment()[preceding-sibling::d:varlistentry] |processing-instruction()[preceding-sibling::d:varlistentry]"/>
|
|
361
|
+
</tbody>
|
|
362
|
+
</table>
|
|
363
|
+
</xsl:when>
|
|
364
|
+
<xsl:otherwise>
|
|
365
|
+
<!-- Preserve order of PIs and comments -->
|
|
366
|
+
<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)]"/>
|
|
367
|
+
<dl>
|
|
368
|
+
<xsl:call-template name="generate.class.attribute">
|
|
369
|
+
<xsl:with-param name="class" select="$default.class"/>
|
|
370
|
+
</xsl:call-template>
|
|
371
|
+
<xsl:apply-templates select="d:varlistentry |comment()[preceding-sibling::d:varlistentry] |processing-instruction()[preceding-sibling::d:varlistentry]"/>
|
|
372
|
+
</dl>
|
|
373
|
+
</xsl:otherwise>
|
|
374
|
+
</xsl:choose>
|
|
375
|
+
</div>
|
|
376
|
+
</xsl:template>
|
|
377
|
+
|
|
378
|
+
<xsl:template match="d:variablelist/d:title">
|
|
379
|
+
<!-- nop -->
|
|
380
|
+
</xsl:template>
|
|
381
|
+
|
|
382
|
+
<xsl:template match="d:itemizedlist/d:titleabbrev|d:orderedlist/d:titleabbrev">
|
|
383
|
+
<!--nop-->
|
|
384
|
+
</xsl:template>
|
|
385
|
+
|
|
386
|
+
<xsl:template match="d:variablelist/d:titleabbrev">
|
|
387
|
+
<!--nop-->
|
|
388
|
+
</xsl:template>
|
|
389
|
+
|
|
390
|
+
<xsl:template match="d:listitem" mode="xref">
|
|
391
|
+
<xsl:number format="1"/>
|
|
392
|
+
</xsl:template>
|
|
393
|
+
|
|
394
|
+
<xsl:template match="d:listitem/d:simpara" priority="2">
|
|
395
|
+
<!-- If a listitem contains only a single simpara, don't output
|
|
396
|
+
the <p> wrapper; this has the effect of creating an li
|
|
397
|
+
with simple text content. -->
|
|
398
|
+
<xsl:choose>
|
|
399
|
+
<xsl:when test="not(preceding-sibling::*) and not (following-sibling::*)">
|
|
400
|
+
<xsl:call-template name="anchor"/>
|
|
401
|
+
<xsl:apply-templates/>
|
|
402
|
+
</xsl:when>
|
|
403
|
+
<xsl:otherwise>
|
|
404
|
+
<p>
|
|
405
|
+
<xsl:call-template name="id.attribute"/>
|
|
406
|
+
<xsl:choose>
|
|
407
|
+
<xsl:when test="@role and $para.propagates.style != 0">
|
|
408
|
+
<xsl:call-template name="common.html.attributes">
|
|
409
|
+
<xsl:with-param name="class" select="@role"/>
|
|
410
|
+
</xsl:call-template>
|
|
411
|
+
</xsl:when>
|
|
412
|
+
<xsl:otherwise>
|
|
413
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
414
|
+
</xsl:otherwise>
|
|
415
|
+
</xsl:choose>
|
|
416
|
+
|
|
417
|
+
<xsl:call-template name="anchor"/>
|
|
418
|
+
<xsl:apply-templates/>
|
|
419
|
+
</p>
|
|
420
|
+
</xsl:otherwise>
|
|
421
|
+
</xsl:choose>
|
|
422
|
+
</xsl:template>
|
|
423
|
+
|
|
424
|
+
<xsl:template match="d:varlistentry">
|
|
425
|
+
<dt>
|
|
426
|
+
<xsl:call-template name="id.attribute"/>
|
|
427
|
+
<xsl:call-template name="anchor"/>
|
|
428
|
+
<xsl:apply-templates select="d:term"/>
|
|
429
|
+
</dt>
|
|
430
|
+
<dd>
|
|
431
|
+
<xsl:apply-templates select="d:listitem"/>
|
|
432
|
+
</dd>
|
|
433
|
+
</xsl:template>
|
|
434
|
+
|
|
435
|
+
<xsl:template match="d:varlistentry" mode="varlist-table">
|
|
436
|
+
<xsl:variable name="presentation">
|
|
437
|
+
<xsl:call-template name="pi.dbhtml_term-presentation">
|
|
438
|
+
<xsl:with-param name="node" select=".."/>
|
|
439
|
+
</xsl:call-template>
|
|
440
|
+
</xsl:variable>
|
|
441
|
+
|
|
442
|
+
<xsl:variable name="separator">
|
|
443
|
+
<xsl:call-template name="pi.dbhtml_term-separator">
|
|
444
|
+
<xsl:with-param name="node" select=".."/>
|
|
445
|
+
</xsl:call-template>
|
|
446
|
+
</xsl:variable>
|
|
447
|
+
<tr>
|
|
448
|
+
<xsl:call-template name="tr.attributes">
|
|
449
|
+
<xsl:with-param name="rownum">
|
|
450
|
+
<xsl:number from="d:variablelist" count="d:varlistentry"/>
|
|
451
|
+
</xsl:with-param>
|
|
452
|
+
</xsl:call-template>
|
|
453
|
+
|
|
454
|
+
<td>
|
|
455
|
+
<xsl:call-template name="id.attribute"/>
|
|
456
|
+
<p>
|
|
457
|
+
<xsl:call-template name="anchor"/>
|
|
458
|
+
<xsl:choose>
|
|
459
|
+
<xsl:when test="$presentation = 'bold'">
|
|
460
|
+
<strong>
|
|
461
|
+
<xsl:apply-templates select="d:term"/>
|
|
462
|
+
<xsl:value-of select="$separator"/>
|
|
463
|
+
</strong>
|
|
464
|
+
</xsl:when>
|
|
465
|
+
<xsl:when test="$presentation = 'italic'">
|
|
466
|
+
<em>
|
|
467
|
+
<xsl:apply-templates select="d:term"/>
|
|
468
|
+
<xsl:value-of select="$separator"/>
|
|
469
|
+
</em>
|
|
470
|
+
</xsl:when>
|
|
471
|
+
<xsl:when test="$presentation = 'bold-italic'">
|
|
472
|
+
<strong>
|
|
473
|
+
<em>
|
|
474
|
+
<xsl:apply-templates select="d:term"/>
|
|
475
|
+
<xsl:value-of select="$separator"/>
|
|
476
|
+
</em>
|
|
477
|
+
</strong>
|
|
478
|
+
</xsl:when>
|
|
479
|
+
<xsl:otherwise>
|
|
480
|
+
<xsl:apply-templates select="d:term"/>
|
|
481
|
+
<xsl:value-of select="$separator"/>
|
|
482
|
+
</xsl:otherwise>
|
|
483
|
+
</xsl:choose>
|
|
484
|
+
</p>
|
|
485
|
+
</td>
|
|
486
|
+
<td>
|
|
487
|
+
<xsl:apply-templates select="d:listitem"/>
|
|
488
|
+
</td>
|
|
489
|
+
</tr>
|
|
490
|
+
</xsl:template>
|
|
491
|
+
|
|
492
|
+
<xsl:template match="d:varlistentry/d:term">
|
|
493
|
+
<span>
|
|
494
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
495
|
+
<xsl:call-template name="id.attribute"/>
|
|
496
|
+
<xsl:call-template name="anchor"/>
|
|
497
|
+
<xsl:call-template name="simple.xlink">
|
|
498
|
+
<xsl:with-param name="content">
|
|
499
|
+
<xsl:apply-templates/>
|
|
500
|
+
</xsl:with-param>
|
|
501
|
+
</xsl:call-template>
|
|
502
|
+
<xsl:choose>
|
|
503
|
+
<xsl:when test="position() = last()"/> <!-- do nothing -->
|
|
504
|
+
<xsl:otherwise>
|
|
505
|
+
<!-- * if we have multiple terms in the same varlistentry, generate -->
|
|
506
|
+
<!-- * a separator (", " by default) and/or an additional line -->
|
|
507
|
+
<!-- * break after each one except the last -->
|
|
508
|
+
<xsl:value-of select="$variablelist.term.separator"/>
|
|
509
|
+
<xsl:if test="not($variablelist.term.break.after = '0')">
|
|
510
|
+
<br/>
|
|
511
|
+
</xsl:if>
|
|
512
|
+
</xsl:otherwise>
|
|
513
|
+
</xsl:choose>
|
|
514
|
+
</span>
|
|
515
|
+
</xsl:template>
|
|
516
|
+
|
|
517
|
+
<xsl:template match="d:varlistentry/d:listitem">
|
|
518
|
+
<!-- we can't just drop the anchor in since some browsers (Opera)
|
|
519
|
+
get confused about line breaks if we do. So if the first child
|
|
520
|
+
is a para, assume the para will put in the anchor. Otherwise,
|
|
521
|
+
put the anchor in anyway. -->
|
|
522
|
+
<xsl:if test="local-name(child::*[1]) != 'para'">
|
|
523
|
+
<xsl:call-template name="anchor"/>
|
|
524
|
+
</xsl:if>
|
|
525
|
+
|
|
526
|
+
<xsl:choose>
|
|
527
|
+
<xsl:when test="$show.revisionflag != 0 and @revisionflag">
|
|
528
|
+
<div class="{@revisionflag}">
|
|
529
|
+
<xsl:apply-templates/>
|
|
530
|
+
</div>
|
|
531
|
+
</xsl:when>
|
|
532
|
+
<xsl:otherwise>
|
|
533
|
+
<xsl:apply-templates/>
|
|
534
|
+
</xsl:otherwise>
|
|
535
|
+
</xsl:choose>
|
|
536
|
+
</xsl:template>
|
|
537
|
+
|
|
538
|
+
<!-- ==================================================================== -->
|
|
539
|
+
|
|
540
|
+
<xsl:template match="d:simplelist">
|
|
541
|
+
<!-- with no type specified, the default is 'vert' -->
|
|
542
|
+
<xsl:call-template name="anchor"/>
|
|
543
|
+
<table border="{$table.border.off}">
|
|
544
|
+
<xsl:if test="$div.element != 'section'">
|
|
545
|
+
<xsl:attribute name="summary">Simple list</xsl:attribute>
|
|
546
|
+
</xsl:if>
|
|
547
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
548
|
+
<xsl:call-template name="id.attribute"/>
|
|
549
|
+
<xsl:call-template name="simplelist.vert">
|
|
550
|
+
<xsl:with-param name="cols">
|
|
551
|
+
<xsl:choose>
|
|
552
|
+
<xsl:when test="@columns">
|
|
553
|
+
<xsl:value-of select="@columns"/>
|
|
554
|
+
</xsl:when>
|
|
555
|
+
<xsl:otherwise>1</xsl:otherwise>
|
|
556
|
+
</xsl:choose>
|
|
557
|
+
</xsl:with-param>
|
|
558
|
+
</xsl:call-template>
|
|
559
|
+
</table>
|
|
560
|
+
</xsl:template>
|
|
561
|
+
|
|
562
|
+
<xsl:template match="d:simplelist[@type='inline']">
|
|
563
|
+
<span>
|
|
564
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
565
|
+
<xsl:call-template name="id.attribute"/>
|
|
566
|
+
<!-- if dbchoice PI exists, use that to determine the choice separator -->
|
|
567
|
+
<!-- (that is, equivalent of "and" or "or" in current locale), or literal -->
|
|
568
|
+
<!-- value of "choice" otherwise -->
|
|
569
|
+
<xsl:variable name="localized-choice-separator">
|
|
570
|
+
<xsl:choose>
|
|
571
|
+
<xsl:when test="processing-instruction('dbchoice')">
|
|
572
|
+
<xsl:call-template name="select.choice.separator"/>
|
|
573
|
+
</xsl:when>
|
|
574
|
+
<xsl:otherwise>
|
|
575
|
+
<!-- empty -->
|
|
576
|
+
</xsl:otherwise>
|
|
577
|
+
</xsl:choose>
|
|
578
|
+
</xsl:variable>
|
|
579
|
+
|
|
580
|
+
<xsl:for-each select="d:member">
|
|
581
|
+
<xsl:call-template name="simple.xlink">
|
|
582
|
+
<xsl:with-param name="content">
|
|
583
|
+
<xsl:apply-templates/>
|
|
584
|
+
</xsl:with-param>
|
|
585
|
+
</xsl:call-template>
|
|
586
|
+
<xsl:choose>
|
|
587
|
+
<xsl:when test="position() = last()"/> <!-- do nothing -->
|
|
588
|
+
<xsl:otherwise>
|
|
589
|
+
<xsl:text>, </xsl:text>
|
|
590
|
+
<xsl:if test="position() = last() - 1">
|
|
591
|
+
<xsl:if test="$localized-choice-separator != ''">
|
|
592
|
+
<xsl:value-of select="$localized-choice-separator"/>
|
|
593
|
+
<xsl:text> </xsl:text>
|
|
594
|
+
</xsl:if>
|
|
595
|
+
</xsl:if>
|
|
596
|
+
</xsl:otherwise>
|
|
597
|
+
</xsl:choose>
|
|
598
|
+
</xsl:for-each>
|
|
599
|
+
</span>
|
|
600
|
+
</xsl:template>
|
|
601
|
+
|
|
602
|
+
<xsl:template match="d:simplelist[@type='horiz']">
|
|
603
|
+
<xsl:call-template name="anchor"/>
|
|
604
|
+
<table border="{$table.border.off}">
|
|
605
|
+
<xsl:if test="$div.element != 'section'">
|
|
606
|
+
<xsl:attribute name="summary">Simple list</xsl:attribute>
|
|
607
|
+
</xsl:if>
|
|
608
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
609
|
+
<xsl:call-template name="id.attribute"/>
|
|
610
|
+
<xsl:call-template name="simplelist.horiz">
|
|
611
|
+
<xsl:with-param name="cols">
|
|
612
|
+
<xsl:choose>
|
|
613
|
+
<xsl:when test="@columns">
|
|
614
|
+
<xsl:value-of select="@columns"/>
|
|
615
|
+
</xsl:when>
|
|
616
|
+
<xsl:otherwise>1</xsl:otherwise>
|
|
617
|
+
</xsl:choose>
|
|
618
|
+
</xsl:with-param>
|
|
619
|
+
</xsl:call-template>
|
|
620
|
+
</table>
|
|
621
|
+
</xsl:template>
|
|
622
|
+
|
|
623
|
+
<xsl:template match="d:simplelist[@type='vert']">
|
|
624
|
+
<xsl:call-template name="anchor"/>
|
|
625
|
+
<table border="{$table.border.off}">
|
|
626
|
+
<xsl:if test="$div.element != 'section'">
|
|
627
|
+
<xsl:attribute name="summary">Simple list</xsl:attribute>
|
|
628
|
+
</xsl:if>
|
|
629
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
630
|
+
<xsl:call-template name="id.attribute"/>
|
|
631
|
+
<xsl:call-template name="simplelist.vert">
|
|
632
|
+
<xsl:with-param name="cols">
|
|
633
|
+
<xsl:choose>
|
|
634
|
+
<xsl:when test="@columns">
|
|
635
|
+
<xsl:value-of select="@columns"/>
|
|
636
|
+
</xsl:when>
|
|
637
|
+
<xsl:otherwise>1</xsl:otherwise>
|
|
638
|
+
</xsl:choose>
|
|
639
|
+
</xsl:with-param>
|
|
640
|
+
</xsl:call-template>
|
|
641
|
+
</table>
|
|
642
|
+
</xsl:template>
|
|
643
|
+
|
|
644
|
+
<xsl:template name="simplelist.horiz">
|
|
645
|
+
<xsl:param name="cols">1</xsl:param>
|
|
646
|
+
<xsl:param name="cell">1</xsl:param>
|
|
647
|
+
<xsl:param name="members" select="./d:member"/>
|
|
648
|
+
|
|
649
|
+
<xsl:if test="$cell <= count($members)">
|
|
650
|
+
<tr>
|
|
651
|
+
<xsl:call-template name="tr.attributes">
|
|
652
|
+
<xsl:with-param name="row" select="$members[1]"/>
|
|
653
|
+
<xsl:with-param name="rownum" select="(($cell - 1) div $cols) + 1"/>
|
|
654
|
+
</xsl:call-template>
|
|
655
|
+
|
|
656
|
+
<xsl:call-template name="simplelist.horiz.row">
|
|
657
|
+
<xsl:with-param name="cols" select="$cols"/>
|
|
658
|
+
<xsl:with-param name="cell" select="$cell"/>
|
|
659
|
+
<xsl:with-param name="members" select="$members"/>
|
|
660
|
+
</xsl:call-template>
|
|
661
|
+
</tr>
|
|
662
|
+
<xsl:call-template name="simplelist.horiz">
|
|
663
|
+
<xsl:with-param name="cols" select="$cols"/>
|
|
664
|
+
<xsl:with-param name="cell" select="$cell + $cols"/>
|
|
665
|
+
<xsl:with-param name="members" select="$members"/>
|
|
666
|
+
</xsl:call-template>
|
|
667
|
+
</xsl:if>
|
|
668
|
+
</xsl:template>
|
|
669
|
+
|
|
670
|
+
<xsl:template name="simplelist.horiz.row">
|
|
671
|
+
<xsl:param name="cols">1</xsl:param>
|
|
672
|
+
<xsl:param name="cell">1</xsl:param>
|
|
673
|
+
<xsl:param name="members" select="./d:member"/>
|
|
674
|
+
<xsl:param name="curcol">1</xsl:param>
|
|
675
|
+
|
|
676
|
+
<xsl:if test="$curcol <= $cols">
|
|
677
|
+
<td>
|
|
678
|
+
<xsl:choose>
|
|
679
|
+
<xsl:when test="$members[position()=$cell]">
|
|
680
|
+
<xsl:apply-templates select="$members[position()=$cell]"/>
|
|
681
|
+
</xsl:when>
|
|
682
|
+
<xsl:otherwise>
|
|
683
|
+
<xsl:text> </xsl:text>
|
|
684
|
+
</xsl:otherwise>
|
|
685
|
+
</xsl:choose>
|
|
686
|
+
</td>
|
|
687
|
+
<xsl:call-template name="simplelist.horiz.row">
|
|
688
|
+
<xsl:with-param name="cols" select="$cols"/>
|
|
689
|
+
<xsl:with-param name="cell" select="$cell+1"/>
|
|
690
|
+
<xsl:with-param name="members" select="$members"/>
|
|
691
|
+
<xsl:with-param name="curcol" select="$curcol+1"/>
|
|
692
|
+
</xsl:call-template>
|
|
693
|
+
</xsl:if>
|
|
694
|
+
</xsl:template>
|
|
695
|
+
|
|
696
|
+
<xsl:template name="simplelist.vert">
|
|
697
|
+
<xsl:param name="cols">1</xsl:param>
|
|
698
|
+
<xsl:param name="cell">1</xsl:param>
|
|
699
|
+
<xsl:param name="members" select="./d:member"/>
|
|
700
|
+
<xsl:param name="rows" select="floor((count($members)+$cols - 1) div $cols)"/>
|
|
701
|
+
|
|
702
|
+
<xsl:if test="$cell <= $rows">
|
|
703
|
+
<tr>
|
|
704
|
+
<xsl:call-template name="tr.attributes">
|
|
705
|
+
<xsl:with-param name="row" select="$members[1]"/>
|
|
706
|
+
<xsl:with-param name="rownum" select="$cell"/>
|
|
707
|
+
</xsl:call-template>
|
|
708
|
+
|
|
709
|
+
<xsl:call-template name="simplelist.vert.row">
|
|
710
|
+
<xsl:with-param name="cols" select="$cols"/>
|
|
711
|
+
<xsl:with-param name="rows" select="$rows"/>
|
|
712
|
+
<xsl:with-param name="cell" select="$cell"/>
|
|
713
|
+
<xsl:with-param name="members" select="$members"/>
|
|
714
|
+
</xsl:call-template>
|
|
715
|
+
</tr>
|
|
716
|
+
<xsl:call-template name="simplelist.vert">
|
|
717
|
+
<xsl:with-param name="cols" select="$cols"/>
|
|
718
|
+
<xsl:with-param name="cell" select="$cell+1"/>
|
|
719
|
+
<xsl:with-param name="members" select="$members"/>
|
|
720
|
+
<xsl:with-param name="rows" select="$rows"/>
|
|
721
|
+
</xsl:call-template>
|
|
722
|
+
</xsl:if>
|
|
723
|
+
</xsl:template>
|
|
724
|
+
|
|
725
|
+
<xsl:template name="simplelist.vert.row">
|
|
726
|
+
<xsl:param name="cols">1</xsl:param>
|
|
727
|
+
<xsl:param name="rows">1</xsl:param>
|
|
728
|
+
<xsl:param name="cell">1</xsl:param>
|
|
729
|
+
<xsl:param name="members" select="./d:member"/>
|
|
730
|
+
<xsl:param name="curcol">1</xsl:param>
|
|
731
|
+
|
|
732
|
+
<xsl:if test="$curcol <= $cols">
|
|
733
|
+
<td>
|
|
734
|
+
<xsl:choose>
|
|
735
|
+
<xsl:when test="$members[position()=$cell]">
|
|
736
|
+
<xsl:apply-templates select="$members[position()=$cell]"/>
|
|
737
|
+
</xsl:when>
|
|
738
|
+
<xsl:otherwise>
|
|
739
|
+
<xsl:text> </xsl:text>
|
|
740
|
+
</xsl:otherwise>
|
|
741
|
+
</xsl:choose>
|
|
742
|
+
</td>
|
|
743
|
+
<xsl:call-template name="simplelist.vert.row">
|
|
744
|
+
<xsl:with-param name="cols" select="$cols"/>
|
|
745
|
+
<xsl:with-param name="rows" select="$rows"/>
|
|
746
|
+
<xsl:with-param name="cell" select="$cell+$rows"/>
|
|
747
|
+
<xsl:with-param name="members" select="$members"/>
|
|
748
|
+
<xsl:with-param name="curcol" select="$curcol+1"/>
|
|
749
|
+
</xsl:call-template>
|
|
750
|
+
</xsl:if>
|
|
751
|
+
</xsl:template>
|
|
752
|
+
|
|
753
|
+
<xsl:template match="d:member">
|
|
754
|
+
<xsl:call-template name="anchor"/>
|
|
755
|
+
<xsl:call-template name="simple.xlink">
|
|
756
|
+
<xsl:with-param name="content">
|
|
757
|
+
<xsl:apply-templates/>
|
|
758
|
+
</xsl:with-param>
|
|
759
|
+
</xsl:call-template>
|
|
760
|
+
</xsl:template>
|
|
761
|
+
|
|
762
|
+
<!-- ==================================================================== -->
|
|
763
|
+
|
|
764
|
+
<xsl:template match="d:procedure">
|
|
765
|
+
<xsl:variable name="param.placement" select="substring-after(normalize-space($formal.title.placement), concat(local-name(.), ' '))"/>
|
|
766
|
+
|
|
767
|
+
<xsl:variable name="placement">
|
|
768
|
+
<xsl:choose>
|
|
769
|
+
<xsl:when test="contains($param.placement, ' ')">
|
|
770
|
+
<xsl:value-of select="substring-before($param.placement, ' ')"/>
|
|
771
|
+
</xsl:when>
|
|
772
|
+
<xsl:when test="$param.placement = ''">before</xsl:when>
|
|
773
|
+
<xsl:otherwise>
|
|
774
|
+
<xsl:value-of select="$param.placement"/>
|
|
775
|
+
</xsl:otherwise>
|
|
776
|
+
</xsl:choose>
|
|
777
|
+
</xsl:variable>
|
|
778
|
+
|
|
779
|
+
<!-- Preserve order of PIs and comments -->
|
|
780
|
+
<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)]"/>
|
|
781
|
+
|
|
782
|
+
<div>
|
|
783
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
784
|
+
<xsl:call-template name="id.attribute">
|
|
785
|
+
<xsl:with-param name="conditional">
|
|
786
|
+
<xsl:choose>
|
|
787
|
+
<xsl:when test="d:title">0</xsl:when>
|
|
788
|
+
<xsl:otherwise>1</xsl:otherwise>
|
|
789
|
+
</xsl:choose>
|
|
790
|
+
</xsl:with-param>
|
|
791
|
+
</xsl:call-template>
|
|
792
|
+
<xsl:call-template name="anchor">
|
|
793
|
+
<xsl:with-param name="conditional">
|
|
794
|
+
<xsl:choose>
|
|
795
|
+
<xsl:when test="d:title|d:info/d:title|d:blockinfo/d:title">0</xsl:when>
|
|
796
|
+
<xsl:otherwise>1</xsl:otherwise>
|
|
797
|
+
</xsl:choose>
|
|
798
|
+
</xsl:with-param>
|
|
799
|
+
</xsl:call-template>
|
|
800
|
+
|
|
801
|
+
<xsl:if test="(d:title or d:info/d:title or d:blockinfo/d:title) and $placement = 'before'">
|
|
802
|
+
<xsl:call-template name="formal.object.heading"/>
|
|
803
|
+
</xsl:if>
|
|
804
|
+
|
|
805
|
+
<xsl:apply-templates select="$preamble"/>
|
|
806
|
+
|
|
807
|
+
<xsl:choose>
|
|
808
|
+
<xsl:when test="count(d:step) = 1">
|
|
809
|
+
<ul>
|
|
810
|
+
<xsl:call-template name="generate.class.attribute"/>
|
|
811
|
+
<xsl:apply-templates select="d:step |comment()[preceding-sibling::d:step] |processing-instruction()[preceding-sibling::d:step]"/>
|
|
812
|
+
</ul>
|
|
813
|
+
</xsl:when>
|
|
814
|
+
<xsl:otherwise>
|
|
815
|
+
<ol>
|
|
816
|
+
<xsl:call-template name="generate.class.attribute"/>
|
|
817
|
+
<xsl:attribute name="type">
|
|
818
|
+
<xsl:value-of select="substring($procedure.step.numeration.formats,1,1)"/>
|
|
819
|
+
</xsl:attribute>
|
|
820
|
+
<xsl:apply-templates select="d:step |comment()[preceding-sibling::d:step] |processing-instruction()[preceding-sibling::d:step]"/>
|
|
821
|
+
</ol>
|
|
822
|
+
</xsl:otherwise>
|
|
823
|
+
</xsl:choose>
|
|
824
|
+
|
|
825
|
+
<xsl:if test="(d:title or d:info/d:title or d:blockinfo/d:title) and $placement != 'before'">
|
|
826
|
+
<xsl:call-template name="formal.object.heading"/>
|
|
827
|
+
</xsl:if>
|
|
828
|
+
</div>
|
|
829
|
+
</xsl:template>
|
|
830
|
+
|
|
831
|
+
<xsl:template match="d:procedure/d:title">
|
|
832
|
+
<!-- nop -->
|
|
833
|
+
</xsl:template>
|
|
834
|
+
|
|
835
|
+
<xsl:template match="d:substeps">
|
|
836
|
+
<xsl:variable name="numeration">
|
|
837
|
+
<xsl:call-template name="procedure.step.numeration"/>
|
|
838
|
+
</xsl:variable>
|
|
839
|
+
|
|
840
|
+
<xsl:call-template name="anchor"/>
|
|
841
|
+
|
|
842
|
+
<ol type="{$numeration}">
|
|
843
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
844
|
+
<xsl:call-template name="id.attribute"/>
|
|
845
|
+
<xsl:apply-templates/>
|
|
846
|
+
</ol>
|
|
847
|
+
</xsl:template>
|
|
848
|
+
|
|
849
|
+
<xsl:template match="d:step">
|
|
850
|
+
<li>
|
|
851
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
852
|
+
<xsl:call-template name="id.attribute"/>
|
|
853
|
+
<xsl:call-template name="anchor"/>
|
|
854
|
+
<xsl:apply-templates/>
|
|
855
|
+
</li>
|
|
856
|
+
</xsl:template>
|
|
857
|
+
|
|
858
|
+
<xsl:template match="d:stepalternatives">
|
|
859
|
+
<xsl:call-template name="anchor"/>
|
|
860
|
+
<ul>
|
|
861
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
862
|
+
<xsl:call-template name="id.attribute"/>
|
|
863
|
+
<xsl:apply-templates/>
|
|
864
|
+
</ul>
|
|
865
|
+
</xsl:template>
|
|
866
|
+
|
|
867
|
+
<xsl:template match="d:step/d:title">
|
|
868
|
+
<p>
|
|
869
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
870
|
+
<strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform">
|
|
871
|
+
<xsl:apply-templates/>
|
|
872
|
+
</strong>
|
|
873
|
+
</p>
|
|
874
|
+
</xsl:template>
|
|
875
|
+
|
|
876
|
+
<!-- ==================================================================== -->
|
|
877
|
+
|
|
878
|
+
<xsl:template match="d:segmentedlist">
|
|
879
|
+
<xsl:variable name="presentation">
|
|
880
|
+
<xsl:call-template name="pi.dbhtml_list-presentation"/>
|
|
881
|
+
</xsl:variable>
|
|
882
|
+
|
|
883
|
+
<div>
|
|
884
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
885
|
+
<xsl:call-template name="id.attribute"/>
|
|
886
|
+
<xsl:call-template name="anchor"/>
|
|
887
|
+
|
|
888
|
+
<xsl:choose>
|
|
889
|
+
<xsl:when test="$presentation = 'table'">
|
|
890
|
+
<xsl:apply-templates select="." mode="seglist-table"/>
|
|
891
|
+
</xsl:when>
|
|
892
|
+
<xsl:when test="$presentation = 'list'">
|
|
893
|
+
<xsl:apply-templates/>
|
|
894
|
+
</xsl:when>
|
|
895
|
+
<xsl:when test="$segmentedlist.as.table != 0">
|
|
896
|
+
<xsl:apply-templates select="." mode="seglist-table"/>
|
|
897
|
+
</xsl:when>
|
|
898
|
+
<xsl:otherwise>
|
|
899
|
+
<xsl:apply-templates/>
|
|
900
|
+
</xsl:otherwise>
|
|
901
|
+
</xsl:choose>
|
|
902
|
+
</div>
|
|
903
|
+
</xsl:template>
|
|
904
|
+
|
|
905
|
+
<xsl:template match="d:segmentedlist/d:title">
|
|
906
|
+
<div>
|
|
907
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
908
|
+
<strong>
|
|
909
|
+
<span>
|
|
910
|
+
<xsl:call-template name="generate.class.attribute"/>
|
|
911
|
+
<xsl:apply-templates/>
|
|
912
|
+
</span>
|
|
913
|
+
</strong>
|
|
914
|
+
</div>
|
|
915
|
+
</xsl:template>
|
|
916
|
+
|
|
917
|
+
<xsl:template match="d:segtitle">
|
|
918
|
+
</xsl:template>
|
|
919
|
+
|
|
920
|
+
<xsl:template match="d:segtitle" mode="segtitle-in-seg">
|
|
921
|
+
<xsl:apply-templates/>
|
|
922
|
+
</xsl:template>
|
|
923
|
+
|
|
924
|
+
<xsl:template match="d:seglistitem">
|
|
925
|
+
<div>
|
|
926
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
927
|
+
<xsl:call-template name="id.attribute"/>
|
|
928
|
+
<xsl:call-template name="anchor"/>
|
|
929
|
+
<xsl:apply-templates/>
|
|
930
|
+
</div>
|
|
931
|
+
</xsl:template>
|
|
932
|
+
|
|
933
|
+
<xsl:template match="d:seg">
|
|
934
|
+
<xsl:variable name="segnum" select="count(preceding-sibling::d:seg)+1"/>
|
|
935
|
+
<xsl:variable name="seglist" select="ancestor::d:segmentedlist"/>
|
|
936
|
+
<xsl:variable name="segtitles" select="$seglist/d:segtitle"/>
|
|
937
|
+
|
|
938
|
+
<!--
|
|
939
|
+
Note: segtitle is only going to be the right thing in a well formed
|
|
940
|
+
SegmentedList. If there are too many Segs or too few SegTitles,
|
|
941
|
+
you'll get something odd...maybe an error
|
|
942
|
+
-->
|
|
943
|
+
|
|
944
|
+
<div>
|
|
945
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
946
|
+
<xsl:call-template name="id.attribute"/>
|
|
947
|
+
<strong>
|
|
948
|
+
<span class="segtitle">
|
|
949
|
+
<xsl:apply-templates select="$segtitles[$segnum=position()]" mode="segtitle-in-seg"/>
|
|
950
|
+
<xsl:text>: </xsl:text>
|
|
951
|
+
</span>
|
|
952
|
+
</strong>
|
|
953
|
+
<xsl:apply-templates/>
|
|
954
|
+
</div>
|
|
955
|
+
</xsl:template>
|
|
956
|
+
|
|
957
|
+
<xsl:template match="d:segmentedlist" mode="seglist-table">
|
|
958
|
+
<xsl:variable name="table-summary">
|
|
959
|
+
<xsl:call-template name="pi.dbhtml_table-summary"/>
|
|
960
|
+
</xsl:variable>
|
|
961
|
+
|
|
962
|
+
<xsl:variable name="list-width">
|
|
963
|
+
<xsl:call-template name="pi.dbhtml_list-width"/>
|
|
964
|
+
</xsl:variable>
|
|
965
|
+
|
|
966
|
+
<xsl:apply-templates select="d:title"/>
|
|
967
|
+
|
|
968
|
+
<table border="{$table.border.off}">
|
|
969
|
+
<xsl:if test="$list-width != ''">
|
|
970
|
+
<xsl:attribute name="width">
|
|
971
|
+
<xsl:value-of select="$list-width"/>
|
|
972
|
+
</xsl:attribute>
|
|
973
|
+
</xsl:if>
|
|
974
|
+
<xsl:if test="$table-summary != '' and $div.element != 'section'">
|
|
975
|
+
<xsl:attribute name="summary">
|
|
976
|
+
<xsl:value-of select="$table-summary"/>
|
|
977
|
+
</xsl:attribute>
|
|
978
|
+
</xsl:if>
|
|
979
|
+
<thead>
|
|
980
|
+
<tr class="segtitle">
|
|
981
|
+
<xsl:call-template name="tr.attributes">
|
|
982
|
+
<xsl:with-param name="row" select="d:segtitle[1]"/>
|
|
983
|
+
<xsl:with-param name="rownum" select="1"/>
|
|
984
|
+
</xsl:call-template>
|
|
985
|
+
<xsl:apply-templates select="d:segtitle" mode="seglist-table"/>
|
|
986
|
+
</tr>
|
|
987
|
+
</thead>
|
|
988
|
+
<tbody>
|
|
989
|
+
<xsl:apply-templates select="d:seglistitem" mode="seglist-table"/>
|
|
990
|
+
</tbody>
|
|
991
|
+
</table>
|
|
992
|
+
</xsl:template>
|
|
993
|
+
|
|
994
|
+
<xsl:template match="d:segtitle" mode="seglist-table">
|
|
995
|
+
<th><xsl:apply-templates/></th>
|
|
996
|
+
</xsl:template>
|
|
997
|
+
|
|
998
|
+
<xsl:template match="d:seglistitem" mode="seglist-table">
|
|
999
|
+
<xsl:variable name="seglinum">
|
|
1000
|
+
<xsl:number from="d:segmentedlist" count="d:seglistitem"/>
|
|
1001
|
+
</xsl:variable>
|
|
1002
|
+
|
|
1003
|
+
<tr>
|
|
1004
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
1005
|
+
<xsl:call-template name="id.attribute"/>
|
|
1006
|
+
<xsl:call-template name="tr.attributes">
|
|
1007
|
+
<xsl:with-param name="rownum" select="$seglinum + 1"/>
|
|
1008
|
+
</xsl:call-template>
|
|
1009
|
+
<xsl:apply-templates mode="seglist-table"/>
|
|
1010
|
+
</tr>
|
|
1011
|
+
</xsl:template>
|
|
1012
|
+
|
|
1013
|
+
<xsl:template match="d:seg" mode="seglist-table">
|
|
1014
|
+
<td>
|
|
1015
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
1016
|
+
<xsl:call-template name="id.attribute"/>
|
|
1017
|
+
<xsl:apply-templates/>
|
|
1018
|
+
</td>
|
|
1019
|
+
</xsl:template>
|
|
1020
|
+
|
|
1021
|
+
<xsl:template match="d:seg[1]" mode="seglist-table">
|
|
1022
|
+
<td>
|
|
1023
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
1024
|
+
<xsl:call-template name="id.attribute"/>
|
|
1025
|
+
<xsl:call-template name="anchor">
|
|
1026
|
+
<xsl:with-param name="node" select="ancestor::d:seglistitem"/>
|
|
1027
|
+
</xsl:call-template>
|
|
1028
|
+
<xsl:apply-templates/>
|
|
1029
|
+
</td>
|
|
1030
|
+
</xsl:template>
|
|
1031
|
+
|
|
1032
|
+
<!-- ==================================================================== -->
|
|
1033
|
+
|
|
1034
|
+
<xsl:template match="d:calloutlist">
|
|
1035
|
+
<div>
|
|
1036
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
1037
|
+
<xsl:call-template name="id.attribute"/>
|
|
1038
|
+
<xsl:call-template name="anchor"/>
|
|
1039
|
+
<xsl:if test="d:title|d:info/d:title">
|
|
1040
|
+
<xsl:call-template name="formal.object.heading"/>
|
|
1041
|
+
</xsl:if>
|
|
1042
|
+
|
|
1043
|
+
<!-- Preserve order of PIs and comments -->
|
|
1044
|
+
<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)]"/>
|
|
1045
|
+
|
|
1046
|
+
<xsl:choose>
|
|
1047
|
+
<xsl:when test="$callout.list.table != 0">
|
|
1048
|
+
<table border="{$table.border.off}">
|
|
1049
|
+
<xsl:if test="$div.element != 'section'">
|
|
1050
|
+
<xsl:attribute name="summary">Callout list</xsl:attribute>
|
|
1051
|
+
</xsl:if>
|
|
1052
|
+
<xsl:apply-templates select="d:callout |comment()[preceding-sibling::d:callout] |processing-instruction()[preceding-sibling::d:callout]"/>
|
|
1053
|
+
</table>
|
|
1054
|
+
</xsl:when>
|
|
1055
|
+
<xsl:otherwise>
|
|
1056
|
+
<dl>
|
|
1057
|
+
<xsl:apply-templates select="." mode="class.attribute"/>
|
|
1058
|
+
<xsl:apply-templates select="d:callout |comment()[preceding-sibling::d:callout] |processing-instruction()[preceding-sibling::d:callout]"/>
|
|
1059
|
+
</dl>
|
|
1060
|
+
</xsl:otherwise>
|
|
1061
|
+
</xsl:choose>
|
|
1062
|
+
</div>
|
|
1063
|
+
</xsl:template>
|
|
1064
|
+
|
|
1065
|
+
<xsl:template match="d:calloutlist/d:title">
|
|
1066
|
+
</xsl:template>
|
|
1067
|
+
|
|
1068
|
+
<xsl:template match="d:callout">
|
|
1069
|
+
<xsl:choose>
|
|
1070
|
+
<xsl:when test="$callout.list.table != 0">
|
|
1071
|
+
<tr>
|
|
1072
|
+
<xsl:call-template name="tr.attributes">
|
|
1073
|
+
<xsl:with-param name="rownum">
|
|
1074
|
+
<xsl:number from="d:calloutlist" count="d:callout"/>
|
|
1075
|
+
</xsl:with-param>
|
|
1076
|
+
</xsl:call-template>
|
|
1077
|
+
|
|
1078
|
+
<td width="5%" valign="top" align="{$direction.align.start}">
|
|
1079
|
+
<xsl:call-template name="id.attribute"/>
|
|
1080
|
+
<p>
|
|
1081
|
+
<xsl:call-template name="anchor"/>
|
|
1082
|
+
<xsl:call-template name="callout.arearefs">
|
|
1083
|
+
<xsl:with-param name="arearefs" select="@arearefs"/>
|
|
1084
|
+
</xsl:call-template>
|
|
1085
|
+
</p>
|
|
1086
|
+
</td>
|
|
1087
|
+
<td valign="top" align="{$direction.align.start}">
|
|
1088
|
+
<xsl:apply-templates/>
|
|
1089
|
+
</td>
|
|
1090
|
+
</tr>
|
|
1091
|
+
</xsl:when>
|
|
1092
|
+
<xsl:otherwise>
|
|
1093
|
+
<dt>
|
|
1094
|
+
<xsl:call-template name="id.attribute"/>
|
|
1095
|
+
<xsl:call-template name="anchor"/>
|
|
1096
|
+
<xsl:call-template name="callout.arearefs">
|
|
1097
|
+
<xsl:with-param name="arearefs" select="@arearefs"/>
|
|
1098
|
+
</xsl:call-template>
|
|
1099
|
+
</dt>
|
|
1100
|
+
<dd><xsl:apply-templates/></dd>
|
|
1101
|
+
</xsl:otherwise>
|
|
1102
|
+
</xsl:choose>
|
|
1103
|
+
</xsl:template>
|
|
1104
|
+
|
|
1105
|
+
<xsl:template match="d:callout/d:simpara" priority="2">
|
|
1106
|
+
<!-- If a callout contains only a single simpara, don't output
|
|
1107
|
+
the <p> wrapper; this has the effect of creating an li
|
|
1108
|
+
with simple text content. -->
|
|
1109
|
+
<xsl:choose>
|
|
1110
|
+
<xsl:when test="not(preceding-sibling::*) and not (following-sibling::*)">
|
|
1111
|
+
<xsl:call-template name="anchor"/>
|
|
1112
|
+
<xsl:apply-templates/>
|
|
1113
|
+
</xsl:when>
|
|
1114
|
+
<xsl:otherwise>
|
|
1115
|
+
<p>
|
|
1116
|
+
<xsl:call-template name="id.attribute"/>
|
|
1117
|
+
<xsl:if test="@role and $para.propagates.style != 0">
|
|
1118
|
+
<xsl:choose>
|
|
1119
|
+
<xsl:when test="@role and $para.propagates.style != 0">
|
|
1120
|
+
<xsl:call-template name="common.html.attributes">
|
|
1121
|
+
<xsl:with-param name="class" select="@role"/>
|
|
1122
|
+
</xsl:call-template>
|
|
1123
|
+
</xsl:when>
|
|
1124
|
+
<xsl:otherwise>
|
|
1125
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
1126
|
+
</xsl:otherwise>
|
|
1127
|
+
</xsl:choose>
|
|
1128
|
+
</xsl:if>
|
|
1129
|
+
|
|
1130
|
+
<xsl:call-template name="anchor"/>
|
|
1131
|
+
<xsl:apply-templates/>
|
|
1132
|
+
</p>
|
|
1133
|
+
</xsl:otherwise>
|
|
1134
|
+
</xsl:choose>
|
|
1135
|
+
</xsl:template>
|
|
1136
|
+
|
|
1137
|
+
<xsl:template name="callout.arearefs">
|
|
1138
|
+
<xsl:param name="arearefs"/>
|
|
1139
|
+
<xsl:if test="$arearefs!=''">
|
|
1140
|
+
<xsl:choose>
|
|
1141
|
+
<xsl:when test="substring-before($arearefs,' ')=''">
|
|
1142
|
+
<xsl:call-template name="callout.arearef">
|
|
1143
|
+
<xsl:with-param name="arearef" select="$arearefs"/>
|
|
1144
|
+
</xsl:call-template>
|
|
1145
|
+
</xsl:when>
|
|
1146
|
+
<xsl:otherwise>
|
|
1147
|
+
<xsl:call-template name="callout.arearef">
|
|
1148
|
+
<xsl:with-param name="arearef" select="substring-before($arearefs,' ')"/>
|
|
1149
|
+
</xsl:call-template>
|
|
1150
|
+
</xsl:otherwise>
|
|
1151
|
+
</xsl:choose>
|
|
1152
|
+
<xsl:call-template name="callout.arearefs">
|
|
1153
|
+
<xsl:with-param name="arearefs" select="substring-after($arearefs,' ')"/>
|
|
1154
|
+
</xsl:call-template>
|
|
1155
|
+
</xsl:if>
|
|
1156
|
+
</xsl:template>
|
|
1157
|
+
|
|
1158
|
+
<xsl:template name="callout.arearef">
|
|
1159
|
+
<xsl:param name="arearef"/>
|
|
1160
|
+
<xsl:variable name="targets" select="key('id',$arearef)"/>
|
|
1161
|
+
<xsl:variable name="target" select="$targets[1]"/>
|
|
1162
|
+
|
|
1163
|
+
<xsl:call-template name="check.id.unique">
|
|
1164
|
+
<xsl:with-param name="linkend" select="$arearef"/>
|
|
1165
|
+
</xsl:call-template>
|
|
1166
|
+
|
|
1167
|
+
<xsl:choose>
|
|
1168
|
+
<xsl:when test="count($target)=0">
|
|
1169
|
+
<xsl:text>???</xsl:text>
|
|
1170
|
+
</xsl:when>
|
|
1171
|
+
<xsl:when test="local-name($target)='co'">
|
|
1172
|
+
<a>
|
|
1173
|
+
<xsl:attribute name="href">
|
|
1174
|
+
<xsl:text>#</xsl:text>
|
|
1175
|
+
<xsl:value-of select="$arearef"/>
|
|
1176
|
+
</xsl:attribute>
|
|
1177
|
+
<xsl:apply-templates select="$target" mode="callout-bug"/>
|
|
1178
|
+
</a>
|
|
1179
|
+
<xsl:text> </xsl:text>
|
|
1180
|
+
</xsl:when>
|
|
1181
|
+
<xsl:when test="local-name($target)='areaset'">
|
|
1182
|
+
<xsl:call-template name="callout-bug">
|
|
1183
|
+
<xsl:with-param name="conum">
|
|
1184
|
+
<xsl:apply-templates select="$target" mode="conumber"/>
|
|
1185
|
+
</xsl:with-param>
|
|
1186
|
+
</xsl:call-template>
|
|
1187
|
+
</xsl:when>
|
|
1188
|
+
<xsl:when test="local-name($target)='area'">
|
|
1189
|
+
<xsl:choose>
|
|
1190
|
+
<xsl:when test="$target/parent::d:areaset">
|
|
1191
|
+
<xsl:call-template name="callout-bug">
|
|
1192
|
+
<xsl:with-param name="conum">
|
|
1193
|
+
<xsl:apply-templates select="$target/parent::d:areaset" mode="conumber"/>
|
|
1194
|
+
</xsl:with-param>
|
|
1195
|
+
</xsl:call-template>
|
|
1196
|
+
</xsl:when>
|
|
1197
|
+
<xsl:otherwise>
|
|
1198
|
+
<xsl:call-template name="callout-bug">
|
|
1199
|
+
<xsl:with-param name="conum">
|
|
1200
|
+
<xsl:apply-templates select="$target" mode="conumber"/>
|
|
1201
|
+
</xsl:with-param>
|
|
1202
|
+
</xsl:call-template>
|
|
1203
|
+
</xsl:otherwise>
|
|
1204
|
+
</xsl:choose>
|
|
1205
|
+
</xsl:when>
|
|
1206
|
+
<xsl:otherwise>
|
|
1207
|
+
<xsl:text>???</xsl:text>
|
|
1208
|
+
</xsl:otherwise>
|
|
1209
|
+
</xsl:choose>
|
|
1210
|
+
</xsl:template>
|
|
1211
|
+
|
|
1212
|
+
<!-- ==================================================================== -->
|
|
1213
|
+
|
|
1214
|
+
<xsl:template name="orderedlist-starting-number">
|
|
1215
|
+
<xsl:param name="list" select="."/>
|
|
1216
|
+
<xsl:variable name="pi-start">
|
|
1217
|
+
<xsl:call-template name="pi.dbhtml_start">
|
|
1218
|
+
<xsl:with-param name="node" select="$list"/>
|
|
1219
|
+
</xsl:call-template>
|
|
1220
|
+
</xsl:variable>
|
|
1221
|
+
<xsl:call-template name="output-orderedlist-starting-number">
|
|
1222
|
+
<xsl:with-param name="list" select="$list"/>
|
|
1223
|
+
<xsl:with-param name="pi-start" select="$pi-start"/>
|
|
1224
|
+
</xsl:call-template>
|
|
1225
|
+
</xsl:template>
|
|
1226
|
+
|
|
1227
|
+
</xsl:stylesheet>
|