hi-d.xsl 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!--
  3. This file is part of the DITA Open Toolkit project.
  4. Copyright 2004, 2005 IBM Corporation
  5. See the accompanying LICENSE file for applicable license.
  6. -->
  7. <xsl:stylesheet version="2.0"
  8. xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  9. <xsl:template match="*[contains(@class,' hi-d/b ')]" name="topic.hi-d.b">
  10. <strong>
  11. <xsl:call-template name="commonattributes"/>
  12. <xsl:call-template name="setidaname"/>
  13. <xsl:apply-templates/>
  14. </strong>
  15. </xsl:template>
  16. <xsl:template match="*[contains(@class,' hi-d/i ')]" name="topic.hi-d.i">
  17. <em>
  18. <xsl:call-template name="commonattributes"/>
  19. <xsl:call-template name="setidaname"/>
  20. <xsl:apply-templates/>
  21. </em>
  22. </xsl:template>
  23. <xsl:template match="*[contains(@class,' hi-d/u ')]" name="topic.hi-d.u">
  24. <u>
  25. <xsl:call-template name="commonattributes"/>
  26. <xsl:call-template name="setidaname"/>
  27. <xsl:apply-templates/>
  28. </u>
  29. </xsl:template>
  30. <xsl:template match="*[contains(@class,' hi-d/tt ')]" name="topic.hi-d.tt">
  31. <span style="font-family: monospace">
  32. <xsl:call-template name="commonattributes"/>
  33. <xsl:if test="*[contains(@class,' ditaot-d/ditaval-startprop ')]/@outputclass">
  34. <!-- Combine TT style with style from ditaval, if present -->
  35. <xsl:attribute name="style">
  36. <xsl:text>font-family: monospace; </xsl:text>
  37. <xsl:value-of select="*[contains(@class,' ditaot-d/ditaval-startprop ')]/@outputclass"/>
  38. </xsl:attribute>
  39. </xsl:if>
  40. <xsl:call-template name="setidaname"/>
  41. <xsl:apply-templates/>
  42. </span>
  43. </xsl:template>
  44. <xsl:template match="*[contains(@class,' hi-d/sup ')]" name="topic.hi-d.sup">
  45. <sup>
  46. <xsl:call-template name="commonattributes"/>
  47. <xsl:call-template name="setidaname"/>
  48. <xsl:apply-templates/>
  49. </sup>
  50. </xsl:template>
  51. <xsl:template match="*[contains(@class,' hi-d/sub ')]" name="topic.hi-d.sub">
  52. <sub>
  53. <xsl:call-template name="commonattributes"/>
  54. <xsl:call-template name="setidaname"/>
  55. <xsl:apply-templates/>
  56. </sub>
  57. </xsl:template>
  58. <xsl:template match="*[contains(@class,' hi-d/line-through ')]" name="topic.hi-d.line-through">
  59. <span style="text-decoration:line-through">
  60. <xsl:call-template name="commonattributes"/>
  61. <xsl:call-template name="setidaname"/>
  62. <xsl:apply-templates/>
  63. </span>
  64. </xsl:template>
  65. <xsl:template match="*[contains(@class,' hi-d/overline ')]" name="topic.hi-d.overline">
  66. <span style="text-decoration:overline">
  67. <xsl:call-template name="commonattributes"/>
  68. <xsl:call-template name="setidaname"/>
  69. <xsl:apply-templates/>
  70. </span>
  71. </xsl:template>
  72. </xsl:stylesheet>