html-single-custom.xsl 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one
  4. or more contributor license agreements. See the NOTICE file
  5. distributed with this work for additional information
  6. regarding copyright ownership. The ASF licenses this file
  7. to you under the Apache License, Version 2.0 (the
  8. "License"); you may not use this file except in compliance
  9. with the License. You may obtain a copy of the License at
  10. http://www.apache.org/licenses/LICENSE-2.0
  11. Unless required by applicable law or agreed to in writing,
  12. software distributed under the License is distributed on an
  13. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  14. KIND, either express or implied. See the License for the
  15. specific language governing permissions and limitations
  16. under the License.
  17. -->
  18. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  19. xmlns:xslthl="http://xslthl.sf.net"
  20. exclude-result-prefixes="xslthl"
  21. version='1.0'>
  22. <xsl:import href="http://docbook.sourceforge.net/release/xsl-ns/current/html/docbook.xsl"/>
  23. <xsl:import href="http://docbook.sourceforge.net/release/xsl-ns/current/html/highlight.xsl"/>
  24. <!-- Only use scaling in FO -->
  25. <xsl:param name="ignore.image.scaling">1</xsl:param>
  26. <!-- Use code syntax highlighting -->
  27. <xsl:param name="highlight.source">1</xsl:param>
  28. <!-- Extensions -->
  29. <xsl:param name="use.extensions">1</xsl:param>
  30. <xsl:param name="tablecolumns.extension">0</xsl:param>
  31. <xsl:param name="callout.extensions">1</xsl:param>
  32. <!-- Activate Graphics -->
  33. <xsl:param name="admon.graphics" select="1"/>
  34. <xsl:param name="admon.graphics.path">images/</xsl:param>
  35. <xsl:param name="admon.graphics.extension">.png</xsl:param>
  36. <xsl:param name="callout.graphics" select="1" />
  37. <xsl:param name="callout.defaultcolumn">120</xsl:param>
  38. <xsl:param name="callout.graphics.path">images/callouts/</xsl:param>
  39. <xsl:param name="callout.graphics.extension">.png</xsl:param>
  40. <xsl:param name="table.borders.with.css" select="1"/>
  41. <xsl:param name="html.stylesheet">css/manual.css</xsl:param>
  42. <xsl:param name="html.stylesheet.type">text/css</xsl:param>
  43. <xsl:param name="generate.toc">book toc,title</xsl:param>
  44. <xsl:param name="admonition.title.properties">text-align: left</xsl:param>
  45. <!-- Leave image paths as relative when navigating XInclude -->
  46. <xsl:param name="keep.relative.image.uris" select="1"/>
  47. <!-- Label Chapters and Sections (numbering) -->
  48. <xsl:param name="chapter.autolabel" select="1"/>
  49. <xsl:param name="section.autolabel" select="1"/>
  50. <xsl:param name="section.autolabel.max.depth" select="2"/>
  51. <xsl:param name="section.label.includes.component.label" select="1"/>
  52. <xsl:param name="table.footnote.number.format" select="'1'"/>
  53. <!-- Show only Sections up to level 2 in the TOCs -->
  54. <xsl:param name="toc.section.depth">2</xsl:param>
  55. <!-- Remove "Chapter" from the Chapter titles... -->
  56. <xsl:param name="local.l10n.xml" select="document('')"/>
  57. <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
  58. <l:l10n language="en">
  59. <l:context name="title-numbered">
  60. <l:template name="chapter" text="%n.&#160;%t"/>
  61. <l:template name="section" text="%n&#160;%t"/>
  62. </l:context>
  63. </l:l10n>
  64. </l:i18n>
  65. <xsl:template match='xslthl:keyword' mode="xslthl">
  66. <span class="hl-keyword"><xsl:apply-templates mode="xslthl"/></span>
  67. </xsl:template>
  68. <xsl:template match='xslthl:comment' mode="xslthl">
  69. <span class="hl-comment"><xsl:apply-templates mode="xslthl"/></span>
  70. </xsl:template>
  71. <xsl:template match='xslthl:oneline-comment' mode="xslthl">
  72. <span class="hl-comment"><xsl:apply-templates mode="xslthl"/></span>
  73. </xsl:template>
  74. <xsl:template match='xslthl:multiline-comment' mode="xslthl">
  75. <span class="hl-multiline-comment"><xsl:apply-templates mode="xslthl"/></span>
  76. </xsl:template>
  77. <xsl:template match='xslthl:tag' mode="xslthl">
  78. <span class="hl-tag"><xsl:apply-templates mode="xslthl"/></span>
  79. </xsl:template>
  80. <xsl:template match='xslthl:attribute' mode="xslthl">
  81. <span class="hl-attribute"><xsl:apply-templates mode="xslthl"/></span>
  82. </xsl:template>
  83. <xsl:template match='xslthl:value' mode="xslthl">
  84. <span class="hl-value"><xsl:apply-templates mode="xslthl"/></span>
  85. </xsl:template>
  86. <xsl:template match='xslthl:string' mode="xslthl">
  87. <span class="hl-string"><xsl:apply-templates mode="xslthl"/></span>
  88. </xsl:template>
  89. <!-- Google Analytics -->
  90. <xsl:template name="user.head.content">
  91. <xsl:comment>Begin Google Analytics code</xsl:comment>
  92. <script type="text/javascript">
  93. var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
  94. document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
  95. </script>
  96. <script type="text/javascript">
  97. var pageTracker = _gat._getTracker("UA-2728886-3");
  98. pageTracker._setDomainName("none");
  99. pageTracker._setAllowLinker(true);
  100. pageTracker._trackPageview();
  101. </script>
  102. <xsl:comment>End Google Analytics code</xsl:comment>
  103. </xsl:template>
  104. <!-- Loopfuse -->
  105. <xsl:template name="user.footer.content">
  106. <xsl:comment>Begin LoopFuse code</xsl:comment>
  107. <script src="http://loopfuse.net/webrecorder/js/listen.js" type="text/javascript">
  108. </script>
  109. <script type="text/javascript">
  110. _lf_cid = "LF_48be82fa";
  111. _lf_remora();
  112. </script>
  113. <xsl:comment>End LoopFuse code</xsl:comment>
  114. </xsl:template>
  115. </xsl:stylesheet>