choicetable.xsl 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. This file is part of the DITA Open Toolkit project.
  4. Copyright 2016 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:xs="http://www.w3.org/2001/XMLSchema"
  9. xmlns:dita-ot="http://dita-ot.sourceforge.net/ns/201007/dita-ot"
  10. xmlns:table="http://dita-ot.sourceforge.net/ns/201007/dita-ot/table"
  11. xmlns:simpletable="http://dita-ot.sourceforge.net/ns/201007/dita-ot/simpletable"
  12. version="2.0"
  13. exclude-result-prefixes="xs dita-ot table simpletable">
  14. <xsl:template mode="generate-table-header" match="
  15. *[contains(@class,' task/choicetable ')]
  16. [empty(*[contains(@class,' task/chhead ')])]
  17. ">
  18. <chhead class="- topic/sthead task/chhead ">
  19. <choptionhd class="- topic/stentry task/choptionhd ">
  20. <xsl:sequence select="dita-ot:get-variable(., 'Option')"/>
  21. </choptionhd>
  22. <chdeschd class="- topic/stentry task/chdeschd ">
  23. <xsl:sequence select="dita-ot:get-variable(., 'Description')"/>
  24. </chdeschd>
  25. </chhead>
  26. </xsl:template>
  27. </xsl:stylesheet>