+ <xslt:template match="@书社:destination|@书社:disable-output-wrapping|@书社:archived-as[../ancestor::*[not(self::书社:apply-attributes-to-root or self::书社:apply-attributes)]]" mode="书社:application" priority="1"/>
+ <xslt:template match="书社:archive" mode="书社:application" priority="1">
+ <xslt:copy>
+ <xslt:for-each select="@*">
+ <xslt:choose>
+ <xslt:when test="local-name()='archived-as' and namespace-uri()='&书社;' and ../ancestor::*[not(self::书社:apply-attributes-to-root or self::书社:apply-attributes)]"/>
+ <xslt:otherwise>
+ <xslt:apply-templates select="." mode="书社:application"/>
+ </xslt:otherwise>
+ </xslt:choose>
+ </xslt:for-each>
+ <xslt:for-each select="node()">
+ <xslt:choose>
+ <xslt:when test="self::*">
+ <xslt:variable name="component">
+ <xslt:choose>
+ <xslt:when test="self::书社:*[local-name()='raw-text' or local-name()='base64-binary' or local-name()='archive']|@书社:disable-output-wrapping">
+ <xslt:copy-of select="."/>
+ </xslt:when>
+ <xslt:otherwise>
+ <xslt:call-template name="书社:wrap">
+ <xslt:with-param name="nodes" select="."/>
+ </xslt:call-template>
+ </xslt:otherwise>
+ </xslt:choose>
+ </xslt:variable>
+ <xslt:apply-templates select="exsl:node-set($component)/node()" mode="书社:application"/>
+ </xslt:when>
+ <xslt:otherwise>
+ <xslt:apply-templates select="." mode="书社:application"/>
+ </xslt:otherwise>
+ </xslt:choose>
+ </xslt:for-each>
+ </xslt:copy>
+ </xslt:template>