dita2html.xsl 1.3 KB

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