12. Copy an XHTML 2.0 element as an XHTML 1.0 element

xsl:stylesheet id="stylesheet" exclude-result-prefixes="x2 lit" version="1.0" xml:lang="en"

copy-xhtml1
copy attributes

12.1. The named template copy-xhtml1

xsl:template name="copy-xhtml1" id="named-template"
  xsl:param name="target" select="."
  xsl:param name="tag-name" select="local-name($target)"
  xsl:param name="content"
    xsl:apply-templates select="$target/node()"
  
  xsl:element name="{$tag-name}" namespace="http://www.w3.org/1999/xhtml"
    xsl:apply-templates select="@*" mode="copy"
    xsl:copy-of select="$content"
  

12.2. Templates for copying

xsl:template match="@*" mode="copy" id="copy-attributes"
  xsl:copy
    xsl:value-of select="."