xml-domain.xsl 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. xmlns:fo="http://www.w3.org/1999/XSL/Format"
  9. version="2.0">
  10. <xsl:template match="*[contains(@class, ' xml-d/xmlelement ')]">
  11. <fo:inline xsl:use-attribute-sets="xmlelement">
  12. <xsl:call-template name="commonattributes"/>
  13. <xsl:text>&lt;</xsl:text>
  14. <xsl:apply-templates/>
  15. <xsl:text>&gt;</xsl:text>
  16. </fo:inline>
  17. </xsl:template>
  18. <xsl:template match="*[contains(@class, ' xml-d/xmlatt ')]">
  19. <fo:inline xsl:use-attribute-sets="xmlatt">
  20. <xsl:call-template name="commonattributes"/>
  21. <xsl:text>@</xsl:text>
  22. <xsl:apply-templates/>
  23. </fo:inline>
  24. </xsl:template>
  25. <xsl:template match="*[contains(@class, ' xml-d/textentity ')]">
  26. <fo:inline xsl:use-attribute-sets="textentity">
  27. <xsl:call-template name="commonattributes"/>
  28. <xsl:text>&amp;</xsl:text>
  29. <xsl:apply-templates/>
  30. <xsl:text>;</xsl:text>
  31. </fo:inline>
  32. </xsl:template>
  33. <xsl:template match="*[contains(@class, ' xml-d/parameterentity ')]">
  34. <fo:inline xsl:use-attribute-sets="parameterentity">
  35. <xsl:call-template name="commonattributes"/>
  36. <xsl:text>%</xsl:text>
  37. <xsl:apply-templates/>
  38. <xsl:text>;</xsl:text>
  39. </fo:inline>
  40. </xsl:template>
  41. <xsl:template match="*[contains(@class, ' xml-d/numcharref ')]">
  42. <fo:inline xsl:use-attribute-sets="numcharref">
  43. <xsl:call-template name="commonattributes"/>
  44. <xsl:text>&amp;#</xsl:text>
  45. <xsl:apply-templates/>
  46. <xsl:text>;</xsl:text>
  47. </fo:inline>
  48. </xsl:template>
  49. <xsl:template match="*[contains(@class, ' xml-d/xmlnsname ')]">
  50. <fo:inline xsl:use-attribute-sets="xmlnsname">
  51. <xsl:call-template name="commonattributes"/>
  52. <xsl:apply-templates/>
  53. </fo:inline>
  54. </xsl:template>
  55. <xsl:template match="*[contains(@class, ' xml-d/xmlpi ')]">
  56. <fo:inline xsl:use-attribute-sets="xmlpi">
  57. <xsl:call-template name="commonattributes"/>
  58. <xsl:text>&lt;?</xsl:text>
  59. <xsl:apply-templates/>
  60. <xsl:text>?&gt;</xsl:text>
  61. </fo:inline>
  62. </xsl:template>
  63. </xsl:stylesheet>