xhtml-docbook.xsl 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541
  1. <?xml version="1.0"?>
  2. <!--This file was created automatically by xhtml2xhtml5.xsl from the xhtml stylesheet.-->
  3. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ng="http://docbook.org/docbook-ng" xmlns:db="http://docbook.org/ns/docbook" xmlns:exsl="http://exslt.org/common" xmlns:exslt="http://exslt.org/common" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="db ng exsl exslt" version="1.0">
  4. <!--Same as xhtml but with doctypes removed from xsl:output -->
  5. <!--and including from ../xhtml directory -->
  6. <xslo:output xmlns:xslo="http://www.w3.org/1999/XSL/Transform" method="xml" encoding="UTF-8" indent="no"/>
  7. <!-- ********************************************************************
  8. $Id: docbook.xsl 9605 2012-09-18 10:48:54Z tom_schr $
  9. ********************************************************************
  10. This file is part of the XSL DocBook Stylesheet distribution.
  11. See ../README or http://docbook.sf.net/release/xsl/current/ for
  12. copyright and other information.
  13. ******************************************************************** -->
  14. <!-- ==================================================================== -->
  15. <xsl:include href="../VERSION.xsl"/>
  16. <xsl:include href="../xhtml/param.xsl"/>
  17. <xsl:include href="../lib/lib.xsl"/>
  18. <xsl:include href="../common/l10n.xsl"/>
  19. <xsl:include href="../common/common.xsl"/>
  20. <xsl:include href="../common/utility.xsl"/>
  21. <xsl:include href="../common/labels.xsl"/>
  22. <xsl:include href="../common/titles.xsl"/>
  23. <xsl:include href="../common/subtitles.xsl"/>
  24. <xsl:include href="../common/gentext.xsl"/>
  25. <xsl:include href="../common/targets.xsl"/>
  26. <xsl:include href="../common/olink.xsl"/>
  27. <xsl:include href="../common/pi.xsl"/>
  28. <xsl:include href="../xhtml/autotoc.xsl"/>
  29. <xsl:include href="../xhtml/autoidx.xsl"/>
  30. <xsl:include href="../xhtml/lists.xsl"/>
  31. <xsl:include href="../xhtml/callout.xsl"/>
  32. <xsl:include href="../xhtml/verbatim.xsl"/>
  33. <xsl:include href="../xhtml/graphics.xsl"/>
  34. <xsl:include href="../xhtml/xref.xsl"/>
  35. <xsl:include href="../xhtml/formal.xsl"/>
  36. <xsl:include href="../xhtml/table.xsl"/>
  37. <xsl:include href="../xhtml/htmltbl.xsl"/>
  38. <xsl:include href="../xhtml/sections.xsl"/>
  39. <xsl:include href="../xhtml/inline.xsl"/>
  40. <xsl:include href="../xhtml/footnote.xsl"/>
  41. <xsl:include href="../xhtml/html.xsl"/>
  42. <xsl:include href="../xhtml/info.xsl"/>
  43. <xsl:include href="../xhtml/keywords.xsl"/>
  44. <xsl:include href="../xhtml/division.xsl"/>
  45. <xsl:include href="../xhtml/toc.xsl"/>
  46. <xsl:include href="../xhtml/index.xsl"/>
  47. <xsl:include href="../xhtml/refentry.xsl"/>
  48. <xsl:include href="../xhtml/math.xsl"/>
  49. <xsl:include href="../xhtml/admon.xsl"/>
  50. <xsl:include href="../xhtml/component.xsl"/>
  51. <xsl:include href="../xhtml/biblio.xsl"/>
  52. <xsl:include href="../xhtml/biblio-iso690.xsl"/>
  53. <xsl:include href="../xhtml/glossary.xsl"/>
  54. <xsl:include href="../xhtml/block.xsl"/>
  55. <xsl:include href="../xhtml/task.xsl"/>
  56. <xsl:include href="../xhtml/qandaset.xsl"/>
  57. <xsl:include href="../xhtml/synop.xsl"/>
  58. <xsl:include href="../xhtml/titlepage.xsl"/>
  59. <xsl:include href="../xhtml/titlepage.templates.xsl"/>
  60. <xsl:include href="../xhtml/pi.xsl"/>
  61. <xsl:include href="../xhtml/ebnf.xsl"/>
  62. <xsl:include href="../xhtml/chunker.xsl"/>
  63. <xsl:include href="../xhtml/html-rtf.xsl"/>
  64. <xsl:include href="../xhtml/annotations.xsl"/>
  65. <xsl:include href="../common/stripns.xsl"/>
  66. <xsl:param name="stylesheet.result.type" select="'xhtml'"/>
  67. <xsl:param name="htmlhelp.output" select="0"/>
  68. <!-- ==================================================================== -->
  69. <xsl:key name="id" match="*" use="@id|@xml:id"/>
  70. <xsl:key name="gid" match="*" use="generate-id()"/>
  71. <!-- ==================================================================== -->
  72. <xsl:template match="*">
  73. <xsl:message>
  74. <xsl:text>Element </xsl:text>
  75. <xsl:value-of select="local-name(.)"/>
  76. <xsl:text> in namespace '</xsl:text>
  77. <xsl:value-of select="namespace-uri(.)"/>
  78. <xsl:text>' encountered</xsl:text>
  79. <xsl:if test="parent::*">
  80. <xsl:text> in </xsl:text>
  81. <xsl:value-of select="name(parent::*)"/>
  82. </xsl:if>
  83. <xsl:text>, but no template matches.</xsl:text>
  84. </xsl:message>
  85. <span style="color: red">
  86. <xsl:text>&lt;</xsl:text>
  87. <xsl:value-of select="name(.)"/>
  88. <xsl:text>&gt;</xsl:text>
  89. <xsl:apply-templates/>
  90. <xsl:text>&lt;/</xsl:text>
  91. <xsl:value-of select="name(.)"/>
  92. <xsl:text>&gt;</xsl:text>
  93. </span>
  94. </xsl:template>
  95. <xsl:template match="text()">
  96. <xsl:value-of select="."/>
  97. </xsl:template>
  98. <xsl:template name="body.attributes"><xslo:if xmlns:xslo="http://www.w3.org/1999/XSL/Transform" test="starts-with($writing.mode, 'rl')"><xslo:attribute name="dir">rtl</xslo:attribute></xslo:if>
  99. <!-- no apply-templates; make it empty except for dir for rtl-->
  100. </xsl:template>
  101. <xsl:template name="head.content.base">
  102. <xsl:param name="node" select="."/>
  103. <base href="{$html.base}"/>
  104. </xsl:template>
  105. <xsl:template name="head.content.abstract">
  106. <xsl:param name="node" select="."/>
  107. <xsl:variable name="info" select="(articleinfo |bookinfo |prefaceinfo |chapterinfo |appendixinfo |sectioninfo |sect1info |sect2info |sect3info |sect4info |sect5info |referenceinfo |refentryinfo |partinfo |info |docinfo)[1]"/>
  108. <xsl:if test="$info and $info/abstract">
  109. <meta name="description">
  110. <xsl:attribute name="content">
  111. <xsl:for-each select="$info/abstract[1]/*">
  112. <xsl:value-of select="normalize-space(.)"/>
  113. <xsl:if test="position() &lt; last()">
  114. <xsl:text> </xsl:text>
  115. </xsl:if>
  116. </xsl:for-each>
  117. </xsl:attribute>
  118. </meta>
  119. </xsl:if>
  120. </xsl:template>
  121. <xsl:template name="head.content.link.made">
  122. <xsl:param name="node" select="."/>
  123. <link rev="made" href="{$link.mailto.url}"/>
  124. </xsl:template>
  125. <xsl:template name="head.content.generator">
  126. <xsl:param name="node" select="."/>
  127. <meta name="generator" content="DocBook {$DistroTitle} V{$VERSION}"/>
  128. </xsl:template>
  129. <xsl:template name="head.content.style">
  130. <xsl:param name="node" select="."/>
  131. <style type="text/css"><xsl:text>
  132. body { background-image: url('</xsl:text>
  133. <xsl:value-of select="$draft.watermark.image"/><xsl:text>');
  134. background-repeat: no-repeat;
  135. background-position: top left;
  136. /* The following properties make the watermark "fixed" on the page. */
  137. /* I think that's just a bit too distracting for the reader... */
  138. /* background-attachment: fixed; */
  139. /* background-position: center center; */
  140. }</xsl:text>
  141. </style>
  142. </xsl:template>
  143. <xsl:template name="head.content">
  144. <xsl:param name="node" select="."/>
  145. <xsl:param name="title">
  146. <xsl:apply-templates select="$node" mode="object.title.markup.textonly"/>
  147. </xsl:param>
  148. <xsl:call-template name="user.head.title">
  149. <xsl:with-param name="title" select="$title"/>
  150. <xsl:with-param name="node" select="$node"/>
  151. </xsl:call-template>
  152. <xsl:if test="$html.base != ''">
  153. <xsl:call-template name="head.content.base">
  154. <xsl:with-param name="node" select="$node"/>
  155. </xsl:call-template>
  156. </xsl:if>
  157. <!-- Insert links to CSS files or insert literal style elements -->
  158. <xsl:call-template name="generate.css"/>
  159. <xsl:if test="$html.stylesheet != ''">
  160. <xsl:call-template name="output.html.stylesheets">
  161. <xsl:with-param name="stylesheets" select="normalize-space($html.stylesheet)"/>
  162. </xsl:call-template>
  163. </xsl:if>
  164. <xsl:if test="$html.script != ''">
  165. <xsl:call-template name="output.html.scripts">
  166. <xsl:with-param name="scripts" select="normalize-space($html.script)"/>
  167. </xsl:call-template>
  168. </xsl:if>
  169. <xsl:if test="$link.mailto.url != ''">
  170. <xsl:call-template name="head.content.link.made">
  171. <xsl:with-param name="node" select="$node"/>
  172. </xsl:call-template>
  173. </xsl:if>
  174. <xsl:call-template name="head.content.generator">
  175. <xsl:with-param name="node" select="$node"/>
  176. </xsl:call-template>
  177. <xsl:if test="$generate.meta.abstract != 0">
  178. <xsl:call-template name="head.content.abstract">
  179. <xsl:with-param name="node" select="$node"/>
  180. </xsl:call-template>
  181. </xsl:if>
  182. <xsl:if test="($draft.mode = 'yes' or ($draft.mode = 'maybe' and ancestor-or-self::*[@status][1]/@status = 'draft')) and $draft.watermark.image != ''">
  183. <xsl:call-template name="head.content.style">
  184. <xsl:with-param name="node" select="$node"/>
  185. </xsl:call-template>
  186. </xsl:if>
  187. <xsl:apply-templates select="." mode="head.keywords.content"/>
  188. </xsl:template>
  189. <xsl:template name="output.html.stylesheets">
  190. <xsl:param name="stylesheets" select="''"/>
  191. <xsl:choose>
  192. <xsl:when test="contains($stylesheets, ' ')">
  193. <xsl:variable name="css.filename" select="substring-before($stylesheets, ' ')"/>
  194. <xsl:call-template name="make.css.link">
  195. <xsl:with-param name="css.filename" select="$css.filename"/>
  196. </xsl:call-template>
  197. <xsl:call-template name="output.html.stylesheets">
  198. <xsl:with-param name="stylesheets" select="substring-after($stylesheets, ' ')"/>
  199. </xsl:call-template>
  200. </xsl:when>
  201. <xsl:when test="$stylesheets != ''">
  202. <xsl:call-template name="make.css.link">
  203. <xsl:with-param name="css.filename" select="$stylesheets"/>
  204. </xsl:call-template>
  205. </xsl:when>
  206. </xsl:choose>
  207. </xsl:template>
  208. <xsl:template name="output.html.scripts">
  209. <xsl:param name="scripts" select="''"/>
  210. <xsl:choose>
  211. <xsl:when test="contains($scripts, ' ')">
  212. <xsl:variable name="script.filename" select="substring-before($scripts, ' ')"/>
  213. <xsl:call-template name="make.script.link">
  214. <xsl:with-param name="script.filename" select="$script.filename"/>
  215. </xsl:call-template>
  216. <xsl:call-template name="output.html.scripts">
  217. <xsl:with-param name="scripts" select="substring-after($scripts, ' ')"/>
  218. </xsl:call-template>
  219. </xsl:when>
  220. <xsl:when test="$scripts != ''">
  221. <xsl:call-template name="make.script.link">
  222. <xsl:with-param name="script.filename" select="$scripts"/>
  223. </xsl:call-template>
  224. </xsl:when>
  225. </xsl:choose>
  226. </xsl:template>
  227. <!-- ============================================================ -->
  228. <xsl:template match="*" mode="head.keywords.content">
  229. <xsl:apply-templates select="chapterinfo/keywordset" mode="html.header"/>
  230. <xsl:apply-templates select="appendixinfo/keywordset" mode="html.header"/>
  231. <xsl:apply-templates select="prefaceinfo/keywordset" mode="html.header"/>
  232. <xsl:apply-templates select="bookinfo/keywordset" mode="html.header"/>
  233. <xsl:apply-templates select="setinfo/keywordset" mode="html.header"/>
  234. <xsl:apply-templates select="articleinfo/keywordset" mode="html.header"/>
  235. <xsl:apply-templates select="artheader/keywordset" mode="html.header"/>
  236. <xsl:apply-templates select="sect1info/keywordset" mode="html.header"/>
  237. <xsl:apply-templates select="sect2info/keywordset" mode="html.header"/>
  238. <xsl:apply-templates select="sect3info/keywordset" mode="html.header"/>
  239. <xsl:apply-templates select="sect4info/keywordset" mode="html.header"/>
  240. <xsl:apply-templates select="sect5info/keywordset" mode="html.header"/>
  241. <xsl:apply-templates select="sectioninfo/keywordset" mode="html.header"/>
  242. <xsl:apply-templates select="refsect1info/keywordset" mode="html.header"/>
  243. <xsl:apply-templates select="refsect2info/keywordset" mode="html.header"/>
  244. <xsl:apply-templates select="refsect3info/keywordset" mode="html.header"/>
  245. <xsl:apply-templates select="bibliographyinfo/keywordset" mode="html.header"/>
  246. <xsl:apply-templates select="glossaryinfo/keywordset" mode="html.header"/>
  247. <xsl:apply-templates select="indexinfo/keywordset" mode="html.header"/>
  248. <xsl:apply-templates select="refentryinfo/keywordset" mode="html.header"/>
  249. <xsl:apply-templates select="partinfo/keywordset" mode="html.header"/>
  250. <xsl:apply-templates select="referenceinfo/keywordset" mode="html.header"/>
  251. <xsl:apply-templates select="docinfo/keywordset" mode="html.header"/>
  252. <xsl:apply-templates select="info/keywordset" mode="html.header"/>
  253. <xsl:if test="$inherit.keywords != 0 and parent::*">
  254. <xsl:apply-templates select="parent::*" mode="head.keywords.content"/>
  255. </xsl:if>
  256. </xsl:template>
  257. <!-- ============================================================ -->
  258. <xsl:template name="system.head.content">
  259. <xsl:param name="node" select="."/>
  260. <!-- FIXME: When chunking, only the annotations actually used
  261. in this chunk should be referenced. I don't think it
  262. does any harm to reference them all, but it adds
  263. unnecessary bloat to each chunk. -->
  264. <xsl:if test="$annotation.support != 0 and //annotation">
  265. <xsl:call-template name="add.annotation.links"/>
  266. <script type="text/javascript">
  267. <xsl:text>
  268. // Create PopupWindow objects</xsl:text>
  269. <xsl:for-each select="//annotation">
  270. <xsl:text>
  271. var popup_</xsl:text>
  272. <xsl:value-of select="generate-id(.)"/>
  273. <xsl:text> = new PopupWindow("popup-</xsl:text>
  274. <xsl:value-of select="generate-id(.)"/>
  275. <xsl:text>");
  276. </xsl:text>
  277. <xsl:text>popup_</xsl:text>
  278. <xsl:value-of select="generate-id(.)"/>
  279. <xsl:text>.offsetY = 15;
  280. </xsl:text>
  281. <xsl:text>popup_</xsl:text>
  282. <xsl:value-of select="generate-id(.)"/>
  283. <xsl:text>.autoHide();
  284. </xsl:text>
  285. </xsl:for-each>
  286. </script>
  287. <style type="text/css">
  288. <xsl:value-of select="$annotation.css"/>
  289. </style>
  290. </xsl:if>
  291. <!-- system.head.content is like user.head.content, except that
  292. it is called before head.content. This is important because it
  293. means, for example, that <style> elements output by system.head.content
  294. have a lower CSS precedence than the users stylesheet. -->
  295. </xsl:template>
  296. <!-- ============================================================ -->
  297. <xsl:template name="user.preroot">
  298. <!-- Pre-root output, can be used to output comments and PIs. -->
  299. <!-- This must not output any element content! -->
  300. </xsl:template>
  301. <xsl:template name="user.head.title">
  302. <xsl:param name="node" select="."/>
  303. <xsl:param name="title"/>
  304. <title>
  305. <xsl:copy-of select="$title"/>
  306. </title>
  307. </xsl:template>
  308. <xsl:template name="user.head.content">
  309. <xsl:param name="node" select="."/>
  310. </xsl:template>
  311. <xsl:template name="user.header.navigation">
  312. <xsl:param name="node" select="."/>
  313. <xsl:param name="prev" select="/foo"/>
  314. <xsl:param name="next" select="/foo"/>
  315. <xsl:param name="nav.context"/>
  316. </xsl:template>
  317. <xsl:template name="user.header.content">
  318. <xsl:param name="node" select="."/>
  319. </xsl:template>
  320. <xsl:template name="user.footer.content">
  321. <xsl:param name="node" select="."/>
  322. </xsl:template>
  323. <xsl:template name="user.footer.navigation">
  324. <xsl:param name="node" select="."/>
  325. <xsl:param name="prev" select="/foo"/>
  326. <xsl:param name="next" select="/foo"/>
  327. <xsl:param name="nav.context"/>
  328. </xsl:template>
  329. <!-- To use the same stripped nodeset everywhere, it should
  330. be created as a global variable here.
  331. Used by docbook.xsl, chunk-code.xsl and chunkfast.xsl -->
  332. <xsl:variable name="no.namespace">
  333. <xsl:if test="$exsl.node.set.available != 0 and (*/self::ng:* or */self::db:*)">
  334. <xsl:apply-templates select="/*" mode="stripNS"/>
  335. </xsl:if>
  336. </xsl:variable>
  337. <xsl:template match="/">
  338. <!-- * Get a title for current doc so that we let the user -->
  339. <!-- * know what document we are processing at this point. -->
  340. <xsl:variable name="doc.title">
  341. <xsl:call-template name="get.doc.title"/>
  342. </xsl:variable>
  343. <xsl:choose>
  344. <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document,
  345. toss the namespace and continue. Use the docbook5 namespaced
  346. stylesheets for DocBook5 if you don't want to use this feature.-->
  347. <!-- include extra test for Xalan quirk -->
  348. <xsl:when test="$exsl.node.set.available != 0 and (*/self::ng:* or */self::db:*)">
  349. <xsl:call-template name="log.message">
  350. <xsl:with-param name="level">Note</xsl:with-param>
  351. <xsl:with-param name="source" select="$doc.title"/>
  352. <xsl:with-param name="context-desc">
  353. <xsl:text>namesp. cut</xsl:text>
  354. </xsl:with-param>
  355. <xsl:with-param name="message">
  356. <xsl:text>stripped namespace before processing</xsl:text>
  357. </xsl:with-param>
  358. </xsl:call-template>
  359. <!-- DEBUG: to save stripped document.
  360. <xsl:message>Saving stripped document.</xsl:message>
  361. <xsl:call-template name="write.chunk">
  362. <xsl:with-param name="filename" select="'/tmp/stripped.xml'"/>
  363. <xsl:with-param name="method" select="'xml'"/>
  364. <xsl:with-param name="content">
  365. <xsl:copy-of select="exsl:node-set($no.namespace)"/>
  366. </xsl:with-param>
  367. </xsl:call-template>
  368. -->
  369. <xsl:call-template name="log.message">
  370. <xsl:with-param name="level">Note</xsl:with-param>
  371. <xsl:with-param name="source" select="$doc.title"/>
  372. <xsl:with-param name="context-desc">
  373. <xsl:text>namesp. cut</xsl:text>
  374. </xsl:with-param>
  375. <xsl:with-param name="message">
  376. <xsl:text>processing stripped document</xsl:text>
  377. </xsl:with-param>
  378. </xsl:call-template>
  379. <xsl:apply-templates select="exsl:node-set($no.namespace)"/>
  380. </xsl:when>
  381. <!-- Can't process unless namespace removed -->
  382. <xsl:when test="*/self::ng:* or */self::db:*">
  383. <xsl:message terminate="yes">
  384. <xsl:text>Unable to strip the namespace from DB5 document,</xsl:text>
  385. <xsl:text> cannot proceed.</xsl:text>
  386. </xsl:message>
  387. </xsl:when>
  388. <xsl:otherwise>
  389. <xsl:choose>
  390. <xsl:when test="$rootid != ''">
  391. <xsl:choose>
  392. <xsl:when test="count(key('id',$rootid)) = 0">
  393. <xsl:message terminate="yes">
  394. <xsl:text>ID '</xsl:text>
  395. <xsl:value-of select="$rootid"/>
  396. <xsl:text>' not found in document.</xsl:text>
  397. </xsl:message>
  398. </xsl:when>
  399. <xsl:otherwise>
  400. <xsl:if test="$collect.xref.targets = 'yes' or $collect.xref.targets = 'only'">
  401. <xsl:apply-templates select="key('id', $rootid)" mode="collect.targets"/>
  402. </xsl:if>
  403. <xsl:if test="$collect.xref.targets != 'only'">
  404. <xsl:apply-templates select="key('id',$rootid)" mode="process.root"/>
  405. <xsl:if test="$tex.math.in.alt != ''">
  406. <xsl:apply-templates select="key('id',$rootid)" mode="collect.tex.math"/>
  407. </xsl:if>
  408. </xsl:if>
  409. </xsl:otherwise>
  410. </xsl:choose>
  411. </xsl:when>
  412. <xsl:otherwise>
  413. <xsl:if test="$collect.xref.targets = 'yes' or $collect.xref.targets = 'only'">
  414. <xsl:apply-templates select="/" mode="collect.targets"/>
  415. </xsl:if>
  416. <xsl:if test="$collect.xref.targets != 'only'">
  417. <xsl:apply-templates select="/" mode="process.root"/>
  418. <xsl:if test="$tex.math.in.alt != ''">
  419. <xsl:apply-templates select="/" mode="collect.tex.math"/>
  420. </xsl:if>
  421. </xsl:if>
  422. </xsl:otherwise>
  423. </xsl:choose>
  424. </xsl:otherwise>
  425. </xsl:choose>
  426. </xsl:template>
  427. <xsl:template match="*" mode="process.root">
  428. <xsl:variable name="doc" select="self::*"/>
  429. <xsl:call-template name="user.preroot"/>
  430. <xsl:call-template name="root.messages"/>
  431. <html>
  432. <xsl:call-template name="root.attributes"/>
  433. <head>
  434. <xsl:call-template name="system.head.content">
  435. <xsl:with-param name="node" select="$doc"/>
  436. </xsl:call-template>
  437. <xsl:call-template name="head.content">
  438. <xsl:with-param name="node" select="$doc"/>
  439. </xsl:call-template>
  440. <xsl:call-template name="user.head.content">
  441. <xsl:with-param name="node" select="$doc"/>
  442. </xsl:call-template>
  443. </head>
  444. <body>
  445. <xsl:call-template name="body.attributes"/>
  446. <xsl:call-template name="user.header.content">
  447. <xsl:with-param name="node" select="$doc"/>
  448. </xsl:call-template>
  449. <xsl:apply-templates select="."/>
  450. <xsl:call-template name="user.footer.content">
  451. <xsl:with-param name="node" select="$doc"/>
  452. </xsl:call-template>
  453. </body>
  454. </html>
  455. <xsl:value-of select="$html.append"/>
  456. <!-- Generate any css files only once, not once per chunk -->
  457. <xsl:call-template name="generate.css.files"/>
  458. </xsl:template>
  459. <xsl:template name="root.attributes">
  460. <!-- customize to add attributes to <html> element -->
  461. </xsl:template>
  462. <xsl:template name="root.messages">
  463. <!-- redefine this any way you'd like to output messages -->
  464. <!-- DO NOT OUTPUT ANYTHING FROM THIS TEMPLATE -->
  465. </xsl:template>
  466. <!-- ==================================================================== -->
  467. <xsl:template name="chunk">
  468. <xsl:param name="node" select="."/>
  469. <!-- The default is that we are not chunking... -->
  470. <xsl:text>0</xsl:text>
  471. </xsl:template>
  472. </xsl:stylesheet>