/hazelcast-documentation/src/main/docbook/manual/stylesheet/docbook-fo.xsl

https://bitbucket.org/gabral6_gmailcom/hazelcast · Extensible Stylesheet Language Transformations · 114 lines · 107 code · 7 blank · 0 comment · 0 complexity · d9e0ed4c7b684dbe5a94725b5c81c90a MD5 · raw file

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. ~ Copyright (c) 2008-2013, Hazelcast, Inc. All Rights Reserved.
  4. ~
  5. ~ Licensed under the Apache License, Version 2.0 (the "License");
  6. ~ you may not use this file except in compliance with the License.
  7. ~ You may obtain a copy of the License at
  8. ~
  9. ~ http://www.apache.org/licenses/LICENSE-2.0
  10. ~
  11. ~ Unless required by applicable law or agreed to in writing, software
  12. ~ distributed under the License is distributed on an "AS IS" BASIS,
  13. ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. ~ See the License for the specific language governing permissions and
  15. ~ limitations under the License.
  16. -->
  17. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  18. xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xslthl="http://xslthl.sf.net"
  19. exclude-result-prefixes="xslthl" version='1.0'>
  20. <!-- import the main stylesheet, here pointing to fo/docbook.xsl -->
  21. <xsl:import href="urn:docbkx:stylesheet"/>
  22. <!-- highlight.xsl must be imported in order to enable highlighting support,
  23. highlightSource=1 parameter is not sufficient -->
  24. <xsl:import href="urn:docbkx:stylesheet/highlight.xsl"/>
  25. <xsl:param name="highlight.source" select="1"/>
  26. <xsl:param name="highlight.default.language" select="xml"/>
  27. <xsl:param name="admon.graphics" select="1"/>
  28. <xsl:param name="chapter.autolabel" select="1"/>
  29. <xsl:param name="section.autolabel" select="1"/>
  30. <xsl:param name="section.label.includes.component.label" select="1"/>
  31. <xsl:param name="page.margin.inner">10mm</xsl:param>
  32. <xsl:param name="page.margin.outer">10mm</xsl:param>
  33. <xsl:param name="alignment">left</xsl:param>
  34. <xsl:param name="symbol.font.family" select="'Symbol,ZapfDingbats,Monospaced'"/>
  35. <!-- some customization -->
  36. <xsl:template match='xslthl:keyword' mode="xslthl">
  37. <fo:inline font-weight="bold" color="#0A1777">
  38. <xsl:apply-templates mode="xslthl"/>
  39. </fo:inline>
  40. </xsl:template>
  41. <xsl:template match='xslthl:comment' mode="xslthl">
  42. <fo:inline font-style="italic" color="#7C7C7C">
  43. <xsl:apply-templates mode="xslthl"/>
  44. </fo:inline>
  45. </xsl:template>
  46. <xsl:template match='xslthl:multiline-comment' mode="xslthl">
  47. <fo:inline font-style="italic" color="#7C7C7C">
  48. <xsl:apply-templates mode="xslthl"/>
  49. </fo:inline>
  50. </xsl:template>
  51. <xsl:template match='xslthl:string' mode="xslthl">
  52. <fo:inline font-style="normal" color="#008000">
  53. <xsl:apply-templates mode="xslthl"/>
  54. </fo:inline>
  55. </xsl:template>
  56. <xsl:template match='xslthl:number' mode="xslthl">
  57. <fo:inline font-style="italic" color="#1930D1">
  58. <xsl:apply-templates mode="xslthl"/>
  59. </fo:inline>
  60. </xsl:template>
  61. <xsl:template match='xslthl:tag' mode="xslthl">
  62. <fo:inline font-style="normal" color="#0A1777">
  63. <xsl:apply-templates mode="xslthl"/>
  64. </fo:inline>
  65. </xsl:template>
  66. <xsl:template match='xslthl:attribute' mode="xslthl">
  67. <fo:inline font-style="bold" color="#0A1777">
  68. <xsl:apply-templates mode="xslthl"/>
  69. </fo:inline>
  70. </xsl:template>
  71. <xsl:template match='xslthl:value' mode="xslthl">
  72. <fo:inline font-style="bold" color="#008000">
  73. <xsl:apply-templates mode="xslthl"/>
  74. </fo:inline>
  75. </xsl:template>
  76. <xsl:attribute-set name="monospace.verbatim.properties">
  77. <xsl:attribute name="font-family">Monospaced</xsl:attribute>
  78. <xsl:attribute name="font-size">8pt</xsl:attribute>
  79. <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
  80. </xsl:attribute-set>
  81. <xsl:param name="shade.verbatim" select="1"/>
  82. <xsl:attribute-set name="shade.verbatim.style">
  83. <xsl:attribute name="background-color">#f0f0f0</xsl:attribute>
  84. <xsl:attribute name="border-width">0.5pt</xsl:attribute>
  85. <xsl:attribute name="border-style">solid</xsl:attribute>
  86. <xsl:attribute name="border-color">#f0f0f0</xsl:attribute>
  87. <xsl:attribute name="padding">3pt</xsl:attribute>
  88. </xsl:attribute-set>
  89. <xsl:attribute-set name="component.title.properties">
  90. <xsl:attribute name="font-family">
  91. <xsl:value-of select="$title.font.family"/>
  92. </xsl:attribute>
  93. <xsl:attribute name="font-weight">bold</xsl:attribute>
  94. <xsl:attribute name="font-size">20pt</xsl:attribute>
  95. <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
  96. <xsl:attribute name="text-align">left</xsl:attribute>
  97. <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
  98. <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute>
  99. <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
  100. </xsl:attribute-set>
  101. <xsl:attribute-set name="section.title.level1.properties">
  102. <xsl:attribute name="font-size">16pt</xsl:attribute>
  103. </xsl:attribute-set>
  104. <xsl:attribute-set name="section.title.level2.properties">
  105. <xsl:attribute name="font-size">12pt</xsl:attribute>
  106. </xsl:attribute-set>
  107. </xsl:stylesheet>