map-elements.xsl 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. This file is part of the DITA Open Toolkit project.
  4. Copyright 2012 Eero Helenius
  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,' map/topicmeta ')]/*[contains(@class,' map/searchtitle ')]"/>
  11. <xsl:template match="*[contains(@class, ' map/topicmeta ')]">
  12. <!--
  13. <fo:block xsl:use-attribute-sets="topicmeta">
  14. <xsl:apply-templates/>
  15. </fo:block>
  16. -->
  17. </xsl:template>
  18. <xsl:template match="*[contains(@class, ' map/map ')]/*[contains(@class, ' map/reltable ')]">
  19. <fo:table-and-caption>
  20. <fo:table-caption>
  21. <fo:block xsl:use-attribute-sets="reltable__title">
  22. <xsl:value-of select="@title"/>
  23. </fo:block>
  24. </fo:table-caption>
  25. <fo:table xsl:use-attribute-sets="reltable">
  26. <xsl:call-template name="topicrefAttsNoToc"/>
  27. <xsl:call-template name="selectAtts"/>
  28. <xsl:call-template name="globalAtts"/>
  29. <xsl:apply-templates select="relheader"/>
  30. <fo:table-body>
  31. <xsl:apply-templates select="relrow"/>
  32. </fo:table-body>
  33. </fo:table>
  34. </fo:table-and-caption>
  35. </xsl:template>
  36. <xsl:template match="*[contains(@class, ' map/relheader ')]">
  37. <fo:table-header xsl:use-attribute-sets="relheader">
  38. <xsl:call-template name="globalAtts"/>
  39. <xsl:apply-templates/>
  40. </fo:table-header>
  41. </xsl:template>
  42. <xsl:template match="*[contains(@class, ' map/relcolspec ')]">
  43. <fo:table-cell xsl:use-attribute-sets="relcolspec">
  44. <xsl:apply-templates/>
  45. </fo:table-cell>
  46. </xsl:template>
  47. <xsl:template match="*[contains(@class, ' map/relrow ')]">
  48. <fo:table-row xsl:use-attribute-sets="relrow">
  49. <xsl:call-template name="globalAtts"/>
  50. <xsl:apply-templates/>
  51. </fo:table-row>
  52. </xsl:template>
  53. <xsl:template match="*[contains(@class, ' map/relcell ')]">
  54. <fo:table-cell xsl:use-attribute-sets="relcell">
  55. <xsl:call-template name="globalAtts"/>
  56. <xsl:call-template name="topicrefAtts"/>
  57. <xsl:apply-templates/>
  58. </fo:table-cell>
  59. </xsl:template>
  60. </xsl:stylesheet>