docbook.xsl 20 KB

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