dita2html.xsl 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!--
  3. This file is part of the DITA Open Toolkit project.
  4. Copyright 2004, 2005 IBM Corporation
  5. See the accompanying LICENSE file for applicable license.
  6. -->
  7. <!-- ereview.xsl
  8. | DITA topic to HTML for ereview & webreview
  9. -->
  10. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  11. version="2.0">
  12. <!-- stylesheet imports -->
  13. <!-- the main dita to xhtml converter -->
  14. <xsl:import href="plugin:org.dita.xhtml:xsl/dita2html-base.xsl"/>
  15. <xsl:output method="html"
  16. encoding="UTF-8"
  17. indent="no"
  18. doctype-system="http://www.w3.org/TR/html4/loose.dtd"
  19. doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
  20. />
  21. <!-- Set the A-NAME attr for NS -->
  22. <xsl:template name="setanametag">
  23. <xsl:param name="idvalue"/>
  24. <a>
  25. <xsl:attribute name="name">
  26. <xsl:if test="ancestor::*[contains(@class,' topic/body ')]">
  27. <xsl:value-of select="ancestor::*[contains(@class,' topic/body ')]/parent::*/@id"/><xsl:text>__</xsl:text>
  28. </xsl:if>
  29. <xsl:value-of select="$idvalue"/>
  30. </xsl:attribute>
  31. <xsl:value-of select="$afill"/><xsl:comment><xsl:text> </xsl:text></xsl:comment> <!-- fix for home page reader -->
  32. </a>
  33. </xsl:template>
  34. </xsl:stylesheet>