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.
Files changed (170) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +2 -0
  3. data/CHANGELOG +41 -0
  4. data/README.md +9 -17
  5. data/bin/docbook_xsl_wrapper +9 -14
  6. data/docbook_xsl_wrapper.gemspec +8 -7
  7. data/lib/docbook_xsl_wrapper.rb +24 -1
  8. data/lib/docbook_xsl_wrapper/epub.rb +124 -122
  9. data/lib/docbook_xsl_wrapper/options.rb +1 -1
  10. data/lib/docbook_xsl_wrapper/validate.rb +22 -0
  11. data/lib/docbook_xsl_wrapper/version.rb +1 -1
  12. data/schema/docbookxi.rng +18654 -0
  13. data/spec/docbook_xsl_wrapper/validate_spec.rb +64 -0
  14. data/xsl/AUTHORS +4 -0
  15. data/xsl/COPYING +48 -0
  16. data/xsl/REVISION +1 -0
  17. data/xsl/VERSION.xsl +115 -0
  18. data/xsl/common/addns.xsl +124 -0
  19. data/xsl/common/af.xml +1272 -0
  20. data/xsl/common/am.xml +1272 -0
  21. data/xsl/common/ar.xml +1272 -0
  22. data/xsl/common/as.xml +703 -0
  23. data/xsl/common/ast.xml +703 -0
  24. data/xsl/common/autoidx-kimber.xsl +45 -0
  25. data/xsl/common/autoidx-kosek.xsl +155 -0
  26. data/xsl/common/az.xml +715 -0
  27. data/xsl/common/bg.xml +767 -0
  28. data/xsl/common/bn.xml +1272 -0
  29. data/xsl/common/bn_in.xml +703 -0
  30. data/xsl/common/bs.xml +705 -0
  31. data/xsl/common/ca.xml +703 -0
  32. data/xsl/common/charmap.xsl +222 -0
  33. data/xsl/common/common.xsl +2129 -0
  34. data/xsl/common/cs.xml +743 -0
  35. data/xsl/common/cy.xml +1288 -0
  36. data/xsl/common/da.xml +707 -0
  37. data/xsl/common/de.xml +709 -0
  38. data/xsl/common/el.xml +772 -0
  39. data/xsl/common/en.xml +1272 -0
  40. data/xsl/common/entities.ent +67 -0
  41. data/xsl/common/eo.xml +1272 -0
  42. data/xsl/common/es.xml +719 -0
  43. data/xsl/common/et.xml +1272 -0
  44. data/xsl/common/eu.xml +1272 -0
  45. data/xsl/common/fa.xml +703 -0
  46. data/xsl/common/fi.xml +713 -0
  47. data/xsl/common/fr.xml +733 -0
  48. data/xsl/common/ga.xml +1272 -0
  49. data/xsl/common/gentext.xsl +855 -0
  50. data/xsl/common/gl.xml +1272 -0
  51. data/xsl/common/gu.xml +703 -0
  52. data/xsl/common/he.xml +1272 -0
  53. data/xsl/common/hi.xml +703 -0
  54. data/xsl/common/hr.xml +705 -0
  55. data/xsl/common/hu.xml +721 -0
  56. data/xsl/common/id.xml +1272 -0
  57. data/xsl/common/insertfile.xsl +113 -0
  58. data/xsl/common/is.xml +715 -0
  59. data/xsl/common/it.xml +1272 -0
  60. data/xsl/common/ja.xml +703 -0
  61. data/xsl/common/ka.xml +743 -0
  62. data/xsl/common/kn.xml +1272 -0
  63. data/xsl/common/ko.xml +1272 -0
  64. data/xsl/common/ky.xml +775 -0
  65. data/xsl/common/l10n.dtd +64 -0
  66. data/xsl/common/l10n.xml +78 -0
  67. data/xsl/common/l10n.xsl +598 -0
  68. data/xsl/common/la.xml +1272 -0
  69. data/xsl/common/labels.xsl +933 -0
  70. data/xsl/common/lt.xml +721 -0
  71. data/xsl/common/lv.xml +1272 -0
  72. data/xsl/common/ml.xml +703 -0
  73. data/xsl/common/mn.xml +773 -0
  74. data/xsl/common/mr.xml +703 -0
  75. data/xsl/common/nb.xml +1272 -0
  76. data/xsl/common/nds.xml +709 -0
  77. data/xsl/common/nl.xml +703 -0
  78. data/xsl/common/nn.xml +1272 -0
  79. data/xsl/common/olink.xsl +1284 -0
  80. data/xsl/common/or.xml +1272 -0
  81. data/xsl/common/pa.xml +703 -0
  82. data/xsl/common/pi.xml +168 -0
  83. data/xsl/common/pi.xsl +347 -0
  84. data/xsl/common/pl.xml +721 -0
  85. data/xsl/common/pt.xml +1272 -0
  86. data/xsl/common/pt_br.xml +1272 -0
  87. data/xsl/common/refentry.xsl +1353 -0
  88. data/xsl/common/ro.xml +1272 -0
  89. data/xsl/common/ru.xml +769 -0
  90. data/xsl/common/sk.xml +1272 -0
  91. data/xsl/common/sl.xml +1272 -0
  92. data/xsl/common/sq.xml +1272 -0
  93. data/xsl/common/sr.xml +763 -0
  94. data/xsl/common/sr_Latn.xml +722 -0
  95. data/xsl/common/subtitles.xsl +181 -0
  96. data/xsl/common/sv.xml +707 -0
  97. data/xsl/common/ta.xml +703 -0
  98. data/xsl/common/table.xsl +515 -0
  99. data/xsl/common/targetdatabase.dtd +49 -0
  100. data/xsl/common/targets.xsl +338 -0
  101. data/xsl/common/te.xml +703 -0
  102. data/xsl/common/th.xml +1272 -0
  103. data/xsl/common/titles.xsl +850 -0
  104. data/xsl/common/tl.xml +1272 -0
  105. data/xsl/common/tr.xml +709 -0
  106. data/xsl/common/uk.xml +769 -0
  107. data/xsl/common/ur.xml +705 -0
  108. data/xsl/common/utility.xsl +291 -0
  109. data/xsl/common/vi.xml +1272 -0
  110. data/xsl/common/xh.xml +1272 -0
  111. data/xsl/common/zh.xml +703 -0
  112. data/xsl/common/zh_cn.xml +703 -0
  113. data/xsl/common/zh_tw.xml +703 -0
  114. data/xsl/epub/docbook.xsl +1769 -0
  115. data/xsl/epub3/chunk.xsl +30 -0
  116. data/xsl/epub3/docbook-epub.css.xml +142 -0
  117. data/xsl/epub3/docbook.xsl +20 -0
  118. data/xsl/epub3/epub3-chunk-mods.xsl +52 -0
  119. data/xsl/epub3/epub3-element-mods.xsl +2533 -0
  120. data/xsl/epub3/titlepage.templates.xml +712 -0
  121. data/xsl/epub3/titlepage.templates.xsl +3842 -0
  122. data/xsl/lib/lib.xsl +533 -0
  123. data/xsl/xhtml/admon.xsl +142 -0
  124. data/xsl/xhtml/annotations.xsl +160 -0
  125. data/xsl/xhtml/autoidx.xsl +831 -0
  126. data/xsl/xhtml/autotoc.xsl +706 -0
  127. data/xsl/xhtml/biblio-iso690.xsl +1302 -0
  128. data/xsl/xhtml/biblio.xsl +1371 -0
  129. data/xsl/xhtml/block.xsl +584 -0
  130. data/xsl/xhtml/callout.xsl +210 -0
  131. data/xsl/xhtml/chunk-code.xsl +675 -0
  132. data/xsl/xhtml/chunk-common.xsl +1627 -0
  133. data/xsl/xhtml/chunker.xsl +317 -0
  134. data/xsl/xhtml/component.xsl +440 -0
  135. data/xsl/xhtml/division.xsl +214 -0
  136. data/xsl/xhtml/ebnf.xsl +331 -0
  137. data/xsl/xhtml/footnote.xsl +346 -0
  138. data/xsl/xhtml/formal.xsl +496 -0
  139. data/xsl/xhtml/glossary.xsl +602 -0
  140. data/xsl/xhtml/graphics.xsl +1537 -0
  141. data/xsl/xhtml/html-rtf.xsl +321 -0
  142. data/xsl/xhtml/html.xsl +690 -0
  143. data/xsl/xhtml/htmltbl.xsl +102 -0
  144. data/xsl/xhtml/index.xsl +264 -0
  145. data/xsl/xhtml/info.xsl +48 -0
  146. data/xsl/xhtml/inline.xsl +1508 -0
  147. data/xsl/xhtml/its.xsl +109 -0
  148. data/xsl/xhtml/keywords.xsl +38 -0
  149. data/xsl/xhtml/lists.xsl +1227 -0
  150. data/xsl/xhtml/math.xsl +286 -0
  151. data/xsl/xhtml/param.xsl +449 -0
  152. data/xsl/xhtml/pi.xsl +1237 -0
  153. data/xsl/xhtml/qandaset.xsl +440 -0
  154. data/xsl/xhtml/refentry.xsl +307 -0
  155. data/xsl/xhtml/sections.xsl +564 -0
  156. data/xsl/xhtml/synop.xsl +1623 -0
  157. data/xsl/xhtml/table.xsl +1179 -0
  158. data/xsl/xhtml/task.xsl +76 -0
  159. data/xsl/xhtml/titlepage.templates.xsl +4005 -0
  160. data/xsl/xhtml/titlepage.xsl +1108 -0
  161. data/xsl/xhtml/toc.xsl +334 -0
  162. data/xsl/xhtml/verbatim.xsl +389 -0
  163. data/xsl/xhtml/xref.xsl +1268 -0
  164. data/xsl/xhtml5/docbook.xsl +22 -0
  165. data/xsl/xhtml5/html5-chunk-mods.xsl +112 -0
  166. data/xsl/xhtml5/html5-element-mods.xsl +791 -0
  167. data/xsl/xhtml5/xhtml-docbook.xsl +531 -0
  168. metadata +207 -27
  169. data/.rvmrc +0 -48
  170. data/xslt/obfuscate.xsl +0 -12
@@ -0,0 +1,317 @@
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:saxon="http://icl.com/saxon" xmlns:lxslt="http://xml.apache.org/xslt" xmlns:redirect="http://xml.apache.org/xalan/redirect" xmlns:exsl="http://exslt.org/common" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="saxon lxslt redirect exsl doc d" extension-element-prefixes="saxon redirect lxslt exsl">
6
+
7
+ <!-- ********************************************************************
8
+ $Id: chunker.xsl 9741 2013-04-11 21:57:59Z 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
+ <!-- ==================================================================== -->
18
+
19
+ <!-- This stylesheet works with XSLT implementations that support -->
20
+ <!-- exsl:document, saxon:output, or Xalan's redirect:write -->
21
+ <!-- Note: Only Saxon 6.4.2 or later is supported. -->
22
+
23
+ <xsl:param name="chunker.output.method" select="'xml'"/>
24
+ <xsl:param name="chunker.output.encoding" select="'UTF-8'"/>
25
+ <xsl:param name="chunker.output.indent" select="'no'"/>
26
+ <xsl:param name="chunker.output.omit-xml-declaration" select="'no'"/>
27
+ <xsl:param name="chunker.output.standalone" select="'no'"/>
28
+ <xsl:param name="chunker.output.doctype-public" select="'-//W3C//DTD XHTML 1.0 Transitional//EN'"/>
29
+ <xsl:param name="chunker.output.doctype-system" select="'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'"/>
30
+ <xsl:param name="chunker.output.media-type" select="''"/>
31
+ <xsl:param name="chunker.output.cdata-section-elements" select="''"/>
32
+
33
+ <!-- Make sure base.dir has a trailing slash. -->
34
+ <!-- This is an internal-only variable. Customize $base.dir instead. -->
35
+ <xsl:variable name="chunk.base.dir">
36
+ <xsl:choose>
37
+ <xsl:when test="string-length($base.dir) = 0"/>
38
+ <!-- make sure to add trailing slash if omitted by user -->
39
+ <xsl:when test="substring($base.dir, string-length($base.dir), 1) = '/'">
40
+ <xsl:value-of select="$base.dir"/>
41
+ </xsl:when>
42
+ <xsl:otherwise>
43
+ <xsl:value-of select="concat($base.dir, '/')"/>
44
+ </xsl:otherwise>
45
+ </xsl:choose>
46
+ </xsl:variable>
47
+
48
+ <xsl:param name="saxon.character.representation" select="'entity;decimal'"/>
49
+
50
+ <!-- ==================================================================== -->
51
+
52
+ <xsl:template name="make-relative-filename">
53
+ <xsl:param name="base.dir" select="'./'"/>
54
+ <xsl:param name="base.name" select="''"/>
55
+
56
+ <xsl:choose>
57
+ <!-- put Saxon first to work around a bug in libxslt -->
58
+ <xsl:when test="element-available('saxon:output')">
59
+ <!-- Saxon doesn't make the chunks relative -->
60
+ <xsl:value-of select="concat($base.dir,$base.name)"/>
61
+ </xsl:when>
62
+ <xsl:when test="element-available('exsl:document')">
63
+ <!-- EXSL document does make the chunks relative, I think -->
64
+ <xsl:choose>
65
+ <xsl:when test="count(parent::*) = 0">
66
+ <xsl:value-of select="concat($base.dir,$base.name)"/>
67
+ </xsl:when>
68
+ <xsl:otherwise>
69
+ <xsl:value-of select="$base.name"/>
70
+ </xsl:otherwise>
71
+ </xsl:choose>
72
+ </xsl:when>
73
+ <xsl:when test="element-available('redirect:write')">
74
+ <!-- Xalan doesn't make the chunks relative -->
75
+ <xsl:value-of select="concat($base.dir,$base.name)"/>
76
+ </xsl:when>
77
+ <xsl:otherwise>
78
+ <xsl:message terminate="yes">
79
+ <xsl:text>Don't know how to chunk with </xsl:text>
80
+ <xsl:value-of select="system-property('xsl:vendor')"/>
81
+ </xsl:message>
82
+ </xsl:otherwise>
83
+ </xsl:choose>
84
+ </xsl:template>
85
+
86
+ <xsl:template name="write.chunk">
87
+ <xsl:param name="filename" select="''"/>
88
+ <xsl:param name="quiet" select="$chunk.quietly"/>
89
+ <xsl:param name="suppress-context-node-name" select="0"/>
90
+ <xsl:param name="message-prolog"/>
91
+ <xsl:param name="message-epilog"/>
92
+
93
+ <xsl:param name="method" select="$chunker.output.method"/>
94
+ <xsl:param name="encoding" select="$chunker.output.encoding"/>
95
+ <xsl:param name="indent" select="$chunker.output.indent"/>
96
+ <xsl:param name="omit-xml-declaration" select="$chunker.output.omit-xml-declaration"/>
97
+ <xsl:param name="standalone" select="$chunker.output.standalone"/>
98
+ <xsl:param name="doctype-public" select="$chunker.output.doctype-public"/>
99
+ <xsl:param name="doctype-system" select="$chunker.output.doctype-system"/>
100
+ <xsl:param name="media-type" select="$chunker.output.media-type"/>
101
+ <xsl:param name="cdata-section-elements" select="$chunker.output.cdata-section-elements"/>
102
+
103
+ <xsl:param name="content"/>
104
+
105
+ <xsl:if test="$quiet = 0">
106
+ <xsl:message>
107
+ <xsl:if test="not($message-prolog = '')">
108
+ <xsl:value-of select="$message-prolog"/>
109
+ </xsl:if>
110
+ <xsl:text>Writing </xsl:text>
111
+ <xsl:value-of select="$filename"/>
112
+ <xsl:if test="name(.) != '' and $suppress-context-node-name = 0">
113
+ <xsl:text> for </xsl:text>
114
+ <xsl:value-of select="name(.)"/>
115
+ <xsl:if test="@id or @xml:id">
116
+ <xsl:text>(</xsl:text>
117
+ <xsl:value-of select="(@id|@xml:id)[1]"/>
118
+ <xsl:text>)</xsl:text>
119
+ </xsl:if>
120
+ </xsl:if>
121
+ <xsl:if test="not($message-epilog = '')">
122
+ <xsl:value-of select="$message-epilog"/>
123
+ </xsl:if>
124
+ </xsl:message>
125
+ </xsl:if>
126
+
127
+ <xsl:choose>
128
+ <xsl:when test="element-available('exsl:document')">
129
+ <xsl:choose>
130
+ <!-- Handle the permutations ... -->
131
+ <xsl:when test="$media-type != ''">
132
+ <xsl:choose>
133
+ <xsl:when test="$doctype-public != '' and $doctype-system != ''">
134
+ <exsl:document href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" media-type="{$media-type}" doctype-public="{$doctype-public}" doctype-system="{$doctype-system}" standalone="{$standalone}">
135
+ <xsl:copy-of select="$content"/>
136
+ </exsl:document>
137
+ </xsl:when>
138
+ <xsl:when test="$doctype-public != '' and $doctype-system = ''">
139
+ <exsl:document href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" media-type="{$media-type}" doctype-public="{$doctype-public}" standalone="{$standalone}">
140
+ <xsl:copy-of select="$content"/>
141
+ </exsl:document>
142
+ </xsl:when>
143
+ <xsl:when test="$doctype-public = '' and $doctype-system != ''">
144
+ <exsl:document href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" media-type="{$media-type}" doctype-system="{$doctype-system}" standalone="{$standalone}">
145
+ <xsl:copy-of select="$content"/>
146
+ </exsl:document>
147
+ </xsl:when>
148
+ <xsl:otherwise><!-- $doctype-public = '' and $doctype-system = ''"> -->
149
+ <exsl:document href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" media-type="{$media-type}" standalone="{$standalone}">
150
+ <xsl:copy-of select="$content"/>
151
+ </exsl:document>
152
+ </xsl:otherwise>
153
+ </xsl:choose>
154
+ </xsl:when>
155
+ <xsl:otherwise>
156
+ <xsl:choose>
157
+ <xsl:when test="$doctype-public != '' and $doctype-system != ''">
158
+ <exsl:document href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" doctype-public="{$doctype-public}" doctype-system="{$doctype-system}" standalone="{$standalone}">
159
+ <xsl:copy-of select="$content"/>
160
+ </exsl:document>
161
+ </xsl:when>
162
+ <xsl:when test="$doctype-public != '' and $doctype-system = ''">
163
+ <exsl:document href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" doctype-public="{$doctype-public}" standalone="{$standalone}">
164
+ <xsl:copy-of select="$content"/>
165
+ </exsl:document>
166
+ </xsl:when>
167
+ <xsl:when test="$doctype-public = '' and $doctype-system != ''">
168
+ <exsl:document href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" doctype-system="{$doctype-system}" standalone="{$standalone}">
169
+ <xsl:copy-of select="$content"/>
170
+ </exsl:document>
171
+ </xsl:when>
172
+ <xsl:otherwise><!-- $doctype-public = '' and $doctype-system = ''"> -->
173
+ <exsl:document href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" standalone="{$standalone}">
174
+ <xsl:copy-of select="$content"/>
175
+ </exsl:document>
176
+ </xsl:otherwise>
177
+ </xsl:choose>
178
+ </xsl:otherwise>
179
+ </xsl:choose>
180
+ </xsl:when>
181
+
182
+ <xsl:when test="element-available('saxon:output')">
183
+ <xsl:choose>
184
+ <!-- Handle the permutations ... -->
185
+ <xsl:when test="$media-type != ''">
186
+ <xsl:choose>
187
+ <xsl:when test="$doctype-public != '' and $doctype-system != ''">
188
+ <saxon:output saxon:character-representation="{$saxon.character.representation}" href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" media-type="{$media-type}" doctype-public="{$doctype-public}" doctype-system="{$doctype-system}" standalone="{$standalone}">
189
+ <xsl:copy-of select="$content"/>
190
+ </saxon:output>
191
+ </xsl:when>
192
+ <xsl:when test="$doctype-public != '' and $doctype-system = ''">
193
+ <saxon:output saxon:character-representation="{$saxon.character.representation}" href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" media-type="{$media-type}" doctype-public="{$doctype-public}" standalone="{$standalone}">
194
+ <xsl:copy-of select="$content"/>
195
+ </saxon:output>
196
+ </xsl:when>
197
+ <xsl:when test="$doctype-public = '' and $doctype-system != ''">
198
+ <saxon:output saxon:character-representation="{$saxon.character.representation}" href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" media-type="{$media-type}" doctype-system="{$doctype-system}" standalone="{$standalone}">
199
+ <xsl:copy-of select="$content"/>
200
+ </saxon:output>
201
+ </xsl:when>
202
+ <xsl:otherwise><!-- $doctype-public = '' and $doctype-system = ''"> -->
203
+ <saxon:output saxon:character-representation="{$saxon.character.representation}" href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" media-type="{$media-type}" standalone="{$standalone}">
204
+ <xsl:copy-of select="$content"/>
205
+ </saxon:output>
206
+ </xsl:otherwise>
207
+ </xsl:choose>
208
+ </xsl:when>
209
+ <xsl:otherwise>
210
+ <xsl:choose>
211
+ <xsl:when test="$doctype-public != '' and $doctype-system != ''">
212
+ <saxon:output saxon:character-representation="{$saxon.character.representation}" href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" doctype-public="{$doctype-public}" doctype-system="{$doctype-system}" standalone="{$standalone}">
213
+ <xsl:copy-of select="$content"/>
214
+ </saxon:output>
215
+ </xsl:when>
216
+ <xsl:when test="$doctype-public != '' and $doctype-system = ''">
217
+ <saxon:output saxon:character-representation="{$saxon.character.representation}" href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" doctype-public="{$doctype-public}" standalone="{$standalone}">
218
+ <xsl:copy-of select="$content"/>
219
+ </saxon:output>
220
+ </xsl:when>
221
+ <xsl:when test="$doctype-public = '' and $doctype-system != ''">
222
+ <saxon:output saxon:character-representation="{$saxon.character.representation}" href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" doctype-system="{$doctype-system}" standalone="{$standalone}">
223
+ <xsl:copy-of select="$content"/>
224
+ </saxon:output>
225
+ </xsl:when>
226
+ <xsl:otherwise><!-- $doctype-public = '' and $doctype-system = ''"> -->
227
+ <saxon:output saxon:character-representation="{$saxon.character.representation}" href="{$filename}" method="{$method}" encoding="{$encoding}" indent="{$indent}" omit-xml-declaration="{$omit-xml-declaration}" cdata-section-elements="{$cdata-section-elements}" standalone="{$standalone}">
228
+ <xsl:copy-of select="$content"/>
229
+ </saxon:output>
230
+ </xsl:otherwise>
231
+ </xsl:choose>
232
+ </xsl:otherwise>
233
+ </xsl:choose>
234
+ </xsl:when>
235
+
236
+ <xsl:when test="element-available('redirect:write')">
237
+ <!-- Xalan uses redirect -->
238
+ <redirect:write file="{$filename}">
239
+ <xsl:copy-of select="$content"/>
240
+ </redirect:write>
241
+ </xsl:when>
242
+
243
+ <xsl:otherwise>
244
+ <!-- it doesn't matter since we won't be making chunks... -->
245
+ <xsl:message terminate="yes">
246
+ <xsl:text>Can't make chunks with </xsl:text>
247
+ <xsl:value-of select="system-property('xsl:vendor')"/>
248
+ <xsl:text>'s processor.</xsl:text>
249
+ </xsl:message>
250
+ </xsl:otherwise>
251
+ </xsl:choose>
252
+ </xsl:template>
253
+
254
+ <xsl:template name="write.chunk.with.doctype">
255
+ <xsl:param name="filename" select="''"/>
256
+ <xsl:param name="quiet" select="$chunk.quietly"/>
257
+
258
+ <xsl:param name="method" select="$chunker.output.method"/>
259
+ <xsl:param name="encoding" select="$chunker.output.encoding"/>
260
+ <xsl:param name="indent" select="$chunker.output.indent"/>
261
+ <xsl:param name="omit-xml-declaration" select="$chunker.output.omit-xml-declaration"/>
262
+ <xsl:param name="standalone" select="$chunker.output.standalone"/>
263
+ <xsl:param name="doctype-public" select="$chunker.output.doctype-public"/>
264
+ <xsl:param name="doctype-system" select="$chunker.output.doctype-system"/>
265
+ <xsl:param name="media-type" select="$chunker.output.media-type"/>
266
+ <xsl:param name="cdata-section-elements" select="$chunker.output.cdata-section-elements"/>
267
+
268
+ <xsl:param name="content"/>
269
+
270
+ <xsl:call-template name="write.chunk">
271
+ <xsl:with-param name="filename" select="$filename"/>
272
+ <xsl:with-param name="quiet" select="$quiet"/>
273
+ <xsl:with-param name="method" select="$method"/>
274
+ <xsl:with-param name="encoding" select="$encoding"/>
275
+ <xsl:with-param name="indent" select="$indent"/>
276
+ <xsl:with-param name="omit-xml-declaration" select="$omit-xml-declaration"/>
277
+ <xsl:with-param name="standalone" select="$standalone"/>
278
+ <xsl:with-param name="doctype-public" select="$doctype-public"/>
279
+ <xsl:with-param name="doctype-system" select="$doctype-system"/>
280
+ <xsl:with-param name="media-type" select="$media-type"/>
281
+ <xsl:with-param name="cdata-section-elements" select="$cdata-section-elements"/>
282
+ <xsl:with-param name="content" select="$content"/>
283
+ </xsl:call-template>
284
+ </xsl:template>
285
+
286
+ <xsl:template name="write.text.chunk">
287
+ <xsl:param name="filename" select="''"/>
288
+ <xsl:param name="quiet" select="$chunk.quietly"/>
289
+ <xsl:param name="suppress-context-node-name" select="0"/>
290
+ <xsl:param name="message-prolog"/>
291
+ <xsl:param name="message-epilog"/>
292
+ <xsl:param name="method" select="'text'"/>
293
+ <xsl:param name="encoding" select="$chunker.output.encoding"/>
294
+ <xsl:param name="media-type" select="$chunker.output.media-type"/>
295
+ <xsl:param name="content"/>
296
+
297
+ <xsl:call-template name="write.chunk">
298
+ <xsl:with-param name="filename" select="$filename"/>
299
+ <xsl:with-param name="quiet" select="$quiet"/>
300
+ <xsl:with-param name="suppress-context-node-name" select="$suppress-context-node-name"/>
301
+ <xsl:with-param name="message-prolog" select="$message-prolog"/>
302
+ <xsl:with-param name="message-epilog" select="$message-epilog"/>
303
+ <xsl:with-param name="method" select="$method"/>
304
+ <xsl:with-param name="encoding" select="$encoding"/>
305
+ <xsl:with-param name="indent" select="'no'"/>
306
+ <xsl:with-param name="omit-xml-declaration" select="'yes'"/>
307
+ <xsl:with-param name="standalone" select="'no'"/>
308
+ <xsl:with-param name="doctype-public"/>
309
+ <xsl:with-param name="doctype-system"/>
310
+ <xsl:with-param name="media-type" select="$media-type"/>
311
+ <xsl:with-param name="cdata-section-elements"/>
312
+ <xsl:with-param name="content" select="$content"/>
313
+ </xsl:call-template>
314
+ </xsl:template>
315
+
316
+
317
+ </xsl:stylesheet>
@@ -0,0 +1,440 @@
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: component.xsl 9500 2012-07-15 23:24:21Z 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
+ <!-- Set to 2 for backwards compatibility -->
21
+ <xsl:param name="component.heading.level" select="2"/>
22
+
23
+ <xsl:template name="component.title">
24
+ <xsl:param name="node" select="."/>
25
+
26
+ <!-- This handles the case where a component (bibliography, for example)
27
+ occurs inside a section; will we need parameters for this? -->
28
+
29
+ <!-- This "level" is a section level. To compute <h> level, add 1. -->
30
+ <xsl:variable name="level">
31
+ <xsl:choose>
32
+ <!-- chapters and other book children should get <h1> -->
33
+ <xsl:when test="$node/parent::d:book">0</xsl:when>
34
+ <xsl:when test="ancestor::d:section">
35
+ <xsl:value-of select="count(ancestor::d:section)+1"/>
36
+ </xsl:when>
37
+ <xsl:when test="ancestor::d:sect5">6</xsl:when>
38
+ <xsl:when test="ancestor::d:sect4">5</xsl:when>
39
+ <xsl:when test="ancestor::d:sect3">4</xsl:when>
40
+ <xsl:when test="ancestor::d:sect2">3</xsl:when>
41
+ <xsl:when test="ancestor::d:sect1">2</xsl:when>
42
+ <xsl:otherwise>1</xsl:otherwise>
43
+ </xsl:choose>
44
+ </xsl:variable>
45
+
46
+ <xsl:element name="h{$level+1}" namespace="http://www.w3.org/1999/xhtml">
47
+ <xsl:attribute name="class">title</xsl:attribute>
48
+ <xsl:call-template name="anchor">
49
+ <xsl:with-param name="node" select="$node"/>
50
+ <xsl:with-param name="conditional" select="0"/>
51
+ </xsl:call-template>
52
+ <xsl:apply-templates select="$node" mode="object.title.markup">
53
+ <xsl:with-param name="allow-anchors" select="1"/>
54
+ </xsl:apply-templates>
55
+ </xsl:element>
56
+ </xsl:template>
57
+
58
+ <xsl:template name="component.subtitle">
59
+ <xsl:param name="node" select="."/>
60
+ <xsl:variable name="subtitle" select="($node/d:docinfo/d:subtitle |$node/d:info/d:subtitle |$node/d:prefaceinfo/d:subtitle |$node/d:chapterinfo/d:subtitle |$node/d:appendixinfo/d:subtitle |$node/d:articleinfo/d:subtitle |$node/d:artheader/d:subtitle |$node/d:subtitle)[1]"/>
61
+
62
+ <xsl:if test="$subtitle">
63
+ <h3 class="subtitle">
64
+ <xsl:call-template name="id.attribute"/>
65
+ <em xmlns:xslo="http://www.w3.org/1999/XSL/Transform">
66
+ <xsl:apply-templates select="$node" mode="object.subtitle.markup"/>
67
+ </em>
68
+ </h3>
69
+ </xsl:if>
70
+ </xsl:template>
71
+
72
+ <xsl:template name="component.separator">
73
+ </xsl:template>
74
+
75
+ <!-- ==================================================================== -->
76
+
77
+ <xsl:template match="d:dedication" mode="dedication">
78
+ <xsl:call-template name="id.warning"/>
79
+
80
+ <div>
81
+ <xsl:call-template name="common.html.attributes">
82
+ <xsl:with-param name="inherit" select="1"/>
83
+ </xsl:call-template>
84
+ <xsl:call-template name="id.attribute">
85
+ <xsl:with-param name="conditional" select="0"/>
86
+ </xsl:call-template>
87
+ <xsl:call-template name="dedication.titlepage"/>
88
+ <xsl:apply-templates/>
89
+ <xsl:call-template name="process.footnotes"/>
90
+ </div>
91
+ </xsl:template>
92
+
93
+ <xsl:template match="d:dedication/d:title|d:dedication/d:info/d:title" mode="titlepage.mode" priority="2">
94
+ <xsl:call-template name="component.title">
95
+ <xsl:with-param name="node" select="ancestor::d:dedication[1]"/>
96
+ </xsl:call-template>
97
+ </xsl:template>
98
+
99
+ <xsl:template match="d:dedication/d:subtitle|d:dedication/d:info/d:subtitle" mode="titlepage.mode" priority="2">
100
+ <xsl:call-template name="component.subtitle">
101
+ <xsl:with-param name="node" select="ancestor::d:dedication[1]"/>
102
+ </xsl:call-template>
103
+ </xsl:template>
104
+
105
+ <xsl:template match="d:dedication"/> <!-- see mode="dedication" -->
106
+ <xsl:template match="d:dedication/d:title"/>
107
+ <xsl:template match="d:dedication/d:subtitle"/>
108
+ <xsl:template match="d:dedication/d:titleabbrev"/>
109
+
110
+ <!-- ==================================================================== -->
111
+
112
+ <xsl:template match="d:acknowledgements" mode="acknowledgements">
113
+ <xsl:call-template name="id.warning"/>
114
+
115
+ <div>
116
+ <xsl:call-template name="common.html.attributes">
117
+ <xsl:with-param name="inherit" select="1"/>
118
+ </xsl:call-template>
119
+ <xsl:call-template name="id.attribute">
120
+ <xsl:with-param name="conditional" select="0"/>
121
+ </xsl:call-template>
122
+ <xsl:call-template name="acknowledgements.titlepage"/>
123
+ <xsl:apply-templates/>
124
+ <xsl:call-template name="process.footnotes"/>
125
+ </div>
126
+ </xsl:template>
127
+
128
+ <xsl:template match="d:acknowledgements/d:title|d:acknowledgements/d:info/d:title" mode="titlepage.mode" priority="2">
129
+ <xsl:call-template name="component.title">
130
+ <xsl:with-param name="node" select="ancestor::d:acknowledgements[1]"/>
131
+ </xsl:call-template>
132
+ </xsl:template>
133
+
134
+ <xsl:template match="d:acknowledgements/d:subtitle|d:acknowledgements/d:info/d:subtitle" mode="titlepage.mode" priority="2">
135
+ <xsl:call-template name="component.subtitle">
136
+ <xsl:with-param name="node" select="ancestor::d:acknowledgements[1]"/>
137
+ </xsl:call-template>
138
+ </xsl:template>
139
+
140
+ <xsl:template match="d:acknowledgements"/> <!-- see mode="acknowledgements" -->
141
+ <xsl:template match="d:acknowledgements/d:title"/>
142
+ <xsl:template match="d:acknowledgements/d:subtitle"/>
143
+ <xsl:template match="d:acknowledgements/d:titleabbrev"/>
144
+
145
+ <!-- ==================================================================== -->
146
+
147
+ <xsl:template match="d:colophon">
148
+ <xsl:call-template name="id.warning"/>
149
+
150
+ <div>
151
+ <xsl:call-template name="common.html.attributes">
152
+ <xsl:with-param name="inherit" select="1"/>
153
+ </xsl:call-template>
154
+ <xsl:call-template name="id.attribute">
155
+ <xsl:with-param name="conditional" select="0"/>
156
+ </xsl:call-template>
157
+
158
+ <xsl:call-template name="component.separator"/>
159
+ <xsl:call-template name="component.title"/>
160
+ <xsl:call-template name="component.subtitle"/>
161
+
162
+ <xsl:apply-templates/>
163
+ <xsl:call-template name="process.footnotes"/>
164
+ </div>
165
+ </xsl:template>
166
+
167
+ <xsl:template match="d:colophon/d:title"/>
168
+ <xsl:template match="d:colophon/d:subtitle"/>
169
+ <xsl:template match="d:colophon/d:titleabbrev"/>
170
+
171
+ <!-- ==================================================================== -->
172
+
173
+ <xsl:template match="d:preface">
174
+ <xsl:call-template name="id.warning"/>
175
+
176
+ <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml">
177
+ <xsl:call-template name="common.html.attributes">
178
+ <xsl:with-param name="inherit" select="1"/>
179
+ </xsl:call-template>
180
+ <xsl:call-template name="id.attribute">
181
+ <xsl:with-param name="conditional" select="0"/>
182
+ </xsl:call-template>
183
+
184
+ <xsl:call-template name="component.separator"/>
185
+ <xsl:call-template name="preface.titlepage"/>
186
+
187
+ <xsl:variable name="toc.params">
188
+ <xsl:call-template name="find.path.params">
189
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
190
+ </xsl:call-template>
191
+ </xsl:variable>
192
+
193
+ <xsl:if test="contains($toc.params, 'toc')">
194
+ <xsl:call-template name="component.toc">
195
+ <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
196
+ </xsl:call-template>
197
+ <xsl:call-template name="component.toc.separator"/>
198
+ </xsl:if>
199
+ <xsl:apply-templates/>
200
+ <xsl:call-template name="process.footnotes"/>
201
+ </xsl:element>
202
+ </xsl:template>
203
+
204
+ <xsl:template match="d:preface/d:title" mode="titlepage.mode" priority="2">
205
+ <xsl:call-template name="component.title">
206
+ <xsl:with-param name="node" select="ancestor::d:preface[1]"/>
207
+ </xsl:call-template>
208
+ </xsl:template>
209
+
210
+ <xsl:template match="d:preface/d:subtitle |d:preface/d:prefaceinfo/d:subtitle |d:preface/d:info/d:subtitle |d:preface/d:docinfo/d:subtitle" mode="titlepage.mode" priority="2">
211
+ <xsl:call-template name="component.subtitle">
212
+ <xsl:with-param name="node" select="ancestor::d:preface[1]"/>
213
+ </xsl:call-template>
214
+ </xsl:template>
215
+
216
+ <xsl:template match="d:preface/d:docinfo|d:prefaceinfo"/>
217
+ <xsl:template match="d:preface/d:info"/>
218
+ <xsl:template match="d:preface/d:title"/>
219
+ <xsl:template match="d:preface/d:titleabbrev"/>
220
+ <xsl:template match="d:preface/d:subtitle"/>
221
+
222
+ <!-- ==================================================================== -->
223
+
224
+ <xsl:template match="d:chapter">
225
+ <xsl:call-template name="id.warning"/>
226
+
227
+ <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml">
228
+ <xsl:call-template name="common.html.attributes">
229
+ <xsl:with-param name="inherit" select="1"/>
230
+ </xsl:call-template>
231
+ <xsl:call-template name="id.attribute">
232
+ <xsl:with-param name="conditional" select="0"/>
233
+ </xsl:call-template>
234
+
235
+ <xsl:call-template name="component.separator"/>
236
+ <xsl:call-template name="chapter.titlepage"/>
237
+
238
+ <xsl:variable name="toc.params">
239
+ <xsl:call-template name="find.path.params">
240
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
241
+ </xsl:call-template>
242
+ </xsl:variable>
243
+ <xsl:if test="contains($toc.params, 'toc')">
244
+ <xsl:call-template name="component.toc">
245
+ <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
246
+ </xsl:call-template>
247
+ <xsl:call-template name="component.toc.separator"/>
248
+ </xsl:if>
249
+ <xsl:apply-templates/>
250
+ <xsl:call-template name="process.footnotes"/>
251
+ </xsl:element>
252
+ </xsl:template>
253
+
254
+ <xsl:template match="d:chapter/d:title|d:chapter/d:chapterinfo/d:title|d:chapter/d:info/d:title" mode="titlepage.mode" priority="2">
255
+ <xsl:call-template name="component.title">
256
+ <xsl:with-param name="node" select="ancestor::d:chapter[1]"/>
257
+ </xsl:call-template>
258
+ </xsl:template>
259
+
260
+ <xsl:template match="d:chapter/d:subtitle |d:chapter/d:chapterinfo/d:subtitle |d:chapter/d:info/d:subtitle |d:chapter/d:docinfo/d:subtitle" mode="titlepage.mode" priority="2">
261
+ <xsl:call-template name="component.subtitle">
262
+ <xsl:with-param name="node" select="ancestor::d:chapter[1]"/>
263
+ </xsl:call-template>
264
+ </xsl:template>
265
+
266
+ <xsl:template match="d:chapter/d:docinfo|d:chapterinfo"/>
267
+ <xsl:template match="d:chapter/d:info"/>
268
+ <xsl:template match="d:chapter/d:title"/>
269
+ <xsl:template match="d:chapter/d:titleabbrev"/>
270
+ <xsl:template match="d:chapter/d:subtitle"/>
271
+
272
+ <!-- ==================================================================== -->
273
+
274
+ <xsl:template match="d:appendix">
275
+ <xsl:variable name="ischunk">
276
+ <xsl:call-template name="chunk"/>
277
+ </xsl:variable>
278
+
279
+ <xsl:call-template name="id.warning"/>
280
+
281
+ <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml">
282
+ <xsl:call-template name="common.html.attributes">
283
+ <xsl:with-param name="inherit" select="1"/>
284
+ </xsl:call-template>
285
+ <xsl:call-template name="id.attribute">
286
+ <xsl:with-param name="conditional" select="0"/>
287
+ </xsl:call-template>
288
+
289
+ <xsl:choose>
290
+ <xsl:when test="parent::d:article and $ischunk = 0">
291
+ <xsl:call-template name="section.heading">
292
+ <xsl:with-param name="level" select="1"/>
293
+ <xsl:with-param name="title">
294
+ <xsl:apply-templates select="." mode="object.title.markup"/>
295
+ </xsl:with-param>
296
+ </xsl:call-template>
297
+ </xsl:when>
298
+ <xsl:otherwise>
299
+ <xsl:call-template name="component.separator"/>
300
+ <xsl:call-template name="appendix.titlepage"/>
301
+ </xsl:otherwise>
302
+ </xsl:choose>
303
+
304
+ <xsl:variable name="toc.params">
305
+ <xsl:call-template name="find.path.params">
306
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
307
+ </xsl:call-template>
308
+ </xsl:variable>
309
+
310
+ <xsl:if test="contains($toc.params, 'toc')">
311
+ <xsl:call-template name="component.toc">
312
+ <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
313
+ </xsl:call-template>
314
+ <xsl:call-template name="component.toc.separator"/>
315
+ </xsl:if>
316
+
317
+ <xsl:apply-templates/>
318
+
319
+ <xsl:if test="not(parent::d:article) or $ischunk != 0">
320
+ <xsl:call-template name="process.footnotes"/>
321
+ </xsl:if>
322
+ </xsl:element>
323
+ </xsl:template>
324
+
325
+ <xsl:template match="d:appendix/d:title|d:appendix/d:appendixinfo/d:title" mode="titlepage.mode" priority="2">
326
+ <xsl:call-template name="component.title">
327
+ <xsl:with-param name="node" select="ancestor::d:appendix[1]"/>
328
+ </xsl:call-template>
329
+ </xsl:template>
330
+
331
+ <xsl:template match="d:appendix/d:subtitle |d:appendix/d:appendixinfo/d:subtitle |d:appendix/d:info/d:subtitle |d:appendix/d:docinfo/d:subtitle" mode="titlepage.mode" priority="2">
332
+ <xsl:call-template name="component.subtitle">
333
+ <xsl:with-param name="node" select="ancestor::d:appendix[1]"/>
334
+ </xsl:call-template>
335
+ </xsl:template>
336
+
337
+ <xsl:template match="d:appendix/d:docinfo|d:appendixinfo"/>
338
+ <xsl:template match="d:appendix/d:info"/>
339
+ <xsl:template match="d:appendix/d:title"/>
340
+ <xsl:template match="d:appendix/d:titleabbrev"/>
341
+ <xsl:template match="d:appendix/d:subtitle"/>
342
+
343
+ <!-- ==================================================================== -->
344
+
345
+ <xsl:template match="d:article">
346
+ <xsl:call-template name="id.warning"/>
347
+
348
+ <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml">
349
+ <xsl:call-template name="common.html.attributes">
350
+ <xsl:with-param name="inherit" select="1"/>
351
+ </xsl:call-template>
352
+ <xsl:call-template name="id.attribute">
353
+ <xsl:with-param name="conditional" select="0"/>
354
+ </xsl:call-template>
355
+
356
+ <xsl:call-template name="article.titlepage"/>
357
+
358
+ <xsl:variable name="toc.params">
359
+ <xsl:call-template name="find.path.params">
360
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
361
+ </xsl:call-template>
362
+ </xsl:variable>
363
+
364
+ <xsl:call-template name="make.lots">
365
+ <xsl:with-param name="toc.params" select="$toc.params"/>
366
+ <xsl:with-param name="toc">
367
+ <xsl:call-template name="component.toc">
368
+ <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
369
+ </xsl:call-template>
370
+ </xsl:with-param>
371
+ </xsl:call-template>
372
+
373
+ <xsl:apply-templates/>
374
+ <xsl:call-template name="process.footnotes"/>
375
+ </xsl:element>
376
+ </xsl:template>
377
+
378
+ <xsl:template match="d:article/d:title|d:article/d:articleinfo/d:title" mode="titlepage.mode" priority="2">
379
+ <xsl:call-template name="component.title">
380
+ <xsl:with-param name="node" select="ancestor::d:article[1]"/>
381
+ </xsl:call-template>
382
+ </xsl:template>
383
+
384
+ <xsl:template match="d:article/d:subtitle |d:article/d:articleinfo/d:subtitle |d:article/d:info/d:subtitle |d:article/d:artheader/d:subtitle" mode="titlepage.mode" priority="2">
385
+ <xsl:call-template name="component.subtitle">
386
+ <xsl:with-param name="node" select="ancestor::d:article[1]"/>
387
+ </xsl:call-template>
388
+ </xsl:template>
389
+
390
+ <xsl:template match="d:article/d:artheader|d:article/d:articleinfo"/>
391
+ <xsl:template match="d:article/d:info"/>
392
+ <xsl:template match="d:article/d:title"/>
393
+ <xsl:template match="d:article/d:titleabbrev"/>
394
+ <xsl:template match="d:article/d:subtitle"/>
395
+
396
+ <!-- ==================================================================== -->
397
+
398
+ <xsl:template match="d:topic">
399
+ <xsl:call-template name="id.warning"/>
400
+
401
+ <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml">
402
+ <xsl:call-template name="common.html.attributes">
403
+ <xsl:with-param name="inherit" select="1"/>
404
+ </xsl:call-template>
405
+ <xsl:call-template name="id.attribute">
406
+ <xsl:with-param name="conditional" select="0"/>
407
+ </xsl:call-template>
408
+
409
+ <xsl:call-template name="topic.titlepage"/>
410
+
411
+ <xsl:variable name="toc.params">
412
+ <xsl:call-template name="find.path.params">
413
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
414
+ </xsl:call-template>
415
+ </xsl:variable>
416
+
417
+ <xsl:apply-templates/>
418
+
419
+ <xsl:call-template name="process.footnotes"/>
420
+ </xsl:element>
421
+ </xsl:template>
422
+
423
+ <xsl:template match="d:topic/d:title|d:topic/d:info/d:title" mode="titlepage.mode" priority="2">
424
+ <xsl:call-template name="component.title">
425
+ <xsl:with-param name="node" select="ancestor::d:topic[1]"/>
426
+ </xsl:call-template>
427
+ </xsl:template>
428
+
429
+ <xsl:template match="d:topic/d:subtitle |d:topic/d:info/d:subtitle" mode="titlepage.mode" priority="2">
430
+ <xsl:call-template name="component.subtitle">
431
+ <xsl:with-param name="node" select="ancestor::d:topic[1]"/>
432
+ </xsl:call-template>
433
+ </xsl:template>
434
+
435
+ <xsl:template match="d:topic/d:info"/>
436
+ <xsl:template match="d:topic/d:title"/>
437
+ <xsl:template match="d:topic/d:titleabbrev"/>
438
+ <xsl:template match="d:topic/d:subtitle"/>
439
+
440
+ </xsl:stylesheet>