<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.idpf.org/2007/opf" version="2.0" xpath-default-namespace="http://www.idpf.org/2007/opf" exclude-result-prefixes="#all">
<xsl:param name="compatibility-mode" required="yes"/>
<xsl:template match="metadata">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates select="*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="meta">
<xsl:if test="$compatibility-mode">
<xsl:sequence select="."/>
</xsl:if>
<xsl:if test="not(@refines)">
<meta name="{@property}" content="{.}">
<xsl:sequence select="@scheme"/>
</meta>
</xsl:if>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>