As an alternative, have you considered to apply an XSL transformation to documents using an old version? This might be a bit simpler, e.g. like this (using the identity transformation pattern):

    <!-- Copy all attributes/nodes not matched by another rule to the output unaltered -->
    <xsl:template match="@*|node()">
        <xsl:copy>
            <xsl:apply-templates select="@*|node()"/>
        </xsl:copy>
    </xsl:template>

    <!-- Set version attribute to 2.1 -->
    <xsl:template match="@version">
        <xsl:attribute name="version">2.1</xsl:attribute>
    </xsl:template>

Not sure whether it's better in the end; Just throwing out the idea.