+ <when test="self::*">
+ <element name="{name()}" namespace="{namespace-uri()}">
+ <for-each select="@*[not(contains(., '{') or contains(., '}'))]">
+ <attribute name="{name()}" namespace="{namespace-uri()}">
+ <value-of select="."/>
+ </attribute>
+ </for-each>
+ <for-each select="@*[contains(., '{') or contains(., '}')]">
+ <xslt:attribute name="{name()}" namespace="{namespace-uri()}">
+ <xslt:text>
+ <value-of select="."/>
+ </xslt:text>
+ </xslt:attribute>
+ </for-each>
+ <apply-templates mode="书社:literally"/>
+ </element>
+ </when>