step1-xml-d.xsl 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!--
  3. This file is part of the DITA Open Toolkit project.
  4. Copyright 2014 Jarno Elovirta
  5. See the accompanying LICENSE file for applicable license.
  6. -->
  7. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  8. version="2.0">
  9. <xsl:template match="*[contains(@class,' xml-d/numcharrer ')]">
  10. <text style="tt"><xsl:call-template name="commonatts"/>
  11. <xsl:text>&amp;#</xsl:text>
  12. <xsl:apply-templates/>
  13. <xsl:text>;</xsl:text>
  14. </text>
  15. </xsl:template>
  16. <xsl:template match="*[contains(@class,' xml-d/parameterentity ')]">
  17. <text style="tt"><xsl:call-template name="commonatts"/>
  18. <xsl:text>%</xsl:text>
  19. <xsl:apply-templates/>
  20. <xsl:text>;</xsl:text>
  21. </text>
  22. </xsl:template>
  23. <xsl:template match="*[contains(@class,' xml-d/textentity ')]">
  24. <text style="tt"><xsl:call-template name="commonatts"/>
  25. <xsl:text>&amp;</xsl:text>
  26. <xsl:apply-templates/>
  27. <xsl:text>;</xsl:text>
  28. </text>
  29. </xsl:template>
  30. <xsl:template match="*[contains(@class,' xml-d/xmlelement ')]">
  31. <text style="tt"><xsl:call-template name="commonatts"/>
  32. <xsl:text>&lt;</xsl:text>
  33. <xsl:apply-templates/>
  34. <xsl:text>&gt;</xsl:text>
  35. </text>
  36. </xsl:template>
  37. <xsl:template match="*[contains(@class,' xml-d/xmlatt ')]">
  38. <text style="tt"><xsl:call-template name="commonatts"/>
  39. <xsl:text>@</xsl:text>
  40. <xsl:apply-templates/>
  41. </text>
  42. </xsl:template>
  43. <xsl:template match="*[contains(@class,' xml-d/xmlnsname ')]">
  44. <text style="tt"><xsl:call-template name="commonatts"/>
  45. <xsl:apply-templates/>
  46. </text>
  47. </xsl:template>
  48. <xsl:template match="*[contains(@class,' xml-d/xmlpi ')]">
  49. <text style="tt"><xsl:call-template name="commonatts"/>
  50. <xsl:apply-templates/>
  51. </text>
  52. </xsl:template>
  53. </xsl:stylesheet>