tables_xep.xsl 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. This file is part of the DITA Open Toolkit project.
  4. Copyright 2019 IBM Corporation
  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. xmlns:xs="http://www.w3.org/2001/XMLSchema"
  10. xmlns:dita-ot="http://dita-ot.sourceforge.net/ns/201007/dita-ot"
  11. version="2.0"
  12. exclude-result-prefixes="xs dita-ot">
  13. <!-- By default in XEP, rotated table entries will extend to the end of the page, unless a height is provided for the container.
  14. To enable rotation, explicitly set the height (and optionally width) as follows:
  15. 1) Uncomment the fo:block-container
  16. 2) Adjust the height and width values to either
  17. 2a) An appropriate default that is acceptable for all of your rotated cells, or
  18. 2b) A specific or calculated value based on the cell content -->
  19. <xsl:template match="*[contains(@class, ' topic/thead ')]/*[contains(@class, ' topic/row ')]/*[contains(@class, ' topic/entry ')]" mode="rotateTableEntryContent">
  20. <!--<fo:block-container reference-orientation="90" width="150px" height="80px">-->
  21. <fo:block xsl:use-attribute-sets="thead.row.entry__content">
  22. <xsl:call-template name="processEntryContent"/>
  23. </fo:block>
  24. <!--</fo:block-container>-->
  25. </xsl:template>
  26. <xsl:template match="*[contains(@class, ' topic/tbody ')]/*[contains(@class, ' topic/row ')]/*[contains(@class, ' topic/entry ')]" mode="rotateTableEntryContent">
  27. <!--<fo:block-container reference-orientation="90" width="150px" height="80px">-->
  28. <fo:block xsl:use-attribute-sets="tbody.row.entry__content">
  29. <xsl:call-template name="processEntryContent"/>
  30. </fo:block>
  31. <!--</fo:block-container>-->
  32. </xsl:template>
  33. </xsl:stylesheet>