dita2xhtml.xsl 1.0 KB

12345678910111213141516171819202122232425262728293031
  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. 2011 All Rights Reserved. -->
  6. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  7. version="2.0">
  8. <xsl:import href="dita2html-base.xsl"/>
  9. <xsl:output method="xhtml"
  10. encoding="UTF-8"
  11. indent="no"
  12. doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
  13. doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>
  14. <xsl:include href="dita2xhtml-util.xsl"/>
  15. <!-- Add both lang and xml:lang attributes -->
  16. <xsl:template match="@xml:lang" name="generate-lang">
  17. <xsl:param name="lang" select="."/>
  18. <xsl:attribute name="xml:lang">
  19. <xsl:value-of select="$lang"/>
  20. </xsl:attribute>
  21. <xsl:attribute name="lang">
  22. <xsl:value-of select="$lang"/>
  23. </xsl:attribute>
  24. </xsl:template>
  25. </xsl:stylesheet>