highlight.xsl 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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:xslthl="http://xslthl.sf.net" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xslthl" version="1.0">
  5. <!-- ********************************************************************
  6. $Id: highlight.xsl 8911 2010-09-28 17:02:06Z abdelazer $
  7. ********************************************************************
  8. This file is part of the XSL DocBook Stylesheet distribution.
  9. See ../README or http://docbook.sf.net/release/xsl/current/ for
  10. and other information.
  11. ******************************************************************** -->
  12. <xsl:import href="../highlighting/common.xsl"/>
  13. <xsl:template match="xslthl:keyword" mode="xslthl">
  14. <strong class="hl-keyword">
  15. <xsl:apply-templates mode="xslthl"/>
  16. </strong>
  17. </xsl:template>
  18. <xsl:template match="xslthl:string" mode="xslthl">
  19. <strong class="hl-string">
  20. <em style="color:red">
  21. <xsl:apply-templates mode="xslthl"/>
  22. </em>
  23. </strong>
  24. </xsl:template>
  25. <xsl:template match="xslthl:comment" mode="xslthl">
  26. <em class="hl-comment" style="color: silver">
  27. <xsl:apply-templates mode="xslthl"/>
  28. </em>
  29. </xsl:template>
  30. <xsl:template match="xslthl:directive" mode="xslthl">
  31. <span class="hl-directive" style="color: maroon">
  32. <xsl:apply-templates mode="xslthl"/>
  33. </span>
  34. </xsl:template>
  35. <xsl:template match="xslthl:tag" mode="xslthl">
  36. <strong class="hl-tag" style="color: #000096">
  37. <xsl:apply-templates mode="xslthl"/>
  38. </strong>
  39. </xsl:template>
  40. <xsl:template match="xslthl:attribute" mode="xslthl">
  41. <span class="hl-attribute" style="color: #F5844C">
  42. <xsl:apply-templates mode="xslthl"/>
  43. </span>
  44. </xsl:template>
  45. <xsl:template match="xslthl:value" mode="xslthl">
  46. <span class="hl-value" style="color: #993300">
  47. <xsl:apply-templates mode="xslthl"/>
  48. </span>
  49. </xsl:template>
  50. <xsl:template match="xslthl:html" mode="xslthl">
  51. <strong>
  52. <em style="color: red">
  53. <xsl:apply-templates mode="xslthl"/>
  54. </em>
  55. </strong>
  56. </xsl:template>
  57. <xsl:template match="xslthl:xslt" mode="xslthl">
  58. <strong style="color: #0066FF">
  59. <xsl:apply-templates mode="xslthl"/>
  60. </strong>
  61. </xsl:template>
  62. <!-- Not emitted since XSLTHL 2.0 -->
  63. <xsl:template match="xslthl:section" mode="xslthl">
  64. <strong>
  65. <xsl:apply-templates mode="xslthl"/>
  66. </strong>
  67. </xsl:template>
  68. <xsl:template match="xslthl:number" mode="xslthl">
  69. <span class="hl-number">
  70. <xsl:apply-templates mode="xslthl"/>
  71. </span>
  72. </xsl:template>
  73. <xsl:template match="xslthl:annotation" mode="xslthl">
  74. <em>
  75. <span class="hl-annotation" style="color: gray">
  76. <xsl:apply-templates mode="xslthl"/>
  77. </span>
  78. </em>
  79. </xsl:template>
  80. <!-- Not sure which element will be in final XSLTHL 2.0 -->
  81. <xsl:template match="xslthl:doccomment|xslthl:doctype" mode="xslthl">
  82. <strong class="hl-tag" style="color: blue">
  83. <xsl:apply-templates mode="xslthl"/>
  84. </strong>
  85. </xsl:template>
  86. </xsl:stylesheet>