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
|
@@ -0,0 +1,102 @@
|
|
|
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: htmltbl.xsl 9501 2012-07-16 00:14:50Z 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:table" mode="htmlTable">
|
|
21
|
+
<xsl:element name="table" namespace="http://www.w3.org/1999/xhtml">
|
|
22
|
+
<xsl:apply-templates select="@*" mode="htmlTableAtt"/>
|
|
23
|
+
<xsl:call-template name="htmlTable"/>
|
|
24
|
+
</xsl:element>
|
|
25
|
+
</xsl:template>
|
|
26
|
+
|
|
27
|
+
<xsl:template match="d:colgroup" mode="htmlTable">
|
|
28
|
+
<xsl:element name="{local-name()}" namespace="http://www.w3.org/1999/xhtml">
|
|
29
|
+
<xsl:apply-templates select="@*" mode="htmlTableAtt"/>
|
|
30
|
+
<xsl:apply-templates mode="htmlTable"/>
|
|
31
|
+
</xsl:element>
|
|
32
|
+
</xsl:template>
|
|
33
|
+
|
|
34
|
+
<xsl:template match="d:col" mode="htmlTable">
|
|
35
|
+
<xsl:element name="{local-name()}" namespace="http://www.w3.org/1999/xhtml">
|
|
36
|
+
<xsl:apply-templates select="@*" mode="htmlTableAtt"/>
|
|
37
|
+
</xsl:element>
|
|
38
|
+
</xsl:template>
|
|
39
|
+
|
|
40
|
+
<!-- Handled by formal.object.title template -->
|
|
41
|
+
<xsl:template match="d:caption" mode="htmlTable"/>
|
|
42
|
+
|
|
43
|
+
<xsl:template match="d:tbody|d:thead|d:tfoot|d:tr" mode="htmlTable">
|
|
44
|
+
<xsl:element name="{local-name(.)}" namespace="http://www.w3.org/1999/xhtml">
|
|
45
|
+
<xsl:apply-templates select="@*" mode="htmlTableAtt"/>
|
|
46
|
+
<xsl:apply-templates mode="htmlTable"/>
|
|
47
|
+
</xsl:element>
|
|
48
|
+
</xsl:template>
|
|
49
|
+
|
|
50
|
+
<xsl:template match="d:th|d:td" mode="htmlTable">
|
|
51
|
+
<xsl:element name="{local-name(.)}" namespace="http://www.w3.org/1999/xhtml">
|
|
52
|
+
<xsl:apply-templates select="@*" mode="htmlTableAtt"/>
|
|
53
|
+
<xsl:apply-templates/> <!-- *not* mode=htmlTable -->
|
|
54
|
+
</xsl:element>
|
|
55
|
+
</xsl:template>
|
|
56
|
+
|
|
57
|
+
<!-- don't copy through DocBook-specific attributes on HTML table markup -->
|
|
58
|
+
<!-- default behavior is to not copy through because there are more
|
|
59
|
+
DocBook attributes than HTML attributes -->
|
|
60
|
+
<xsl:template mode="htmlTableAtt" match="@*"/>
|
|
61
|
+
|
|
62
|
+
<!-- copy these through -->
|
|
63
|
+
<xsl:template mode="htmlTableAtt" match="@abbr | @align | @axis | @bgcolor | @border | @cellpadding | @cellspacing | @char | @charoff | @class | @dir | @frame | @headers | @height | @lang | @nowrap | @onclick | @ondblclick | @onkeydown | @onkeypress | @onkeyup | @onmousedown | @onmousemove | @onmouseout | @onmouseover | @onmouseup | @rules | @style | @summary | @title | @valign | @valign | @width | @xml:lang">
|
|
64
|
+
<xsl:copy-of select="."/>
|
|
65
|
+
</xsl:template>
|
|
66
|
+
|
|
67
|
+
<xsl:template match="@span|@rowspan|@colspan" mode="htmlTableAtt">
|
|
68
|
+
<!-- No need to copy through the DTD's default value "1" of the attribute -->
|
|
69
|
+
<xsl:if test="number(.) != 1">
|
|
70
|
+
<xsl:attribute name="{local-name(.)}">
|
|
71
|
+
<xsl:value-of select="."/>
|
|
72
|
+
</xsl:attribute>
|
|
73
|
+
</xsl:if>
|
|
74
|
+
</xsl:template>
|
|
75
|
+
|
|
76
|
+
<!-- map floatstyle to HTML float values -->
|
|
77
|
+
<xsl:template match="@floatstyle" mode="htmlTableAtt">
|
|
78
|
+
<xsl:attribute name="style">
|
|
79
|
+
<xsl:text>float: </xsl:text>
|
|
80
|
+
<xsl:choose>
|
|
81
|
+
<xsl:when test="contains(., 'left')">left</xsl:when>
|
|
82
|
+
<xsl:when test="contains(., 'right')">right</xsl:when>
|
|
83
|
+
<xsl:when test="contains(., 'start')">
|
|
84
|
+
<xsl:value-of select="$direction.align.start"/>
|
|
85
|
+
</xsl:when>
|
|
86
|
+
<xsl:when test="contains(., 'end')">
|
|
87
|
+
<xsl:value-of select="$direction.align.end"/>
|
|
88
|
+
</xsl:when>
|
|
89
|
+
<xsl:when test="contains(., 'inside')">
|
|
90
|
+
<xsl:value-of select="$direction.align.start"/>
|
|
91
|
+
</xsl:when>
|
|
92
|
+
<xsl:when test="contains(., 'outside')">
|
|
93
|
+
<xsl:value-of select="$direction.align.end"/>
|
|
94
|
+
</xsl:when>
|
|
95
|
+
<xsl:when test="contains(., 'before')">none</xsl:when>
|
|
96
|
+
<xsl:when test="contains(., 'none')">none</xsl:when>
|
|
97
|
+
</xsl:choose>
|
|
98
|
+
<xsl:text>;</xsl:text>
|
|
99
|
+
</xsl:attribute>
|
|
100
|
+
</xsl:template>
|
|
101
|
+
|
|
102
|
+
</xsl:stylesheet>
|
data/xsl/xhtml/index.xsl
ADDED
|
@@ -0,0 +1,264 @@
|
|
|
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: index.xsl 9811 2013-09-20 11:04:58Z mzjn $
|
|
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:index">
|
|
21
|
+
<!-- some implementations use completely empty index tags to indicate -->
|
|
22
|
+
<!-- where an automatically generated index should be inserted. so -->
|
|
23
|
+
<!-- if the index is completely empty, skip it. Unless generate.index -->
|
|
24
|
+
<!-- is non-zero, in which case, this is where the automatically -->
|
|
25
|
+
<!-- generated index should go. -->
|
|
26
|
+
|
|
27
|
+
<xsl:call-template name="id.warning"/>
|
|
28
|
+
|
|
29
|
+
<xsl:if test="count(*)>0 or $generate.index != '0'">
|
|
30
|
+
<div>
|
|
31
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
32
|
+
<xsl:call-template name="id.attribute">
|
|
33
|
+
<xsl:with-param name="conditional" select="0"/>
|
|
34
|
+
</xsl:call-template>
|
|
35
|
+
|
|
36
|
+
<xsl:call-template name="index.titlepage"/>
|
|
37
|
+
<xsl:choose>
|
|
38
|
+
<xsl:when test="d:indexdiv">
|
|
39
|
+
<xsl:apply-templates/>
|
|
40
|
+
</xsl:when>
|
|
41
|
+
<xsl:otherwise>
|
|
42
|
+
<xsl:apply-templates select="*[not(self::d:indexentry)]"/>
|
|
43
|
+
<!-- Because it's actually valid for Index to have neither any -->
|
|
44
|
+
<!-- Indexdivs nor any Indexentries, we need to check and make -->
|
|
45
|
+
<!-- sure that at least one Indexentry exists, and generate a -->
|
|
46
|
+
<!-- wrapper dl if there is at least one; otherwise, do nothing. -->
|
|
47
|
+
<xsl:if test="d:indexentry">
|
|
48
|
+
<!-- The indexentry template assumes a parent dl wrapper has -->
|
|
49
|
+
<!-- been generated; for Indexes that have Indexdivs, the dl -->
|
|
50
|
+
<!-- wrapper is generated by the indexdiv template; however, -->
|
|
51
|
+
<!-- for Indexes that lack Indexdivs, if we don't generate a -->
|
|
52
|
+
<!-- dl here, HTML output will not be valid. -->
|
|
53
|
+
<dl>
|
|
54
|
+
<xsl:apply-templates select="d:indexentry"/>
|
|
55
|
+
</dl>
|
|
56
|
+
</xsl:if>
|
|
57
|
+
</xsl:otherwise>
|
|
58
|
+
</xsl:choose>
|
|
59
|
+
|
|
60
|
+
<xsl:if test="count(d:indexentry) = 0 and count(d:indexdiv) = 0">
|
|
61
|
+
<xsl:call-template name="generate-index">
|
|
62
|
+
<xsl:with-param name="scope" select="(ancestor::d:book|/)[last()]"/>
|
|
63
|
+
</xsl:call-template>
|
|
64
|
+
</xsl:if>
|
|
65
|
+
|
|
66
|
+
<xsl:if test="not(parent::d:article)">
|
|
67
|
+
<xsl:call-template name="process.footnotes"/>
|
|
68
|
+
</xsl:if>
|
|
69
|
+
</div>
|
|
70
|
+
</xsl:if>
|
|
71
|
+
</xsl:template>
|
|
72
|
+
|
|
73
|
+
<xsl:template match="d:setindex">
|
|
74
|
+
<!-- some implementations use completely empty index tags to indicate -->
|
|
75
|
+
<!-- where an automatically generated index should be inserted. so -->
|
|
76
|
+
<!-- if the index is completely empty, skip it. Unless generate.index -->
|
|
77
|
+
<!-- is non-zero, in which case, this is where the automatically -->
|
|
78
|
+
<!-- generated index should go. -->
|
|
79
|
+
|
|
80
|
+
<xsl:call-template name="id.warning"/>
|
|
81
|
+
|
|
82
|
+
<xsl:if test="count(*)>0 or $generate.index != '0'">
|
|
83
|
+
<div>
|
|
84
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
85
|
+
<xsl:call-template name="id.attribute">
|
|
86
|
+
<xsl:with-param name="conditional" select="0"/>
|
|
87
|
+
</xsl:call-template>
|
|
88
|
+
|
|
89
|
+
<xsl:call-template name="setindex.titlepage"/>
|
|
90
|
+
<xsl:apply-templates/>
|
|
91
|
+
|
|
92
|
+
<xsl:if test="count(d:indexentry) = 0 and count(d:indexdiv) = 0">
|
|
93
|
+
<xsl:call-template name="generate-index">
|
|
94
|
+
<xsl:with-param name="scope" select="/"/>
|
|
95
|
+
</xsl:call-template>
|
|
96
|
+
</xsl:if>
|
|
97
|
+
|
|
98
|
+
<xsl:if test="not(parent::d:article)">
|
|
99
|
+
<xsl:call-template name="process.footnotes"/>
|
|
100
|
+
</xsl:if>
|
|
101
|
+
</div>
|
|
102
|
+
</xsl:if>
|
|
103
|
+
</xsl:template>
|
|
104
|
+
|
|
105
|
+
<xsl:template match="d:index/d:indexinfo"/>
|
|
106
|
+
<xsl:template match="d:index/d:info"/>
|
|
107
|
+
<xsl:template match="d:index/d:title"/>
|
|
108
|
+
<xsl:template match="d:index/d:subtitle"/>
|
|
109
|
+
<xsl:template match="d:index/d:titleabbrev"/>
|
|
110
|
+
|
|
111
|
+
<!-- ==================================================================== -->
|
|
112
|
+
|
|
113
|
+
<xsl:template match="d:indexdiv">
|
|
114
|
+
<xsl:call-template name="id.warning"/>
|
|
115
|
+
|
|
116
|
+
<div>
|
|
117
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
118
|
+
<xsl:call-template name="id.attribute"/>
|
|
119
|
+
<xsl:call-template name="anchor"/>
|
|
120
|
+
<xsl:apply-templates select="*[not(self::d:indexentry)]"/>
|
|
121
|
+
<dl>
|
|
122
|
+
<xsl:apply-templates select="d:indexentry"/>
|
|
123
|
+
</dl>
|
|
124
|
+
</div>
|
|
125
|
+
</xsl:template>
|
|
126
|
+
|
|
127
|
+
<xsl:template match="d:indexdiv/d:title">
|
|
128
|
+
<h3>
|
|
129
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
130
|
+
<xsl:apply-templates/>
|
|
131
|
+
</h3>
|
|
132
|
+
</xsl:template>
|
|
133
|
+
|
|
134
|
+
<xsl:template match="d:indexdiv/d:subtitle">
|
|
135
|
+
<h4>
|
|
136
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
137
|
+
<xsl:apply-templates/>
|
|
138
|
+
</h4>
|
|
139
|
+
</xsl:template>
|
|
140
|
+
|
|
141
|
+
<!-- ==================================================================== -->
|
|
142
|
+
|
|
143
|
+
<xsl:template match="d:indexterm">
|
|
144
|
+
<!-- this one must have a name, even if it doesn't have an ID -->
|
|
145
|
+
<xsl:variable name="id">
|
|
146
|
+
<xsl:call-template name="object.id"/>
|
|
147
|
+
</xsl:variable>
|
|
148
|
+
|
|
149
|
+
<a id="{$id}" class="indexterm"/>
|
|
150
|
+
</xsl:template>
|
|
151
|
+
|
|
152
|
+
<xsl:template match="d:primary|d:secondary|d:tertiary|d:see|d:seealso">
|
|
153
|
+
</xsl:template>
|
|
154
|
+
|
|
155
|
+
<!-- ==================================================================== -->
|
|
156
|
+
|
|
157
|
+
<xsl:template match="d:indexentry">
|
|
158
|
+
<xsl:apply-templates select="d:primaryie"/>
|
|
159
|
+
</xsl:template>
|
|
160
|
+
|
|
161
|
+
<xsl:template match="d:primaryie">
|
|
162
|
+
<dt>
|
|
163
|
+
<xsl:apply-templates/>
|
|
164
|
+
</dt>
|
|
165
|
+
<dd>
|
|
166
|
+
<xsl:apply-templates select="following-sibling::d:seeie [not(preceding-sibling::d:secondaryie)]" mode="indexentry"/>
|
|
167
|
+
<xsl:apply-templates select="following-sibling::d:seealsoie [not(preceding-sibling::d:secondaryie)]" mode="indexentry"/>
|
|
168
|
+
<xsl:apply-templates select="following-sibling::d:secondaryie" mode="indexentry"/>
|
|
169
|
+
</dd>
|
|
170
|
+
</xsl:template>
|
|
171
|
+
|
|
172
|
+
<!-- Handled in mode to convert flat list to structured output -->
|
|
173
|
+
<xsl:template match="d:secondaryie">
|
|
174
|
+
</xsl:template>
|
|
175
|
+
<xsl:template match="d:tertiaryie">
|
|
176
|
+
</xsl:template>
|
|
177
|
+
<xsl:template match="d:seeie|d:seealsoie">
|
|
178
|
+
</xsl:template>
|
|
179
|
+
|
|
180
|
+
<xsl:template match="d:secondaryie" mode="indexentry">
|
|
181
|
+
<dl>
|
|
182
|
+
<dt>
|
|
183
|
+
<xsl:apply-templates/>
|
|
184
|
+
</dt>
|
|
185
|
+
<dd>
|
|
186
|
+
<!-- select following see* elements up to next secondaryie or tertiary or end -->
|
|
187
|
+
<xsl:variable name="after.this" select="following-sibling::*"/>
|
|
188
|
+
<xsl:variable name="next.entry" select="(following-sibling::d:secondaryie|following-sibling::d:tertiaryie)[1]"/>
|
|
189
|
+
<xsl:variable name="before.entry" select="$next.entry/preceding-sibling::*"/>
|
|
190
|
+
<xsl:variable name="see.intersection" select="$after.this[count(.|$before.entry) = count($before.entry)] [self::d:seeie or self::d:seealsoie]"/>
|
|
191
|
+
<xsl:choose>
|
|
192
|
+
<xsl:when test="count($see.intersection) != 0">
|
|
193
|
+
<xsl:apply-templates select="$see.intersection" mode="indexentry"/>
|
|
194
|
+
</xsl:when>
|
|
195
|
+
<xsl:when test="count($next.entry) = 0">
|
|
196
|
+
<xsl:apply-templates select="following-sibling::d:seeie" mode="indexentry"/>
|
|
197
|
+
<xsl:apply-templates select="following-sibling::d:seealsoie" mode="indexentry"/>
|
|
198
|
+
</xsl:when>
|
|
199
|
+
</xsl:choose>
|
|
200
|
+
|
|
201
|
+
<!-- now process any tertiaryie before the next secondaryie -->
|
|
202
|
+
<xsl:variable name="before.next.secondary" select="following-sibling::d:secondaryie[1]/preceding-sibling::*"/>
|
|
203
|
+
<xsl:variable name="tertiary.intersection" select="$after.this[count(.|$before.next.secondary) = count($before.next.secondary)] [not(self::d:seeie) and not(self::d:seealsoie)]"/>
|
|
204
|
+
<xsl:choose>
|
|
205
|
+
<xsl:when test="count($tertiary.intersection) != 0">
|
|
206
|
+
<xsl:apply-templates select="$tertiary.intersection" mode="indexentry"/>
|
|
207
|
+
</xsl:when>
|
|
208
|
+
<xsl:when test="not(following-sibling::d:secondaryie)">
|
|
209
|
+
<xsl:apply-templates select="following-sibling::d:tertiaryie" mode="indexentry"/>
|
|
210
|
+
</xsl:when>
|
|
211
|
+
</xsl:choose>
|
|
212
|
+
</dd>
|
|
213
|
+
</dl>
|
|
214
|
+
</xsl:template>
|
|
215
|
+
|
|
216
|
+
<xsl:template match="d:tertiaryie" mode="indexentry">
|
|
217
|
+
<dl>
|
|
218
|
+
<dt>
|
|
219
|
+
<xsl:apply-templates/>
|
|
220
|
+
</dt>
|
|
221
|
+
<dd>
|
|
222
|
+
<!-- select following see* elements up to next secondaryie or tertiary or end -->
|
|
223
|
+
<xsl:variable name="after.this" select="following-sibling::*"/>
|
|
224
|
+
<xsl:variable name="next.entry" select="(following-sibling::d:secondaryie|following-sibling::d:tertiaryie)[1]"/>
|
|
225
|
+
<xsl:variable name="before.entry" select="$next.entry/preceding-sibling::*"/>
|
|
226
|
+
<xsl:variable name="see.intersection" select="$after.this[count(.|$before.entry) = count($before.entry)] [self::d:seeie or self::d:seealsoie]"/>
|
|
227
|
+
<xsl:choose>
|
|
228
|
+
<xsl:when test="count($see.intersection) != 0">
|
|
229
|
+
<xsl:apply-templates select="$see.intersection" mode="indexentry"/>
|
|
230
|
+
</xsl:when>
|
|
231
|
+
<xsl:when test="count($next.entry) = 0">
|
|
232
|
+
<xsl:apply-templates select="following-sibling::d:seeie" mode="indexentry"/>
|
|
233
|
+
<xsl:apply-templates select="following-sibling::d:seealsoie" mode="indexentry"/>
|
|
234
|
+
</xsl:when>
|
|
235
|
+
</xsl:choose>
|
|
236
|
+
</dd>
|
|
237
|
+
</dl>
|
|
238
|
+
</xsl:template>
|
|
239
|
+
|
|
240
|
+
<xsl:template match="d:seeie" mode="indexentry">
|
|
241
|
+
<dt>
|
|
242
|
+
<xsl:text>(</xsl:text>
|
|
243
|
+
<xsl:call-template name="gentext">
|
|
244
|
+
<xsl:with-param name="key" select="'see'"/>
|
|
245
|
+
</xsl:call-template>
|
|
246
|
+
<xsl:text> </xsl:text>
|
|
247
|
+
<xsl:apply-templates/>
|
|
248
|
+
<xsl:text>)</xsl:text>
|
|
249
|
+
</dt>
|
|
250
|
+
</xsl:template>
|
|
251
|
+
|
|
252
|
+
<xsl:template match="d:seealsoie" mode="indexentry">
|
|
253
|
+
<div>
|
|
254
|
+
<xsl:text>(</xsl:text>
|
|
255
|
+
<xsl:call-template name="gentext">
|
|
256
|
+
<xsl:with-param name="key" select="'seealso'"/>
|
|
257
|
+
</xsl:call-template>
|
|
258
|
+
<xsl:text> </xsl:text>
|
|
259
|
+
<xsl:apply-templates/>
|
|
260
|
+
<xsl:text>)</xsl:text>
|
|
261
|
+
</div>
|
|
262
|
+
</xsl:template>
|
|
263
|
+
|
|
264
|
+
</xsl:stylesheet>
|
data/xsl/xhtml/info.xsl
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
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: info.xsl 9297 2012-04-22 03:56: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
|
+
<!-- These templates define the "default behavior" for info
|
|
19
|
+
elements. Even if you don't process the *info wrappers,
|
|
20
|
+
some of these elements are needed because the elements are
|
|
21
|
+
processed from named templates that are called with modes.
|
|
22
|
+
Since modes aren't sticky, these rules apply.
|
|
23
|
+
(TODO: clarify this comment) -->
|
|
24
|
+
|
|
25
|
+
<!-- ==================================================================== -->
|
|
26
|
+
<!-- called from named templates in a given mode -->
|
|
27
|
+
|
|
28
|
+
<xsl:template match="d:corpauthor">
|
|
29
|
+
<span>
|
|
30
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
31
|
+
<xsl:call-template name="id.attribute"/>
|
|
32
|
+
<xsl:apply-templates/>
|
|
33
|
+
</span>
|
|
34
|
+
</xsl:template>
|
|
35
|
+
|
|
36
|
+
<!-- ==================================================================== -->
|
|
37
|
+
|
|
38
|
+
<xsl:template match="d:jobtitle">
|
|
39
|
+
<span>
|
|
40
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
41
|
+
<xsl:call-template name="id.attribute"/>
|
|
42
|
+
<xsl:apply-templates/>
|
|
43
|
+
</span>
|
|
44
|
+
</xsl:template>
|
|
45
|
+
|
|
46
|
+
<!-- ==================================================================== -->
|
|
47
|
+
|
|
48
|
+
</xsl:stylesheet>
|
|
@@ -0,0 +1,1508 @@
|
|
|
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:xlink="http://www.w3.org/1999/xlink" xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xlink suwl d" version="1.0">
|
|
6
|
+
|
|
7
|
+
<!-- ********************************************************************
|
|
8
|
+
$Id: inline.xsl 9851 2014-01-17 23:26:40Z 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
|
+
******************************************************************** -->
|
|
16
|
+
|
|
17
|
+
<xsl:key name="glossentries" match="d:glossentry" use="normalize-space(d:glossterm)"/>
|
|
18
|
+
<xsl:key name="glossentries" match="d:glossentry" use="normalize-space(d:glossterm/@baseform)"/>
|
|
19
|
+
|
|
20
|
+
<xsl:template name="simple.xlink">
|
|
21
|
+
<xsl:param name="node" select="."/>
|
|
22
|
+
<xsl:param name="content">
|
|
23
|
+
<xsl:apply-templates/>
|
|
24
|
+
</xsl:param>
|
|
25
|
+
<xsl:param name="linkend" select="$node/@linkend"/>
|
|
26
|
+
<xsl:param name="xhref" select="$node/@xlink:href"/>
|
|
27
|
+
|
|
28
|
+
<!-- check for nested links, which are undefined in the output -->
|
|
29
|
+
<xsl:if test="$node/ancestor::*[@xlink:href or @linkend]">
|
|
30
|
+
<xsl:message>
|
|
31
|
+
<xsl:text>WARNING: nested link may be undefined in output: </xsl:text>
|
|
32
|
+
<xsl:text><</xsl:text>
|
|
33
|
+
<xsl:value-of select="name($node)"/>
|
|
34
|
+
<xsl:text> </xsl:text>
|
|
35
|
+
<xsl:choose>
|
|
36
|
+
<xsl:when test="$linkend">
|
|
37
|
+
<xsl:text>@linkend = '</xsl:text>
|
|
38
|
+
<xsl:value-of select="$linkend"/>
|
|
39
|
+
<xsl:text>'.</xsl:text>
|
|
40
|
+
</xsl:when>
|
|
41
|
+
<xsl:when test="$xhref">
|
|
42
|
+
<xsl:text>@xlink:href = '</xsl:text>
|
|
43
|
+
<xsl:value-of select="$xhref"/>
|
|
44
|
+
<xsl:text>'.</xsl:text>
|
|
45
|
+
</xsl:when>
|
|
46
|
+
</xsl:choose>
|
|
47
|
+
</xsl:message>
|
|
48
|
+
</xsl:if>
|
|
49
|
+
|
|
50
|
+
<!-- Support for @xlink:show -->
|
|
51
|
+
<xsl:variable name="target.show">
|
|
52
|
+
<xsl:choose>
|
|
53
|
+
<xsl:when test="$node/@xlink:show = 'new'">_blank</xsl:when>
|
|
54
|
+
<xsl:when test="$node/@xlink:show = 'replace'">_top</xsl:when>
|
|
55
|
+
<xsl:otherwise/>
|
|
56
|
+
</xsl:choose>
|
|
57
|
+
</xsl:variable>
|
|
58
|
+
|
|
59
|
+
<xsl:variable name="link">
|
|
60
|
+
<xsl:choose>
|
|
61
|
+
<xsl:when test="$xhref and (not($node/@xlink:type) or $node/@xlink:type='simple')">
|
|
62
|
+
|
|
63
|
+
<!-- Is it a local idref or a uri? -->
|
|
64
|
+
<xsl:variable name="is.idref">
|
|
65
|
+
<xsl:choose>
|
|
66
|
+
<!-- if the href starts with # and does not contain an "(" -->
|
|
67
|
+
<!-- or if the href starts with #xpointer(id(, it's just an ID -->
|
|
68
|
+
<xsl:when test="starts-with($xhref,'#') and (not(contains($xhref,'(')) or starts-with($xhref, '#xpointer(id('))">1</xsl:when>
|
|
69
|
+
<xsl:otherwise>0</xsl:otherwise>
|
|
70
|
+
</xsl:choose>
|
|
71
|
+
</xsl:variable>
|
|
72
|
+
|
|
73
|
+
<!-- Is it an olink ? -->
|
|
74
|
+
<xsl:variable name="is.olink">
|
|
75
|
+
<xsl:choose>
|
|
76
|
+
<!-- If xlink:role="http://docbook.org/xlink/role/olink" -->
|
|
77
|
+
<!-- and if the href contains # -->
|
|
78
|
+
<xsl:when test="contains($xhref,'#') and @xlink:role = $xolink.role">1</xsl:when>
|
|
79
|
+
<xsl:otherwise>0</xsl:otherwise>
|
|
80
|
+
</xsl:choose>
|
|
81
|
+
</xsl:variable>
|
|
82
|
+
|
|
83
|
+
<xsl:choose>
|
|
84
|
+
<xsl:when test="$is.olink = 1">
|
|
85
|
+
<xsl:call-template name="olink">
|
|
86
|
+
<xsl:with-param name="content" select="$content"/>
|
|
87
|
+
</xsl:call-template>
|
|
88
|
+
</xsl:when>
|
|
89
|
+
|
|
90
|
+
<xsl:when test="$is.idref = 1">
|
|
91
|
+
|
|
92
|
+
<xsl:variable name="idref">
|
|
93
|
+
<xsl:call-template name="xpointer.idref">
|
|
94
|
+
<xsl:with-param name="xpointer" select="$xhref"/>
|
|
95
|
+
</xsl:call-template>
|
|
96
|
+
</xsl:variable>
|
|
97
|
+
|
|
98
|
+
<xsl:variable name="targets" select="key('id',$idref)"/>
|
|
99
|
+
<xsl:variable name="target" select="$targets[1]"/>
|
|
100
|
+
|
|
101
|
+
<xsl:call-template name="check.id.unique">
|
|
102
|
+
<xsl:with-param name="linkend" select="$idref"/>
|
|
103
|
+
</xsl:call-template>
|
|
104
|
+
|
|
105
|
+
<xsl:choose>
|
|
106
|
+
<xsl:when test="count($target) = 0">
|
|
107
|
+
<xsl:message>
|
|
108
|
+
<xsl:text>XLink to nonexistent id: </xsl:text>
|
|
109
|
+
<xsl:value-of select="$idref"/>
|
|
110
|
+
</xsl:message>
|
|
111
|
+
<xsl:copy-of select="$content"/>
|
|
112
|
+
</xsl:when>
|
|
113
|
+
|
|
114
|
+
<xsl:otherwise>
|
|
115
|
+
<a>
|
|
116
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
117
|
+
<xsl:call-template name="id.attribute"/>
|
|
118
|
+
|
|
119
|
+
<xsl:attribute name="href">
|
|
120
|
+
<xsl:call-template name="href.target">
|
|
121
|
+
<xsl:with-param name="object" select="$target"/>
|
|
122
|
+
</xsl:call-template>
|
|
123
|
+
</xsl:attribute>
|
|
124
|
+
|
|
125
|
+
<xsl:choose>
|
|
126
|
+
<xsl:when test="$node/@xlink:title">
|
|
127
|
+
<xsl:attribute name="title">
|
|
128
|
+
<xsl:value-of select="$node/@xlink:title"/>
|
|
129
|
+
</xsl:attribute>
|
|
130
|
+
</xsl:when>
|
|
131
|
+
<xsl:otherwise>
|
|
132
|
+
<xsl:apply-templates select="$target" mode="html.title.attribute"/>
|
|
133
|
+
</xsl:otherwise>
|
|
134
|
+
</xsl:choose>
|
|
135
|
+
|
|
136
|
+
<xsl:if test="$target.show !=''">
|
|
137
|
+
<xsl:attribute name="target">
|
|
138
|
+
<xsl:value-of select="$target.show"/>
|
|
139
|
+
</xsl:attribute>
|
|
140
|
+
</xsl:if>
|
|
141
|
+
|
|
142
|
+
<xsl:copy-of select="$content"/>
|
|
143
|
+
|
|
144
|
+
</a>
|
|
145
|
+
</xsl:otherwise>
|
|
146
|
+
</xsl:choose>
|
|
147
|
+
</xsl:when>
|
|
148
|
+
|
|
149
|
+
<!-- otherwise it's a URI -->
|
|
150
|
+
<xsl:otherwise>
|
|
151
|
+
<a>
|
|
152
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
153
|
+
<xsl:call-template name="id.attribute"/>
|
|
154
|
+
<xsl:attribute name="href">
|
|
155
|
+
<xsl:value-of select="$xhref"/>
|
|
156
|
+
</xsl:attribute>
|
|
157
|
+
<xsl:if test="$node/@xlink:title">
|
|
158
|
+
<xsl:attribute name="title">
|
|
159
|
+
<xsl:value-of select="$node/@xlink:title"/>
|
|
160
|
+
</xsl:attribute>
|
|
161
|
+
</xsl:if>
|
|
162
|
+
|
|
163
|
+
<!-- For URIs, use @xlink:show if defined, otherwise use ulink.target -->
|
|
164
|
+
<xsl:choose>
|
|
165
|
+
<xsl:when test="$target.show !=''">
|
|
166
|
+
<xsl:attribute name="target">
|
|
167
|
+
<xsl:value-of select="$target.show"/>
|
|
168
|
+
</xsl:attribute>
|
|
169
|
+
</xsl:when>
|
|
170
|
+
<xsl:when test="$ulink.target !=''">
|
|
171
|
+
<xsl:attribute name="target">
|
|
172
|
+
<xsl:value-of select="$ulink.target"/>
|
|
173
|
+
</xsl:attribute>
|
|
174
|
+
</xsl:when>
|
|
175
|
+
</xsl:choose>
|
|
176
|
+
|
|
177
|
+
<xsl:copy-of select="$content"/>
|
|
178
|
+
</a>
|
|
179
|
+
</xsl:otherwise>
|
|
180
|
+
</xsl:choose>
|
|
181
|
+
</xsl:when>
|
|
182
|
+
|
|
183
|
+
<xsl:when test="$linkend">
|
|
184
|
+
<xsl:variable name="targets" select="key('id',$linkend)"/>
|
|
185
|
+
<xsl:variable name="target" select="$targets[1]"/>
|
|
186
|
+
|
|
187
|
+
<xsl:call-template name="check.id.unique">
|
|
188
|
+
<xsl:with-param name="linkend" select="$linkend"/>
|
|
189
|
+
</xsl:call-template>
|
|
190
|
+
|
|
191
|
+
<a>
|
|
192
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
193
|
+
<xsl:call-template name="id.attribute"/>
|
|
194
|
+
<xsl:attribute name="href">
|
|
195
|
+
<xsl:call-template name="href.target">
|
|
196
|
+
<xsl:with-param name="object" select="$target"/>
|
|
197
|
+
</xsl:call-template>
|
|
198
|
+
</xsl:attribute>
|
|
199
|
+
|
|
200
|
+
<xsl:apply-templates select="$target" mode="html.title.attribute"/>
|
|
201
|
+
|
|
202
|
+
<xsl:copy-of select="$content"/>
|
|
203
|
+
|
|
204
|
+
</a>
|
|
205
|
+
</xsl:when>
|
|
206
|
+
<xsl:otherwise>
|
|
207
|
+
<xsl:copy-of select="$content"/>
|
|
208
|
+
</xsl:otherwise>
|
|
209
|
+
</xsl:choose>
|
|
210
|
+
</xsl:variable>
|
|
211
|
+
|
|
212
|
+
<xsl:choose>
|
|
213
|
+
<xsl:when test="function-available('suwl:unwrapLinks')">
|
|
214
|
+
<xsl:copy-of select="suwl:unwrapLinks($link)"/>
|
|
215
|
+
</xsl:when>
|
|
216
|
+
<xsl:otherwise>
|
|
217
|
+
<xsl:copy-of select="$link"/>
|
|
218
|
+
</xsl:otherwise>
|
|
219
|
+
</xsl:choose>
|
|
220
|
+
</xsl:template>
|
|
221
|
+
|
|
222
|
+
<xsl:template name="inline.charseq">
|
|
223
|
+
<xsl:param name="content">
|
|
224
|
+
<xsl:call-template name="anchor"/>
|
|
225
|
+
<xsl:call-template name="simple.xlink">
|
|
226
|
+
<xsl:with-param name="content">
|
|
227
|
+
<xsl:apply-templates/>
|
|
228
|
+
</xsl:with-param>
|
|
229
|
+
</xsl:call-template>
|
|
230
|
+
</xsl:param>
|
|
231
|
+
<!-- * if you want output from the inline.charseq template wrapped in -->
|
|
232
|
+
<!-- * something other than a Span, call the template with some value -->
|
|
233
|
+
<!-- * for the 'wrapper-name' param -->
|
|
234
|
+
<xsl:param name="wrapper-name">span</xsl:param>
|
|
235
|
+
<xsl:element name="{$wrapper-name}" namespace="http://www.w3.org/1999/xhtml">
|
|
236
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
237
|
+
<xsl:call-template name="id.attribute"/>
|
|
238
|
+
<xsl:call-template name="generate.html.title"/>
|
|
239
|
+
<xsl:copy-of select="$content"/>
|
|
240
|
+
<xsl:call-template name="apply-annotations"/>
|
|
241
|
+
</xsl:element>
|
|
242
|
+
</xsl:template>
|
|
243
|
+
|
|
244
|
+
<xsl:template name="inline.monoseq">
|
|
245
|
+
<xsl:param name="content">
|
|
246
|
+
<xsl:call-template name="anchor"/>
|
|
247
|
+
<xsl:call-template name="simple.xlink">
|
|
248
|
+
<xsl:with-param name="content">
|
|
249
|
+
<xsl:apply-templates/>
|
|
250
|
+
</xsl:with-param>
|
|
251
|
+
</xsl:call-template>
|
|
252
|
+
</xsl:param>
|
|
253
|
+
<code>
|
|
254
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
255
|
+
<xsl:call-template name="id.attribute"/>
|
|
256
|
+
<xsl:copy-of select="$content"/>
|
|
257
|
+
<xsl:call-template name="apply-annotations"/>
|
|
258
|
+
</code>
|
|
259
|
+
</xsl:template>
|
|
260
|
+
|
|
261
|
+
<xsl:template name="inline.boldseq">
|
|
262
|
+
<xsl:param name="content">
|
|
263
|
+
<xsl:call-template name="anchor"/>
|
|
264
|
+
<xsl:call-template name="simple.xlink">
|
|
265
|
+
<xsl:with-param name="content">
|
|
266
|
+
<xsl:apply-templates/>
|
|
267
|
+
</xsl:with-param>
|
|
268
|
+
</xsl:call-template>
|
|
269
|
+
</xsl:param>
|
|
270
|
+
|
|
271
|
+
<span>
|
|
272
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
273
|
+
<xsl:call-template name="id.attribute"/>
|
|
274
|
+
|
|
275
|
+
<!-- don't put <strong> inside figure, example, or table titles -->
|
|
276
|
+
<xsl:choose>
|
|
277
|
+
<xsl:when test="local-name(..) = 'title' and (local-name(../..) = 'figure' or local-name(../..) = 'example' or local-name(../..) = 'table')">
|
|
278
|
+
<xsl:copy-of select="$content"/>
|
|
279
|
+
</xsl:when>
|
|
280
|
+
<xsl:otherwise>
|
|
281
|
+
<strong>
|
|
282
|
+
<xsl:copy-of select="$content"/>
|
|
283
|
+
</strong>
|
|
284
|
+
</xsl:otherwise>
|
|
285
|
+
</xsl:choose>
|
|
286
|
+
<xsl:call-template name="apply-annotations"/>
|
|
287
|
+
</span>
|
|
288
|
+
</xsl:template>
|
|
289
|
+
|
|
290
|
+
<xsl:template name="inline.italicseq">
|
|
291
|
+
<xsl:param name="content">
|
|
292
|
+
<xsl:call-template name="anchor"/>
|
|
293
|
+
<xsl:call-template name="simple.xlink">
|
|
294
|
+
<xsl:with-param name="content">
|
|
295
|
+
<xsl:apply-templates/>
|
|
296
|
+
</xsl:with-param>
|
|
297
|
+
</xsl:call-template>
|
|
298
|
+
</xsl:param>
|
|
299
|
+
<em>
|
|
300
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
301
|
+
<xsl:call-template name="id.attribute"/>
|
|
302
|
+
<xsl:copy-of select="$content"/>
|
|
303
|
+
<xsl:call-template name="apply-annotations"/>
|
|
304
|
+
</em>
|
|
305
|
+
</xsl:template>
|
|
306
|
+
|
|
307
|
+
<xsl:template name="inline.boldmonoseq">
|
|
308
|
+
<xsl:param name="content">
|
|
309
|
+
<xsl:call-template name="anchor"/>
|
|
310
|
+
<xsl:call-template name="simple.xlink">
|
|
311
|
+
<xsl:with-param name="content">
|
|
312
|
+
<xsl:apply-templates/>
|
|
313
|
+
</xsl:with-param>
|
|
314
|
+
</xsl:call-template>
|
|
315
|
+
</xsl:param>
|
|
316
|
+
<!-- don't put <strong> inside figure, example, or table titles -->
|
|
317
|
+
<!-- or other titles that may already be represented with <strong>'s. -->
|
|
318
|
+
<xsl:choose>
|
|
319
|
+
<xsl:when test="local-name(..) = 'title' and (local-name(../..) = 'figure' or local-name(../..) = 'example' or local-name(../..) = 'table' or local-name(../..) = 'formalpara')">
|
|
320
|
+
<code>
|
|
321
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
322
|
+
<xsl:call-template name="id.attribute"/>
|
|
323
|
+
<xsl:copy-of select="$content"/>
|
|
324
|
+
<xsl:call-template name="apply-annotations"/>
|
|
325
|
+
</code>
|
|
326
|
+
</xsl:when>
|
|
327
|
+
<xsl:otherwise>
|
|
328
|
+
<strong>
|
|
329
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
330
|
+
<xsl:call-template name="id.attribute"/>
|
|
331
|
+
<code>
|
|
332
|
+
<xsl:call-template name="generate.html.title"/>
|
|
333
|
+
<xsl:call-template name="dir"/>
|
|
334
|
+
<xsl:copy-of select="$content"/>
|
|
335
|
+
</code>
|
|
336
|
+
<xsl:call-template name="apply-annotations"/>
|
|
337
|
+
</strong>
|
|
338
|
+
</xsl:otherwise>
|
|
339
|
+
</xsl:choose>
|
|
340
|
+
</xsl:template>
|
|
341
|
+
|
|
342
|
+
<xsl:template name="inline.italicmonoseq">
|
|
343
|
+
<xsl:param name="content">
|
|
344
|
+
<xsl:call-template name="anchor"/>
|
|
345
|
+
<xsl:call-template name="simple.xlink">
|
|
346
|
+
<xsl:with-param name="content">
|
|
347
|
+
<xsl:apply-templates/>
|
|
348
|
+
</xsl:with-param>
|
|
349
|
+
</xsl:call-template>
|
|
350
|
+
</xsl:param>
|
|
351
|
+
<em>
|
|
352
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
353
|
+
<xsl:call-template name="id.attribute"/>
|
|
354
|
+
<code>
|
|
355
|
+
<xsl:call-template name="generate.html.title"/>
|
|
356
|
+
<xsl:call-template name="dir"/>
|
|
357
|
+
<xsl:copy-of select="$content"/>
|
|
358
|
+
<xsl:call-template name="apply-annotations"/>
|
|
359
|
+
</code>
|
|
360
|
+
</em>
|
|
361
|
+
</xsl:template>
|
|
362
|
+
|
|
363
|
+
<xsl:template name="inline.superscriptseq">
|
|
364
|
+
<xsl:param name="content">
|
|
365
|
+
<xsl:call-template name="anchor"/>
|
|
366
|
+
<xsl:call-template name="simple.xlink">
|
|
367
|
+
<xsl:with-param name="content">
|
|
368
|
+
<xsl:apply-templates/>
|
|
369
|
+
</xsl:with-param>
|
|
370
|
+
</xsl:call-template>
|
|
371
|
+
</xsl:param>
|
|
372
|
+
<sup>
|
|
373
|
+
<xsl:call-template name="generate.html.title"/>
|
|
374
|
+
<xsl:call-template name="id.attribute"/>
|
|
375
|
+
<xsl:call-template name="dir"/>
|
|
376
|
+
<xsl:copy-of select="$content"/>
|
|
377
|
+
<xsl:call-template name="apply-annotations"/>
|
|
378
|
+
</sup>
|
|
379
|
+
</xsl:template>
|
|
380
|
+
|
|
381
|
+
<xsl:template name="inline.subscriptseq">
|
|
382
|
+
<xsl:param name="content">
|
|
383
|
+
<xsl:call-template name="anchor"/>
|
|
384
|
+
<xsl:call-template name="simple.xlink">
|
|
385
|
+
<xsl:with-param name="content">
|
|
386
|
+
<xsl:apply-templates/>
|
|
387
|
+
</xsl:with-param>
|
|
388
|
+
</xsl:call-template>
|
|
389
|
+
</xsl:param>
|
|
390
|
+
<sub>
|
|
391
|
+
<xsl:call-template name="generate.html.title"/>
|
|
392
|
+
<xsl:call-template name="id.attribute"/>
|
|
393
|
+
<xsl:call-template name="dir"/>
|
|
394
|
+
<xsl:copy-of select="$content"/>
|
|
395
|
+
<xsl:call-template name="apply-annotations"/>
|
|
396
|
+
</sub>
|
|
397
|
+
</xsl:template>
|
|
398
|
+
|
|
399
|
+
<!-- ==================================================================== -->
|
|
400
|
+
<!-- some special cases -->
|
|
401
|
+
|
|
402
|
+
<xsl:template match="d:author">
|
|
403
|
+
<xsl:param name="content">
|
|
404
|
+
<xsl:call-template name="anchor"/>
|
|
405
|
+
<xsl:call-template name="simple.xlink">
|
|
406
|
+
<xsl:with-param name="content">
|
|
407
|
+
<xsl:call-template name="person.name"/>
|
|
408
|
+
</xsl:with-param>
|
|
409
|
+
</xsl:call-template>
|
|
410
|
+
<xsl:call-template name="apply-annotations"/>
|
|
411
|
+
</xsl:param>
|
|
412
|
+
|
|
413
|
+
<span>
|
|
414
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
415
|
+
<xsl:call-template name="id.attribute"/>
|
|
416
|
+
<xsl:copy-of select="$content"/>
|
|
417
|
+
</span>
|
|
418
|
+
</xsl:template>
|
|
419
|
+
|
|
420
|
+
<xsl:template match="d:editor">
|
|
421
|
+
<xsl:param name="content">
|
|
422
|
+
<xsl:call-template name="anchor"/>
|
|
423
|
+
<xsl:call-template name="simple.xlink">
|
|
424
|
+
<xsl:with-param name="content">
|
|
425
|
+
<xsl:call-template name="person.name"/>
|
|
426
|
+
</xsl:with-param>
|
|
427
|
+
</xsl:call-template>
|
|
428
|
+
<xsl:call-template name="apply-annotations"/>
|
|
429
|
+
</xsl:param>
|
|
430
|
+
|
|
431
|
+
<span>
|
|
432
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
433
|
+
<xsl:call-template name="id.attribute"/>
|
|
434
|
+
<xsl:copy-of select="$content"/>
|
|
435
|
+
</span>
|
|
436
|
+
</xsl:template>
|
|
437
|
+
|
|
438
|
+
<xsl:template match="d:othercredit">
|
|
439
|
+
<xsl:param name="content">
|
|
440
|
+
<xsl:call-template name="anchor"/>
|
|
441
|
+
<xsl:call-template name="simple.xlink">
|
|
442
|
+
<xsl:with-param name="content">
|
|
443
|
+
<xsl:call-template name="person.name"/>
|
|
444
|
+
</xsl:with-param>
|
|
445
|
+
</xsl:call-template>
|
|
446
|
+
<xsl:call-template name="apply-annotations"/>
|
|
447
|
+
</xsl:param>
|
|
448
|
+
|
|
449
|
+
<span>
|
|
450
|
+
<xsl:call-template name="common.html.attributes"/>
|
|
451
|
+
<xsl:call-template name="id.attribute"/>
|
|
452
|
+
<xsl:copy-of select="$content"/>
|
|
453
|
+
</span>
|
|
454
|
+
</xsl:template>
|
|
455
|
+
|
|
456
|
+
<xsl:template match="d:authorinitials">
|
|
457
|
+
<xsl:call-template name="inline.charseq"/>
|
|
458
|
+
</xsl:template>
|
|
459
|
+
|
|
460
|
+
<!-- ==================================================================== -->
|
|
461
|
+
|
|
462
|
+
<xsl:template match="d:accel">
|
|
463
|
+
<xsl:call-template name="inline.charseq"/>
|
|
464
|
+
</xsl:template>
|
|
465
|
+
|
|
466
|
+
<xsl:template match="d:action">
|
|
467
|
+
<xsl:call-template name="inline.charseq"/>
|
|
468
|
+
</xsl:template>
|
|
469
|
+
|
|
470
|
+
<xsl:template match="d:application">
|
|
471
|
+
<xsl:call-template name="inline.charseq"/>
|
|
472
|
+
</xsl:template>
|
|
473
|
+
|
|
474
|
+
<xsl:template match="d:classname">
|
|
475
|
+
<xsl:call-template name="inline.monoseq"/>
|
|
476
|
+
</xsl:template>
|
|
477
|
+
|
|
478
|
+
<xsl:template match="d:exceptionname">
|
|
479
|
+
<xsl:call-template name="inline.monoseq"/>
|
|
480
|
+
</xsl:template>
|
|
481
|
+
|
|
482
|
+
<xsl:template match="d:interfacename">
|
|
483
|
+
<xsl:call-template name="inline.monoseq"/>
|
|
484
|
+
</xsl:template>
|
|
485
|
+
|
|
486
|
+
<xsl:template match="d:methodname">
|
|
487
|
+
<xsl:call-template name="inline.monoseq"/>
|
|
488
|
+
</xsl:template>
|
|
489
|
+
|
|
490
|
+
<xsl:template match="d:command">
|
|
491
|
+
<xsl:call-template name="inline.boldseq"/>
|
|
492
|
+
</xsl:template>
|
|
493
|
+
|
|
494
|
+
<xsl:template match="d:computeroutput">
|
|
495
|
+
<xsl:call-template name="inline.monoseq"/>
|
|
496
|
+
</xsl:template>
|
|
497
|
+
|
|
498
|
+
<xsl:template match="d:constant">
|
|
499
|
+
<xsl:call-template name="inline.monoseq"/>
|
|
500
|
+
</xsl:template>
|
|
501
|
+
|
|
502
|
+
<xsl:template match="d:database">
|
|
503
|
+
<xsl:call-template name="inline.charseq"/>
|
|
504
|
+
</xsl:template>
|
|
505
|
+
|
|
506
|
+
<xsl:template match="d:date">
|
|
507
|
+
<!-- should this support locale-specific formatting? how? -->
|
|
508
|
+
<xsl:call-template name="inline.charseq"/>
|
|
509
|
+
</xsl:template>
|
|
510
|
+
|
|
511
|
+
<xsl:template match="d:errorcode">
|
|
512
|
+
<xsl:call-template name="inline.charseq"/>
|
|
513
|
+
</xsl:template>
|
|
514
|
+
|
|
515
|
+
<xsl:template match="d:errorname">
|
|
516
|
+
<xsl:call-template name="inline.charseq"/>
|
|
517
|
+
</xsl:template>
|
|
518
|
+
|
|
519
|
+
<xsl:template match="d:errortype">
|
|
520
|
+
<xsl:call-template name="inline.charseq"/>
|
|
521
|
+
</xsl:template>
|
|
522
|
+
|
|
523
|
+
<xsl:template match="d:errortext">
|
|
524
|
+
<xsl:call-template name="inline.charseq"/>
|
|
525
|
+
</xsl:template>
|
|
526
|
+
|
|
527
|
+
<xsl:template match="d:envar">
|
|
528
|
+
<xsl:call-template name="inline.monoseq"/>
|
|
529
|
+
</xsl:template>
|
|
530
|
+
|
|
531
|
+
<xsl:template match="d:filename">
|
|
532
|
+
<xsl:call-template name="inline.monoseq"/>
|
|
533
|
+
</xsl:template>
|
|
534
|
+
|
|
535
|
+
<xsl:template match="d:function">
|
|
536
|
+
<xsl:choose>
|
|
537
|
+
<xsl:when test="$function.parens != '0' and (d:parameter or d:function or d:replaceable)">
|
|
538
|
+
<xsl:variable name="nodes" select="text()|*"/>
|
|
539
|
+
<xsl:call-template name="inline.monoseq">
|
|
540
|
+
<xsl:with-param name="content">
|
|
541
|
+
<xsl:call-template name="simple.xlink">
|
|
542
|
+
<xsl:with-param name="content">
|
|
543
|
+
<xsl:apply-templates select="$nodes[1]"/>
|
|
544
|
+
</xsl:with-param>
|
|
545
|
+
</xsl:call-template>
|
|
546
|
+
</xsl:with-param>
|
|
547
|
+
</xsl:call-template>
|
|
548
|
+
<xsl:text>(</xsl:text>
|
|
549
|
+
<xsl:apply-templates select="$nodes[position()>1]"/>
|
|
550
|
+
<xsl:text>)</xsl:text>
|
|
551
|
+
</xsl:when>
|
|
552
|
+
<xsl:otherwise>
|
|
553
|
+
<xsl:call-template name="inline.monoseq"/>
|
|
554
|
+
</xsl:otherwise>
|
|
555
|
+
</xsl:choose>
|
|
556
|
+
</xsl:template>
|
|
557
|
+
|
|
558
|
+
<xsl:template match="d:function/d:parameter" priority="2">
|
|
559
|
+
<xsl:call-template name="inline.italicmonoseq"/>
|
|
560
|
+
<xsl:if test="$function.parens != 0 and following-sibling::*">
|
|
561
|
+
<xsl:text>, </xsl:text>
|
|
562
|
+
</xsl:if>
|
|
563
|
+
</xsl:template>
|
|
564
|
+
|
|
565
|
+
<xsl:template match="d:function/d:replaceable" priority="2">
|
|
566
|
+
<xsl:call-template name="inline.italicmonoseq"/>
|
|
567
|
+
<xsl:if test="$function.parens != 0 and following-sibling::*">
|
|
568
|
+
<xsl:text>, </xsl:text>
|
|
569
|
+
</xsl:if>
|
|
570
|
+
</xsl:template>
|
|
571
|
+
|
|
572
|
+
<xsl:template match="d:guibutton">
|
|
573
|
+
<xsl:call-template name="inline.charseq"/>
|
|
574
|
+
</xsl:template>
|
|
575
|
+
|
|
576
|
+
<xsl:template match="d:guiicon">
|
|
577
|
+
<xsl:call-template name="inline.charseq"/>
|
|
578
|
+
</xsl:template>
|
|
579
|
+
|
|
580
|
+
<xsl:template match="d:guilabel">
|
|
581
|
+
<xsl:call-template name="inline.charseq"/>
|
|
582
|
+
</xsl:template>
|
|
583
|
+
|
|
584
|
+
<xsl:template match="d:guimenu">
|
|
585
|
+
<xsl:call-template name="inline.charseq"/>
|
|
586
|
+
</xsl:template>
|
|
587
|
+
|
|
588
|
+
<xsl:template match="d:guimenuitem">
|
|
589
|
+
<xsl:call-template name="inline.charseq"/>
|
|
590
|
+
</xsl:template>
|
|
591
|
+
|
|
592
|
+
<xsl:template match="d:guisubmenu">
|
|
593
|
+
<xsl:call-template name="inline.charseq"/>
|
|
594
|
+
</xsl:template>
|
|
595
|
+
|
|
596
|
+
<xsl:template match="d:hardware">
|
|
597
|
+
<xsl:call-template name="inline.charseq"/>
|
|
598
|
+
</xsl:template>
|
|
599
|
+
|
|
600
|
+
<xsl:template match="d:interface">
|
|
601
|
+
<xsl:call-template name="inline.charseq"/>
|
|
602
|
+
</xsl:template>
|
|
603
|
+
|
|
604
|
+
<xsl:template match="d:interfacedefinition">
|
|
605
|
+
<xsl:call-template name="inline.charseq"/>
|
|
606
|
+
</xsl:template>
|
|
607
|
+
|
|
608
|
+
<xsl:template match="d:keycap">
|
|
609
|
+
<xsl:choose>
|
|
610
|
+
<xsl:when test="@function and normalize-space(.) = ''">
|
|
611
|
+
<xsl:call-template name="inline.boldseq">
|
|
612
|
+
<xsl:with-param name="content">
|
|
613
|
+
<xsl:call-template name="gentext.template">
|
|
614
|
+
<xsl:with-param name="context" select="'keycap'"/>
|
|
615
|
+
<xsl:with-param name="name" select="@function"/>
|
|
616
|
+
</xsl:call-template>
|
|
617
|
+
</xsl:with-param>
|
|
618
|
+
</xsl:call-template>
|
|
619
|
+
</xsl:when>
|
|
620
|
+
<xsl:otherwise>
|
|
621
|
+
<xsl:call-template name="inline.boldseq"/>
|
|
622
|
+
</xsl:otherwise>
|
|
623
|
+
</xsl:choose>
|
|
624
|
+
</xsl:template>
|
|
625
|
+
|
|
626
|
+
<xsl:template match="d:keycode">
|
|
627
|
+
<xsl:call-template name="inline.charseq"/>
|
|
628
|
+
</xsl:template>
|
|
629
|
+
|
|
630
|
+
<xsl:template match="d:keysym">
|
|
631
|
+
<xsl:call-template name="inline.charseq"/>
|
|
632
|
+
</xsl:template>
|
|
633
|
+
|
|
634
|
+
<xsl:template match="d:literal">
|
|
635
|
+
<xsl:call-template name="inline.monoseq"/>
|
|
636
|
+
</xsl:template>
|
|
637
|
+
|
|
638
|
+
<xsl:template match="d:code">
|
|
639
|
+
<xsl:call-template name="inline.monoseq"/>
|
|
640
|
+
</xsl:template>
|
|
641
|
+
|
|
642
|
+
<xsl:template match="d:medialabel">
|
|
643
|
+
<xsl:call-template name="inline.italicseq"/>
|
|
644
|
+
</xsl:template>
|
|
645
|
+
|
|
646
|
+
<xsl:template match="d:shortcut">
|
|
647
|
+
<xsl:call-template name="inline.boldseq"/>
|
|
648
|
+
</xsl:template>
|
|
649
|
+
|
|
650
|
+
<xsl:template match="d:mousebutton">
|
|
651
|
+
<xsl:call-template name="inline.charseq"/>
|
|
652
|
+
</xsl:template>
|
|
653
|
+
|
|
654
|
+
<xsl:template match="d:option">
|
|
655
|
+
<xsl:call-template name="inline.monoseq"/>
|
|
656
|
+
</xsl:template>
|
|
657
|
+
|
|
658
|
+
<xsl:template match="d:package">
|
|
659
|
+
<xsl:call-template name="inline.charseq"/>
|
|
660
|
+
</xsl:template>
|
|
661
|
+
|
|
662
|
+
<xsl:template match="d:parameter">
|
|
663
|
+
<xsl:call-template name="inline.italicmonoseq"/>
|
|
664
|
+
</xsl:template>
|
|
665
|
+
|
|
666
|
+
<xsl:template match="d:property">
|
|
667
|
+
<xsl:call-template name="inline.charseq"/>
|
|
668
|
+
</xsl:template>
|
|
669
|
+
|
|
670
|
+
<xsl:template match="d:prompt">
|
|
671
|
+
<xsl:call-template name="inline.monoseq"/>
|
|
672
|
+
</xsl:template>
|
|
673
|
+
|
|
674
|
+
<xsl:template match="d:replaceable" priority="1">
|
|
675
|
+
<xsl:call-template name="inline.italicmonoseq"/>
|
|
676
|
+
</xsl:template>
|
|
677
|
+
|
|
678
|
+
<xsl:template match="d:returnvalue">
|
|
679
|
+
<xsl:call-template name="inline.charseq"/>
|
|
680
|
+
</xsl:template>
|
|
681
|
+
|
|
682
|
+
<xsl:template match="d:structfield">
|
|
683
|
+
<xsl:call-template name="inline.italicmonoseq"/>
|
|
684
|
+
</xsl:template>
|
|
685
|
+
|
|
686
|
+
<xsl:template match="d:structname">
|
|
687
|
+
<xsl:call-template name="inline.charseq"/>
|
|
688
|
+
</xsl:template>
|
|
689
|
+
|
|
690
|
+
<xsl:template match="d:symbol">
|
|
691
|
+
<xsl:call-template name="inline.charseq"/>
|
|
692
|
+
</xsl:template>
|
|
693
|
+
|
|
694
|
+
<xsl:template match="d:systemitem">
|
|
695
|
+
<xsl:call-template name="inline.monoseq"/>
|
|
696
|
+
</xsl:template>
|
|
697
|
+
|
|
698
|
+
<xsl:template match="d:token">
|
|
699
|
+
<xsl:call-template name="inline.charseq"/>
|
|
700
|
+
</xsl:template>
|
|
701
|
+
|
|
702
|
+
<xsl:template match="d:type">
|
|
703
|
+
<xsl:call-template name="inline.charseq"/>
|
|
704
|
+
</xsl:template>
|
|
705
|
+
|
|
706
|
+
<xsl:template match="d:userinput">
|
|
707
|
+
<xsl:call-template name="inline.boldmonoseq"/>
|
|
708
|
+
</xsl:template>
|
|
709
|
+
|
|
710
|
+
<xsl:template match="d:abbrev">
|
|
711
|
+
<xsl:call-template name="inline.charseq">
|
|
712
|
+
<xsl:with-param name="wrapper-name">abbr</xsl:with-param>
|
|
713
|
+
</xsl:call-template>
|
|
714
|
+
</xsl:template>
|
|
715
|
+
|
|
716
|
+
<xsl:template match="d:acronym">
|
|
717
|
+
<xsl:call-template name="inline.charseq">
|
|
718
|
+
<xsl:with-param name="wrapper-name">acronym</xsl:with-param>
|
|
719
|
+
</xsl:call-template>
|
|
720
|
+
</xsl:template>
|
|
721
|
+
|
|
722
|
+
<xsl:template match="d:citerefentry">
|
|
723
|
+
<xsl:choose>
|
|
724
|
+
<xsl:when test="$citerefentry.link != '0'">
|
|
725
|
+
<a>
|
|
726
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
727
|
+
<xsl:attribute name="href">
|
|
728
|
+
<xsl:call-template name="generate.citerefentry.link"/>
|
|
729
|
+
</xsl:attribute>
|
|
730
|
+
<xsl:call-template name="inline.charseq"/>
|
|
731
|
+
</a>
|
|
732
|
+
</xsl:when>
|
|
733
|
+
<xsl:otherwise>
|
|
734
|
+
<xsl:call-template name="inline.charseq"/>
|
|
735
|
+
</xsl:otherwise>
|
|
736
|
+
</xsl:choose>
|
|
737
|
+
</xsl:template>
|
|
738
|
+
|
|
739
|
+
<xsl:template name="generate.citerefentry.link">
|
|
740
|
+
<!-- nop -->
|
|
741
|
+
</xsl:template>
|
|
742
|
+
|
|
743
|
+
<xsl:template name="x.generate.citerefentry.link">
|
|
744
|
+
<xsl:text>http://example.com/cgi-bin/man.cgi?</xsl:text>
|
|
745
|
+
<xsl:value-of select="d:refentrytitle"/>
|
|
746
|
+
<xsl:text>(</xsl:text>
|
|
747
|
+
<xsl:value-of select="d:manvolnum"/>
|
|
748
|
+
<xsl:text>)</xsl:text>
|
|
749
|
+
</xsl:template>
|
|
750
|
+
|
|
751
|
+
<xsl:template match="d:citetitle">
|
|
752
|
+
<xsl:choose>
|
|
753
|
+
<xsl:when test="@pubwork = 'article'">
|
|
754
|
+
<xsl:call-template name="gentext.startquote"/>
|
|
755
|
+
<xsl:call-template name="inline.charseq"/>
|
|
756
|
+
<xsl:call-template name="gentext.endquote"/>
|
|
757
|
+
</xsl:when>
|
|
758
|
+
<xsl:otherwise>
|
|
759
|
+
<xsl:call-template name="inline.italicseq"/>
|
|
760
|
+
</xsl:otherwise>
|
|
761
|
+
</xsl:choose>
|
|
762
|
+
</xsl:template>
|
|
763
|
+
|
|
764
|
+
<xsl:template match="d:emphasis">
|
|
765
|
+
<span>
|
|
766
|
+
<xsl:call-template name="id.attribute"/>
|
|
767
|
+
<xsl:choose>
|
|
768
|
+
<!-- We don't want empty @class values, so do not propagate empty @roles -->
|
|
769
|
+
<xsl:when test="@role and normalize-space(@role) != '' and $emphasis.propagates.style != 0">
|
|
770
|
+
<xsl:apply-templates select="." mode="common.html.attributes">
|
|
771
|
+
<xsl:with-param name="class" select="@role"/>
|
|
772
|
+
</xsl:apply-templates>
|
|
773
|
+
</xsl:when>
|
|
774
|
+
<xsl:otherwise>
|
|
775
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
776
|
+
</xsl:otherwise>
|
|
777
|
+
</xsl:choose>
|
|
778
|
+
<xsl:call-template name="anchor"/>
|
|
779
|
+
|
|
780
|
+
<xsl:call-template name="simple.xlink">
|
|
781
|
+
<xsl:with-param name="content">
|
|
782
|
+
<xsl:choose>
|
|
783
|
+
<xsl:when test="@role = 'bold' or @role='strong'">
|
|
784
|
+
<!-- backwards compatibility: make bold into b elements, but -->
|
|
785
|
+
<!-- don't put bold inside figure, example, or table titles -->
|
|
786
|
+
<xsl:choose>
|
|
787
|
+
<xsl:when test="local-name(..) = 'title' and (local-name(../..) = 'figure' or local-name(../..) = 'example' or local-name(../..) = 'table')">
|
|
788
|
+
<xsl:apply-templates/>
|
|
789
|
+
</xsl:when>
|
|
790
|
+
<xsl:otherwise>
|
|
791
|
+
<strong><xsl:apply-templates/></strong>
|
|
792
|
+
</xsl:otherwise>
|
|
793
|
+
</xsl:choose>
|
|
794
|
+
</xsl:when>
|
|
795
|
+
<xsl:when test="@role and $emphasis.propagates.style != 0">
|
|
796
|
+
<xsl:apply-templates/>
|
|
797
|
+
</xsl:when>
|
|
798
|
+
<xsl:otherwise>
|
|
799
|
+
<em><xsl:apply-templates/></em>
|
|
800
|
+
</xsl:otherwise>
|
|
801
|
+
</xsl:choose>
|
|
802
|
+
</xsl:with-param>
|
|
803
|
+
</xsl:call-template>
|
|
804
|
+
</span>
|
|
805
|
+
</xsl:template>
|
|
806
|
+
|
|
807
|
+
<xsl:template match="d:foreignphrase">
|
|
808
|
+
<span>
|
|
809
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
810
|
+
<xsl:call-template name="inline.italicseq"/>
|
|
811
|
+
</span>
|
|
812
|
+
</xsl:template>
|
|
813
|
+
|
|
814
|
+
<xsl:template match="d:markup">
|
|
815
|
+
<xsl:call-template name="inline.charseq"/>
|
|
816
|
+
</xsl:template>
|
|
817
|
+
|
|
818
|
+
<xsl:template match="d:phrase">
|
|
819
|
+
<span>
|
|
820
|
+
<xsl:call-template name="id.attribute"/>
|
|
821
|
+
<xsl:call-template name="locale.html.attributes"/>
|
|
822
|
+
<!-- We don't want empty @class values, so do not propagate empty @roles -->
|
|
823
|
+
<xsl:choose>
|
|
824
|
+
<xsl:when test="@role and normalize-space(@role) != '' and $phrase.propagates.style != 0">
|
|
825
|
+
<xsl:apply-templates select="." mode="class.attribute">
|
|
826
|
+
<xsl:with-param name="class" select="@role"/>
|
|
827
|
+
</xsl:apply-templates>
|
|
828
|
+
</xsl:when>
|
|
829
|
+
<xsl:otherwise>
|
|
830
|
+
<xsl:apply-templates select="." mode="class.attribute"/>
|
|
831
|
+
</xsl:otherwise>
|
|
832
|
+
</xsl:choose>
|
|
833
|
+
<xsl:call-template name="dir"/>
|
|
834
|
+
<xsl:call-template name="anchor"/>
|
|
835
|
+
<xsl:call-template name="simple.xlink">
|
|
836
|
+
<xsl:with-param name="content">
|
|
837
|
+
<xsl:apply-templates/>
|
|
838
|
+
</xsl:with-param>
|
|
839
|
+
</xsl:call-template>
|
|
840
|
+
<xsl:call-template name="apply-annotations"/>
|
|
841
|
+
</span>
|
|
842
|
+
</xsl:template>
|
|
843
|
+
|
|
844
|
+
<xsl:template match="d:quote">
|
|
845
|
+
<xsl:variable name="depth">
|
|
846
|
+
<xsl:call-template name="dot.count">
|
|
847
|
+
<xsl:with-param name="string">
|
|
848
|
+
<xsl:number level="multiple"/>
|
|
849
|
+
</xsl:with-param>
|
|
850
|
+
</xsl:call-template>
|
|
851
|
+
</xsl:variable>
|
|
852
|
+
<span>
|
|
853
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
854
|
+
<xsl:choose>
|
|
855
|
+
<xsl:when test="$depth mod 2 = 0">
|
|
856
|
+
<xsl:call-template name="gentext.startquote"/>
|
|
857
|
+
<xsl:call-template name="inline.charseq"/>
|
|
858
|
+
<xsl:call-template name="gentext.endquote"/>
|
|
859
|
+
</xsl:when>
|
|
860
|
+
<xsl:otherwise>
|
|
861
|
+
<xsl:call-template name="gentext.nestedstartquote"/>
|
|
862
|
+
<xsl:call-template name="inline.charseq"/>
|
|
863
|
+
<xsl:call-template name="gentext.nestedendquote"/>
|
|
864
|
+
</xsl:otherwise>
|
|
865
|
+
</xsl:choose>
|
|
866
|
+
</span>
|
|
867
|
+
</xsl:template>
|
|
868
|
+
|
|
869
|
+
<xsl:template match="d:varname">
|
|
870
|
+
<xsl:call-template name="inline.monoseq"/>
|
|
871
|
+
</xsl:template>
|
|
872
|
+
|
|
873
|
+
<xsl:template match="d:wordasword">
|
|
874
|
+
<xsl:call-template name="inline.italicseq"/>
|
|
875
|
+
</xsl:template>
|
|
876
|
+
|
|
877
|
+
<xsl:template match="d:lineannotation">
|
|
878
|
+
<em>
|
|
879
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
880
|
+
<xsl:call-template name="inline.charseq"/>
|
|
881
|
+
</em>
|
|
882
|
+
</xsl:template>
|
|
883
|
+
|
|
884
|
+
<xsl:template match="d:superscript">
|
|
885
|
+
<xsl:call-template name="inline.superscriptseq"/>
|
|
886
|
+
</xsl:template>
|
|
887
|
+
|
|
888
|
+
<xsl:template match="d:subscript">
|
|
889
|
+
<xsl:call-template name="inline.subscriptseq"/>
|
|
890
|
+
</xsl:template>
|
|
891
|
+
|
|
892
|
+
<xsl:template match="d:trademark">
|
|
893
|
+
<xsl:call-template name="inline.charseq"/>
|
|
894
|
+
<xsl:choose>
|
|
895
|
+
<xsl:when test="@class = 'copyright' or @class = 'registered'">
|
|
896
|
+
<xsl:call-template name="dingbat">
|
|
897
|
+
<xsl:with-param name="dingbat" select="@class"/>
|
|
898
|
+
</xsl:call-template>
|
|
899
|
+
</xsl:when>
|
|
900
|
+
<xsl:when test="@class = 'service'">
|
|
901
|
+
<sup>SM</sup>
|
|
902
|
+
</xsl:when>
|
|
903
|
+
<xsl:otherwise>
|
|
904
|
+
<xsl:call-template name="dingbat">
|
|
905
|
+
<xsl:with-param name="dingbat" select="'trademark'"/>
|
|
906
|
+
</xsl:call-template>
|
|
907
|
+
</xsl:otherwise>
|
|
908
|
+
</xsl:choose>
|
|
909
|
+
</xsl:template>
|
|
910
|
+
|
|
911
|
+
<xsl:template match="d:firstterm">
|
|
912
|
+
<xsl:call-template name="glossterm">
|
|
913
|
+
<xsl:with-param name="firstterm" select="1"/>
|
|
914
|
+
</xsl:call-template>
|
|
915
|
+
</xsl:template>
|
|
916
|
+
|
|
917
|
+
<xsl:template match="d:glossterm" name="glossterm">
|
|
918
|
+
<xsl:param name="firstterm" select="0"/>
|
|
919
|
+
|
|
920
|
+
<!-- To avoid extra <a name=""> anchor from inline.italicseq -->
|
|
921
|
+
<xsl:variable name="content">
|
|
922
|
+
<xsl:apply-templates/>
|
|
923
|
+
</xsl:variable>
|
|
924
|
+
|
|
925
|
+
<xsl:choose>
|
|
926
|
+
<xsl:when test="($firstterm.only.link = 0 or $firstterm = 1) and @linkend">
|
|
927
|
+
<xsl:variable name="targets" select="key('id',@linkend)"/>
|
|
928
|
+
<xsl:variable name="target" select="$targets[1]"/>
|
|
929
|
+
|
|
930
|
+
<xsl:call-template name="check.id.unique">
|
|
931
|
+
<xsl:with-param name="linkend" select="@linkend"/>
|
|
932
|
+
</xsl:call-template>
|
|
933
|
+
|
|
934
|
+
<xsl:choose>
|
|
935
|
+
<xsl:when test="$target">
|
|
936
|
+
<a>
|
|
937
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
938
|
+
|
|
939
|
+
<xsl:attribute name="href">
|
|
940
|
+
<xsl:call-template name="href.target">
|
|
941
|
+
<xsl:with-param name="object" select="$target"/>
|
|
942
|
+
</xsl:call-template>
|
|
943
|
+
</xsl:attribute>
|
|
944
|
+
|
|
945
|
+
<xsl:call-template name="inline.italicseq">
|
|
946
|
+
<xsl:with-param name="content" select="$content"/>
|
|
947
|
+
</xsl:call-template>
|
|
948
|
+
</a>
|
|
949
|
+
</xsl:when>
|
|
950
|
+
<xsl:otherwise>
|
|
951
|
+
<xsl:call-template name="inline.italicseq">
|
|
952
|
+
<xsl:with-param name="content" select="$content"/>
|
|
953
|
+
</xsl:call-template>
|
|
954
|
+
</xsl:otherwise>
|
|
955
|
+
</xsl:choose>
|
|
956
|
+
</xsl:when>
|
|
957
|
+
|
|
958
|
+
<xsl:when test="not(@linkend) and ($firstterm.only.link = 0 or $firstterm = 1) and ($glossterm.auto.link != 0) and $glossary.collection != ''">
|
|
959
|
+
<xsl:variable name="term">
|
|
960
|
+
<xsl:choose>
|
|
961
|
+
<xsl:when test="@baseform"><xsl:value-of select="@baseform"/></xsl:when>
|
|
962
|
+
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
|
963
|
+
</xsl:choose>
|
|
964
|
+
</xsl:variable>
|
|
965
|
+
|
|
966
|
+
<xsl:variable name="cterm" select="(document($glossary.collection,.)//d:glossentry[d:glossterm=$term])[1]"/>
|
|
967
|
+
|
|
968
|
+
<!-- HACK HACK HACK! But it works... -->
|
|
969
|
+
<!-- You'd need to do more work if you wanted to chunk on glossdiv, though -->
|
|
970
|
+
|
|
971
|
+
<xsl:variable name="glossary" select="//d:glossary[@role='auto']"/>
|
|
972
|
+
|
|
973
|
+
<xsl:if test="count($glossary) != 1">
|
|
974
|
+
<xsl:message>
|
|
975
|
+
<xsl:text>Warning: glossary.collection specified, but there are </xsl:text>
|
|
976
|
+
<xsl:value-of select="count($glossary)"/>
|
|
977
|
+
<xsl:text> automatic glossaries</xsl:text>
|
|
978
|
+
</xsl:message>
|
|
979
|
+
</xsl:if>
|
|
980
|
+
|
|
981
|
+
<xsl:variable name="glosschunk">
|
|
982
|
+
<xsl:call-template name="href.target">
|
|
983
|
+
<xsl:with-param name="object" select="$glossary"/>
|
|
984
|
+
</xsl:call-template>
|
|
985
|
+
</xsl:variable>
|
|
986
|
+
|
|
987
|
+
<xsl:variable name="chunkbase">
|
|
988
|
+
<xsl:choose>
|
|
989
|
+
<xsl:when test="contains($glosschunk, '#')">
|
|
990
|
+
<xsl:value-of select="substring-before($glosschunk, '#')"/>
|
|
991
|
+
</xsl:when>
|
|
992
|
+
<xsl:otherwise>
|
|
993
|
+
<xsl:value-of select="$glosschunk"/>
|
|
994
|
+
</xsl:otherwise>
|
|
995
|
+
</xsl:choose>
|
|
996
|
+
</xsl:variable>
|
|
997
|
+
|
|
998
|
+
<xsl:choose>
|
|
999
|
+
<xsl:when test="not($cterm)">
|
|
1000
|
+
<xsl:message>
|
|
1001
|
+
<xsl:text>There's no entry for </xsl:text>
|
|
1002
|
+
<xsl:value-of select="$term"/>
|
|
1003
|
+
<xsl:text> in </xsl:text>
|
|
1004
|
+
<xsl:value-of select="$glossary.collection"/>
|
|
1005
|
+
</xsl:message>
|
|
1006
|
+
<xsl:call-template name="inline.italicseq"/>
|
|
1007
|
+
</xsl:when>
|
|
1008
|
+
<xsl:otherwise>
|
|
1009
|
+
<xsl:variable name="id">
|
|
1010
|
+
<xsl:call-template name="object.id">
|
|
1011
|
+
<xsl:with-param name="object" select="$cterm"/>
|
|
1012
|
+
</xsl:call-template>
|
|
1013
|
+
</xsl:variable>
|
|
1014
|
+
<a href="{$chunkbase}#{$id}">
|
|
1015
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
1016
|
+
<xsl:call-template name="inline.italicseq">
|
|
1017
|
+
<xsl:with-param name="content" select="$content"/>
|
|
1018
|
+
</xsl:call-template>
|
|
1019
|
+
</a>
|
|
1020
|
+
</xsl:otherwise>
|
|
1021
|
+
</xsl:choose>
|
|
1022
|
+
</xsl:when>
|
|
1023
|
+
|
|
1024
|
+
<xsl:when test="not(@linkend) and ($firstterm.only.link = 0 or $firstterm = 1) and $glossterm.auto.link != 0">
|
|
1025
|
+
<xsl:variable name="term">
|
|
1026
|
+
<xsl:choose>
|
|
1027
|
+
<xsl:when test="@baseform">
|
|
1028
|
+
<xsl:value-of select="normalize-space(@baseform)"/>
|
|
1029
|
+
</xsl:when>
|
|
1030
|
+
<xsl:otherwise>
|
|
1031
|
+
<xsl:value-of select="normalize-space(.)"/>
|
|
1032
|
+
</xsl:otherwise>
|
|
1033
|
+
</xsl:choose>
|
|
1034
|
+
</xsl:variable>
|
|
1035
|
+
<xsl:variable name="targets" select="key('glossentries', $term)"/>
|
|
1036
|
+
<xsl:variable name="target" select="$targets[1]"/>
|
|
1037
|
+
|
|
1038
|
+
<xsl:choose>
|
|
1039
|
+
<xsl:when test="count($targets)=0">
|
|
1040
|
+
<xsl:message>
|
|
1041
|
+
<xsl:text>Error: no glossentry for glossterm: </xsl:text>
|
|
1042
|
+
<xsl:value-of select="."/>
|
|
1043
|
+
<xsl:text>.</xsl:text>
|
|
1044
|
+
</xsl:message>
|
|
1045
|
+
<xsl:call-template name="inline.italicseq"/>
|
|
1046
|
+
</xsl:when>
|
|
1047
|
+
<xsl:otherwise>
|
|
1048
|
+
<a>
|
|
1049
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
1050
|
+
<xsl:if test="@id or @xml:id">
|
|
1051
|
+
<xsl:attribute name="id">
|
|
1052
|
+
<xsl:value-of select="(@id|@xml:id)[1]"/>
|
|
1053
|
+
</xsl:attribute>
|
|
1054
|
+
</xsl:if>
|
|
1055
|
+
|
|
1056
|
+
<xsl:attribute name="href">
|
|
1057
|
+
<xsl:call-template name="href.target">
|
|
1058
|
+
<xsl:with-param name="object" select="$target"/>
|
|
1059
|
+
</xsl:call-template>
|
|
1060
|
+
</xsl:attribute>
|
|
1061
|
+
|
|
1062
|
+
<xsl:call-template name="inline.italicseq">
|
|
1063
|
+
<xsl:with-param name="content" select="$content"/>
|
|
1064
|
+
</xsl:call-template>
|
|
1065
|
+
</a>
|
|
1066
|
+
</xsl:otherwise>
|
|
1067
|
+
</xsl:choose>
|
|
1068
|
+
</xsl:when>
|
|
1069
|
+
|
|
1070
|
+
<xsl:otherwise>
|
|
1071
|
+
<xsl:call-template name="inline.italicseq"/>
|
|
1072
|
+
</xsl:otherwise>
|
|
1073
|
+
</xsl:choose>
|
|
1074
|
+
</xsl:template>
|
|
1075
|
+
|
|
1076
|
+
<xsl:template match="d:termdef">
|
|
1077
|
+
<span>
|
|
1078
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
1079
|
+
<xsl:call-template name="gentext.template">
|
|
1080
|
+
<xsl:with-param name="context" select="'termdef'"/>
|
|
1081
|
+
<xsl:with-param name="name" select="'prefix'"/>
|
|
1082
|
+
</xsl:call-template>
|
|
1083
|
+
<xsl:apply-templates/>
|
|
1084
|
+
<xsl:call-template name="gentext.template">
|
|
1085
|
+
<xsl:with-param name="context" select="'termdef'"/>
|
|
1086
|
+
<xsl:with-param name="name" select="'suffix'"/>
|
|
1087
|
+
</xsl:call-template>
|
|
1088
|
+
</span>
|
|
1089
|
+
</xsl:template>
|
|
1090
|
+
|
|
1091
|
+
<xsl:template match="d:sgmltag|d:tag">
|
|
1092
|
+
<xsl:call-template name="format.sgmltag"/>
|
|
1093
|
+
</xsl:template>
|
|
1094
|
+
|
|
1095
|
+
<xsl:template name="format.sgmltag">
|
|
1096
|
+
<xsl:param name="class">
|
|
1097
|
+
<xsl:choose>
|
|
1098
|
+
<xsl:when test="@class">
|
|
1099
|
+
<xsl:value-of select="@class"/>
|
|
1100
|
+
</xsl:when>
|
|
1101
|
+
<xsl:otherwise>element</xsl:otherwise>
|
|
1102
|
+
</xsl:choose>
|
|
1103
|
+
</xsl:param>
|
|
1104
|
+
|
|
1105
|
+
<xsl:variable name="content">
|
|
1106
|
+
<xsl:choose>
|
|
1107
|
+
<xsl:when test="$class='attribute'">
|
|
1108
|
+
<xsl:apply-templates/>
|
|
1109
|
+
</xsl:when>
|
|
1110
|
+
<xsl:when test="$class='attvalue'">
|
|
1111
|
+
<xsl:apply-templates/>
|
|
1112
|
+
</xsl:when>
|
|
1113
|
+
<xsl:when test="$class='element'">
|
|
1114
|
+
<xsl:apply-templates/>
|
|
1115
|
+
</xsl:when>
|
|
1116
|
+
<xsl:when test="$class='endtag'">
|
|
1117
|
+
<xsl:text></</xsl:text>
|
|
1118
|
+
<xsl:apply-templates/>
|
|
1119
|
+
<xsl:text>></xsl:text>
|
|
1120
|
+
</xsl:when>
|
|
1121
|
+
<xsl:when test="$class='genentity'">
|
|
1122
|
+
<xsl:text>&</xsl:text>
|
|
1123
|
+
<xsl:apply-templates/>
|
|
1124
|
+
<xsl:text>;</xsl:text>
|
|
1125
|
+
</xsl:when>
|
|
1126
|
+
<xsl:when test="$class='numcharref'">
|
|
1127
|
+
<xsl:text>&#</xsl:text>
|
|
1128
|
+
<xsl:apply-templates/>
|
|
1129
|
+
<xsl:text>;</xsl:text>
|
|
1130
|
+
</xsl:when>
|
|
1131
|
+
<xsl:when test="$class='paramentity'">
|
|
1132
|
+
<xsl:text>%</xsl:text>
|
|
1133
|
+
<xsl:apply-templates/>
|
|
1134
|
+
<xsl:text>;</xsl:text>
|
|
1135
|
+
</xsl:when>
|
|
1136
|
+
<xsl:when test="$class='pi'">
|
|
1137
|
+
<xsl:text><?</xsl:text>
|
|
1138
|
+
<xsl:apply-templates/>
|
|
1139
|
+
<xsl:text>></xsl:text>
|
|
1140
|
+
</xsl:when>
|
|
1141
|
+
<xsl:when test="$class='xmlpi'">
|
|
1142
|
+
<xsl:text><?</xsl:text>
|
|
1143
|
+
<xsl:apply-templates/>
|
|
1144
|
+
<xsl:text>?></xsl:text>
|
|
1145
|
+
</xsl:when>
|
|
1146
|
+
<xsl:when test="$class='starttag'">
|
|
1147
|
+
<xsl:text><</xsl:text>
|
|
1148
|
+
<xsl:apply-templates/>
|
|
1149
|
+
<xsl:text>></xsl:text>
|
|
1150
|
+
</xsl:when>
|
|
1151
|
+
<xsl:when test="$class='emptytag'">
|
|
1152
|
+
<xsl:text><</xsl:text>
|
|
1153
|
+
<xsl:apply-templates/>
|
|
1154
|
+
<xsl:text>/></xsl:text>
|
|
1155
|
+
</xsl:when>
|
|
1156
|
+
<xsl:when test="$class='sgmlcomment' or $class='comment'">
|
|
1157
|
+
<xsl:text><!--</xsl:text>
|
|
1158
|
+
<xsl:apply-templates/>
|
|
1159
|
+
<xsl:text>--></xsl:text>
|
|
1160
|
+
</xsl:when>
|
|
1161
|
+
<xsl:otherwise>
|
|
1162
|
+
<xsl:apply-templates/>
|
|
1163
|
+
</xsl:otherwise>
|
|
1164
|
+
</xsl:choose>
|
|
1165
|
+
</xsl:variable>
|
|
1166
|
+
|
|
1167
|
+
<code>
|
|
1168
|
+
<xsl:apply-templates select="." mode="common.html.attributes">
|
|
1169
|
+
<xsl:with-param name="class" select="concat('sgmltag-', $class)"/>
|
|
1170
|
+
</xsl:apply-templates>
|
|
1171
|
+
<xsl:call-template name="simple.xlink">
|
|
1172
|
+
<xsl:with-param name="content" select="$content"/>
|
|
1173
|
+
</xsl:call-template>
|
|
1174
|
+
</code>
|
|
1175
|
+
</xsl:template>
|
|
1176
|
+
|
|
1177
|
+
<xsl:template match="d:email">
|
|
1178
|
+
<xsl:call-template name="inline.monoseq">
|
|
1179
|
+
<xsl:with-param name="content">
|
|
1180
|
+
<xsl:if test="not($email.delimiters.enabled = 0)">
|
|
1181
|
+
<xsl:text><</xsl:text>
|
|
1182
|
+
</xsl:if>
|
|
1183
|
+
<a>
|
|
1184
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
1185
|
+
<xsl:call-template name="id.attribute"/>
|
|
1186
|
+
<xsl:attribute name="href">
|
|
1187
|
+
<xsl:text>mailto:</xsl:text>
|
|
1188
|
+
<xsl:value-of select="."/>
|
|
1189
|
+
</xsl:attribute>
|
|
1190
|
+
<xsl:apply-templates/>
|
|
1191
|
+
</a>
|
|
1192
|
+
<xsl:if test="not($email.delimiters.enabled = 0)">
|
|
1193
|
+
<xsl:text>></xsl:text>
|
|
1194
|
+
</xsl:if>
|
|
1195
|
+
</xsl:with-param>
|
|
1196
|
+
</xsl:call-template>
|
|
1197
|
+
</xsl:template>
|
|
1198
|
+
|
|
1199
|
+
<xsl:template match="d:keycombo">
|
|
1200
|
+
<xsl:variable name="action" select="@action"/>
|
|
1201
|
+
<xsl:variable name="joinchar">
|
|
1202
|
+
<xsl:choose>
|
|
1203
|
+
<xsl:when test="$action='seq'"><xsl:text> </xsl:text></xsl:when>
|
|
1204
|
+
<xsl:when test="$action='simul'">+</xsl:when>
|
|
1205
|
+
<xsl:when test="$action='press'">-</xsl:when>
|
|
1206
|
+
<xsl:when test="$action='click'">-</xsl:when>
|
|
1207
|
+
<xsl:when test="$action='double-click'">-</xsl:when>
|
|
1208
|
+
<xsl:when test="$action='other'"/>
|
|
1209
|
+
<xsl:otherwise>+</xsl:otherwise>
|
|
1210
|
+
</xsl:choose>
|
|
1211
|
+
</xsl:variable>
|
|
1212
|
+
<xsl:for-each select="*">
|
|
1213
|
+
<xsl:if test="position()>1"><xsl:value-of select="$joinchar"/></xsl:if>
|
|
1214
|
+
<xsl:apply-templates select="."/>
|
|
1215
|
+
</xsl:for-each>
|
|
1216
|
+
</xsl:template>
|
|
1217
|
+
|
|
1218
|
+
<xsl:template match="d:uri">
|
|
1219
|
+
<xsl:call-template name="inline.monoseq"/>
|
|
1220
|
+
</xsl:template>
|
|
1221
|
+
|
|
1222
|
+
<!-- ==================================================================== -->
|
|
1223
|
+
|
|
1224
|
+
<xsl:template match="d:menuchoice">
|
|
1225
|
+
<xsl:variable name="shortcut" select="./d:shortcut"/>
|
|
1226
|
+
<xsl:call-template name="process.menuchoice"/>
|
|
1227
|
+
<xsl:if test="$shortcut">
|
|
1228
|
+
<xsl:text> (</xsl:text>
|
|
1229
|
+
<xsl:apply-templates select="$shortcut"/>
|
|
1230
|
+
<xsl:text>)</xsl:text>
|
|
1231
|
+
</xsl:if>
|
|
1232
|
+
</xsl:template>
|
|
1233
|
+
|
|
1234
|
+
<xsl:template name="process.menuchoice">
|
|
1235
|
+
<xsl:param name="nodelist" select="d:guibutton|d:guiicon|d:guilabel|d:guimenu|d:guimenuitem|d:guisubmenu|d:interface"/><!-- not(shortcut) -->
|
|
1236
|
+
<xsl:param name="count" select="1"/>
|
|
1237
|
+
|
|
1238
|
+
<xsl:choose>
|
|
1239
|
+
<xsl:when test="$count>count($nodelist)"/>
|
|
1240
|
+
<xsl:when test="$count=1">
|
|
1241
|
+
<xsl:apply-templates select="$nodelist[$count=position()]"/>
|
|
1242
|
+
<xsl:call-template name="process.menuchoice">
|
|
1243
|
+
<xsl:with-param name="nodelist" select="$nodelist"/>
|
|
1244
|
+
<xsl:with-param name="count" select="$count+1"/>
|
|
1245
|
+
</xsl:call-template>
|
|
1246
|
+
</xsl:when>
|
|
1247
|
+
<xsl:otherwise>
|
|
1248
|
+
<xsl:variable name="node" select="$nodelist[$count=position()]"/>
|
|
1249
|
+
<xsl:choose>
|
|
1250
|
+
<xsl:when test="local-name($node)='guimenuitem' or local-name($node)='guisubmenu'">
|
|
1251
|
+
<xsl:value-of select="$menuchoice.menu.separator"/>
|
|
1252
|
+
</xsl:when>
|
|
1253
|
+
<xsl:otherwise>
|
|
1254
|
+
<xsl:value-of select="$menuchoice.separator"/>
|
|
1255
|
+
</xsl:otherwise>
|
|
1256
|
+
</xsl:choose>
|
|
1257
|
+
<xsl:apply-templates select="$node"/>
|
|
1258
|
+
<xsl:call-template name="process.menuchoice">
|
|
1259
|
+
<xsl:with-param name="nodelist" select="$nodelist"/>
|
|
1260
|
+
<xsl:with-param name="count" select="$count+1"/>
|
|
1261
|
+
</xsl:call-template>
|
|
1262
|
+
</xsl:otherwise>
|
|
1263
|
+
</xsl:choose>
|
|
1264
|
+
</xsl:template>
|
|
1265
|
+
|
|
1266
|
+
<!-- ==================================================================== -->
|
|
1267
|
+
|
|
1268
|
+
<xsl:template match="d:optional">
|
|
1269
|
+
<xsl:value-of select="$arg.choice.opt.open.str"/>
|
|
1270
|
+
<xsl:call-template name="inline.charseq"/>
|
|
1271
|
+
<xsl:value-of select="$arg.choice.opt.close.str"/>
|
|
1272
|
+
</xsl:template>
|
|
1273
|
+
|
|
1274
|
+
<xsl:template match="d:citation">
|
|
1275
|
+
<!-- todo: integrate with bibliography collection -->
|
|
1276
|
+
<xsl:variable name="targets" select="(//d:biblioentry | //d:bibliomixed)[d:abbrev = string(current())]"/>
|
|
1277
|
+
<xsl:variable name="target" select="$targets[1]"/>
|
|
1278
|
+
|
|
1279
|
+
<xsl:choose>
|
|
1280
|
+
<!-- try automatic linking based on match to abbrev -->
|
|
1281
|
+
<xsl:when test="$target and not(d:xref) and not(d:link)">
|
|
1282
|
+
|
|
1283
|
+
<xsl:text>[</xsl:text>
|
|
1284
|
+
<a>
|
|
1285
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
1286
|
+
<xsl:attribute name="href">
|
|
1287
|
+
<xsl:call-template name="href.target">
|
|
1288
|
+
<xsl:with-param name="object" select="$target"/>
|
|
1289
|
+
</xsl:call-template>
|
|
1290
|
+
</xsl:attribute>
|
|
1291
|
+
|
|
1292
|
+
<xsl:choose>
|
|
1293
|
+
<xsl:when test="$bibliography.numbered != 0">
|
|
1294
|
+
<xsl:call-template name="id.attribute"/>
|
|
1295
|
+
<xsl:apply-templates select="$target" mode="citation"/>
|
|
1296
|
+
</xsl:when>
|
|
1297
|
+
<xsl:otherwise>
|
|
1298
|
+
<xsl:call-template name="inline.charseq"/>
|
|
1299
|
+
</xsl:otherwise>
|
|
1300
|
+
</xsl:choose>
|
|
1301
|
+
|
|
1302
|
+
</a>
|
|
1303
|
+
<xsl:text>]</xsl:text>
|
|
1304
|
+
</xsl:when>
|
|
1305
|
+
<xsl:otherwise>
|
|
1306
|
+
<xsl:text>[</xsl:text>
|
|
1307
|
+
<xsl:call-template name="inline.charseq"/>
|
|
1308
|
+
<xsl:text>]</xsl:text>
|
|
1309
|
+
</xsl:otherwise>
|
|
1310
|
+
</xsl:choose>
|
|
1311
|
+
</xsl:template>
|
|
1312
|
+
|
|
1313
|
+
<xsl:template match="d:citebiblioid">
|
|
1314
|
+
<xsl:variable name="targets" select="//*[d:biblioid = string(current())]"/>
|
|
1315
|
+
<xsl:variable name="target" select="$targets[1]"/>
|
|
1316
|
+
|
|
1317
|
+
<xsl:choose>
|
|
1318
|
+
<!-- try automatic linking based on match to parent of biblioid -->
|
|
1319
|
+
<xsl:when test="$target and not(d:xref) and not(d:link)">
|
|
1320
|
+
|
|
1321
|
+
<xsl:text>[</xsl:text>
|
|
1322
|
+
<a>
|
|
1323
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
1324
|
+
<xsl:attribute name="href">
|
|
1325
|
+
<xsl:call-template name="href.target">
|
|
1326
|
+
<xsl:with-param name="object" select="$target"/>
|
|
1327
|
+
</xsl:call-template>
|
|
1328
|
+
</xsl:attribute>
|
|
1329
|
+
|
|
1330
|
+
<xsl:call-template name="inline.charseq"/>
|
|
1331
|
+
|
|
1332
|
+
</a>
|
|
1333
|
+
<xsl:text>]</xsl:text>
|
|
1334
|
+
</xsl:when>
|
|
1335
|
+
<xsl:otherwise>
|
|
1336
|
+
<xsl:text>[</xsl:text>
|
|
1337
|
+
<xsl:call-template name="inline.charseq"/>
|
|
1338
|
+
<xsl:text>]</xsl:text>
|
|
1339
|
+
</xsl:otherwise>
|
|
1340
|
+
</xsl:choose>
|
|
1341
|
+
</xsl:template>
|
|
1342
|
+
|
|
1343
|
+
<xsl:template match="d:biblioentry|d:bibliomixed" mode="citation">
|
|
1344
|
+
<xsl:number from="d:bibliography" count="d:biblioentry|d:bibliomixed" level="any" format="1"/>
|
|
1345
|
+
</xsl:template>
|
|
1346
|
+
|
|
1347
|
+
<!-- ==================================================================== -->
|
|
1348
|
+
|
|
1349
|
+
<xsl:template match="d:comment[parent::d:answer|parent::d:appendix|parent::d:article|parent::d:bibliodiv| parent::d:bibliography|parent::d:blockquote|parent::d:caution|parent::d:chapter| parent::d:glossary|parent::d:glossdiv|parent::d:important|parent::d:index| parent::d:indexdiv|parent::d:listitem|parent::d:note|parent::d:orderedlist| parent::d:partintro|parent::d:preface|parent::d:procedure|parent::d:qandadiv| parent::d:qandaset|parent::d:question|parent::d:refentry|parent::d:refnamediv| parent::d:refsect1|parent::d:refsect2|parent::d:refsect3|parent::d:refsection| parent::d:refsynopsisdiv|parent::d:sect1|parent::d:sect2|parent::d:sect3|parent::d:sect4| parent::d:sect5|parent::d:section|parent::d:setindex|parent::d:sidebar| parent::d:simplesect|parent::d:taskprerequisites|parent::d:taskrelated| parent::d:tasksummary|parent::d:warning|parent::d:topic]|d:remark[parent::d:answer|parent::d:appendix|parent::d:article|parent::d:bibliodiv| parent::d:bibliography|parent::d:blockquote|parent::d:caution|parent::d:chapter| parent::d:glossary|parent::d:glossdiv|parent::d:important|parent::d:index| parent::d:indexdiv|parent::d:listitem|parent::d:note|parent::d:orderedlist| parent::d:partintro|parent::d:preface|parent::d:procedure|parent::d:qandadiv| parent::d:qandaset|parent::d:question|parent::d:refentry|parent::d:refnamediv| parent::d:refsect1|parent::d:refsect2|parent::d:refsect3|parent::d:refsection| parent::d:refsynopsisdiv|parent::d:sect1|parent::d:sect2|parent::d:sect3|parent::d:sect4| parent::d:sect5|parent::d:section|parent::d:setindex|parent::d:sidebar| parent::d:simplesect|parent::d:taskprerequisites|parent::d:taskrelated| parent::d:tasksummary|parent::d:warning|parent::d:topic]">
|
|
1350
|
+
<xsl:if test="$show.comments != 0">
|
|
1351
|
+
<p class="remark"><em><xsl:call-template name="inline.charseq"/></em></p>
|
|
1352
|
+
</xsl:if>
|
|
1353
|
+
</xsl:template>
|
|
1354
|
+
|
|
1355
|
+
<xsl:template match="d:comment|d:remark">
|
|
1356
|
+
<xsl:if test="$show.comments != 0">
|
|
1357
|
+
<em><xsl:call-template name="inline.charseq"/></em>
|
|
1358
|
+
</xsl:if>
|
|
1359
|
+
</xsl:template>
|
|
1360
|
+
|
|
1361
|
+
<!-- ==================================================================== -->
|
|
1362
|
+
|
|
1363
|
+
<xsl:template match="d:productname">
|
|
1364
|
+
<xsl:call-template name="inline.charseq"/>
|
|
1365
|
+
<xsl:if test="@class">
|
|
1366
|
+
<xsl:call-template name="dingbat">
|
|
1367
|
+
<xsl:with-param name="dingbat" select="@class"/>
|
|
1368
|
+
</xsl:call-template>
|
|
1369
|
+
</xsl:if>
|
|
1370
|
+
</xsl:template>
|
|
1371
|
+
|
|
1372
|
+
<xsl:template match="d:productnumber">
|
|
1373
|
+
<xsl:call-template name="inline.charseq"/>
|
|
1374
|
+
</xsl:template>
|
|
1375
|
+
|
|
1376
|
+
<!-- ==================================================================== -->
|
|
1377
|
+
|
|
1378
|
+
<xsl:template match="d:pob|d:street|d:city|d:state|d:postcode|d:country|d:otheraddr">
|
|
1379
|
+
<xsl:call-template name="inline.charseq"/>
|
|
1380
|
+
</xsl:template>
|
|
1381
|
+
|
|
1382
|
+
<xsl:template match="d:phone|d:fax">
|
|
1383
|
+
<xsl:call-template name="inline.charseq"/>
|
|
1384
|
+
</xsl:template>
|
|
1385
|
+
|
|
1386
|
+
<!-- in Addresses, for example -->
|
|
1387
|
+
<xsl:template match="d:honorific|d:firstname|d:surname|d:lineage|d:othername">
|
|
1388
|
+
<xsl:call-template name="inline.charseq"/>
|
|
1389
|
+
</xsl:template>
|
|
1390
|
+
|
|
1391
|
+
<!-- ==================================================================== -->
|
|
1392
|
+
|
|
1393
|
+
<xsl:template match="d:person">
|
|
1394
|
+
<xsl:param name="content">
|
|
1395
|
+
<xsl:call-template name="anchor"/>
|
|
1396
|
+
<xsl:call-template name="simple.xlink">
|
|
1397
|
+
<xsl:with-param name="content">
|
|
1398
|
+
<xsl:apply-templates select="d:personname"/>
|
|
1399
|
+
</xsl:with-param>
|
|
1400
|
+
</xsl:call-template>
|
|
1401
|
+
<xsl:call-template name="apply-annotations"/>
|
|
1402
|
+
</xsl:param>
|
|
1403
|
+
|
|
1404
|
+
<span>
|
|
1405
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
1406
|
+
<xsl:call-template name="id.attribute"/>
|
|
1407
|
+
<xsl:copy-of select="$content"/>
|
|
1408
|
+
</span>
|
|
1409
|
+
</xsl:template>
|
|
1410
|
+
|
|
1411
|
+
<xsl:template match="d:personname">
|
|
1412
|
+
<xsl:param name="content">
|
|
1413
|
+
<xsl:call-template name="anchor"/>
|
|
1414
|
+
<xsl:call-template name="simple.xlink">
|
|
1415
|
+
<xsl:with-param name="content">
|
|
1416
|
+
<xsl:call-template name="person.name"/>
|
|
1417
|
+
</xsl:with-param>
|
|
1418
|
+
</xsl:call-template>
|
|
1419
|
+
<xsl:call-template name="apply-annotations"/>
|
|
1420
|
+
</xsl:param>
|
|
1421
|
+
|
|
1422
|
+
<span>
|
|
1423
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
1424
|
+
<xsl:call-template name="id.attribute"/>
|
|
1425
|
+
<xsl:copy-of select="$content"/>
|
|
1426
|
+
</span>
|
|
1427
|
+
</xsl:template>
|
|
1428
|
+
|
|
1429
|
+
<!-- ==================================================================== -->
|
|
1430
|
+
|
|
1431
|
+
<xsl:template match="d:org">
|
|
1432
|
+
<xsl:param name="content">
|
|
1433
|
+
<xsl:call-template name="anchor"/>
|
|
1434
|
+
<xsl:call-template name="simple.xlink">
|
|
1435
|
+
<xsl:with-param name="content">
|
|
1436
|
+
<xsl:apply-templates/>
|
|
1437
|
+
</xsl:with-param>
|
|
1438
|
+
</xsl:call-template>
|
|
1439
|
+
<xsl:call-template name="apply-annotations"/>
|
|
1440
|
+
</xsl:param>
|
|
1441
|
+
|
|
1442
|
+
<span>
|
|
1443
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
1444
|
+
<xsl:call-template name="id.attribute"/>
|
|
1445
|
+
<xsl:copy-of select="$content"/>
|
|
1446
|
+
</span>
|
|
1447
|
+
</xsl:template>
|
|
1448
|
+
|
|
1449
|
+
<xsl:template match="d:orgname">
|
|
1450
|
+
<xsl:param name="content">
|
|
1451
|
+
<xsl:call-template name="anchor"/>
|
|
1452
|
+
<xsl:call-template name="simple.xlink">
|
|
1453
|
+
<xsl:with-param name="content">
|
|
1454
|
+
<xsl:apply-templates/>
|
|
1455
|
+
</xsl:with-param>
|
|
1456
|
+
</xsl:call-template>
|
|
1457
|
+
<xsl:call-template name="apply-annotations"/>
|
|
1458
|
+
</xsl:param>
|
|
1459
|
+
|
|
1460
|
+
<span>
|
|
1461
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
1462
|
+
<xsl:call-template name="id.attribute"/>
|
|
1463
|
+
<xsl:copy-of select="$content"/>
|
|
1464
|
+
</span>
|
|
1465
|
+
</xsl:template>
|
|
1466
|
+
|
|
1467
|
+
<xsl:template match="d:orgdiv">
|
|
1468
|
+
<xsl:param name="content">
|
|
1469
|
+
<xsl:call-template name="anchor"/>
|
|
1470
|
+
<xsl:call-template name="simple.xlink">
|
|
1471
|
+
<xsl:with-param name="content">
|
|
1472
|
+
<xsl:apply-templates/>
|
|
1473
|
+
</xsl:with-param>
|
|
1474
|
+
</xsl:call-template>
|
|
1475
|
+
<xsl:call-template name="apply-annotations"/>
|
|
1476
|
+
</xsl:param>
|
|
1477
|
+
|
|
1478
|
+
<span>
|
|
1479
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
1480
|
+
<xsl:copy-of select="$content"/>
|
|
1481
|
+
</span>
|
|
1482
|
+
</xsl:template>
|
|
1483
|
+
|
|
1484
|
+
<xsl:template match="d:affiliation">
|
|
1485
|
+
<xsl:param name="content">
|
|
1486
|
+
<xsl:call-template name="anchor"/>
|
|
1487
|
+
<xsl:call-template name="simple.xlink">
|
|
1488
|
+
<xsl:with-param name="content">
|
|
1489
|
+
<xsl:call-template name="person.name"/>
|
|
1490
|
+
</xsl:with-param>
|
|
1491
|
+
</xsl:call-template>
|
|
1492
|
+
<xsl:call-template name="apply-annotations"/>
|
|
1493
|
+
</xsl:param>
|
|
1494
|
+
|
|
1495
|
+
<span>
|
|
1496
|
+
<xsl:apply-templates select="." mode="common.html.attributes"/>
|
|
1497
|
+
<xsl:call-template name="id.attribute"/>
|
|
1498
|
+
<xsl:copy-of select="$content"/>
|
|
1499
|
+
</span>
|
|
1500
|
+
</xsl:template>
|
|
1501
|
+
|
|
1502
|
+
<!-- ==================================================================== -->
|
|
1503
|
+
|
|
1504
|
+
<xsl:template match="d:beginpage">
|
|
1505
|
+
<!-- does nothing; this *is not* markup to force a page break. -->
|
|
1506
|
+
</xsl:template>
|
|
1507
|
+
|
|
1508
|
+
</xsl:stylesheet>
|