dita2xhtml.xsl 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. This file is part of the DITA Open Toolkit project.
  4. Copyright 2011 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. version="2.0">
  9. <xsl:import href="plugin:org.dita.xhtml:xsl/dita2html-base.xsl"/>
  10. <xsl:output method="xhtml"
  11. encoding="UTF-8"
  12. indent="no"
  13. doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
  14. doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>
  15. <xsl:include href="plugin:org.dita.xhtml:xsl/dita2xhtml-util.xsl"/>
  16. <!-- Add both lang and xml:lang attributes -->
  17. <xsl:template match="@xml:lang" name="generate-lang">
  18. <xsl:param name="lang" select="."/>
  19. <xsl:attribute name="xml:lang">
  20. <xsl:value-of select="$lang"/>
  21. </xsl:attribute>
  22. <xsl:attribute name="lang">
  23. <xsl:value-of select="$lang"/>
  24. </xsl:attribute>
  25. </xsl:template>
  26. </xsl:stylesheet>