<xslt:variable name="parserdiv" select="exsl:node-set($书社:parsers)//html:div[html:dd=current()/@type]"/>
<xslt:choose>
<xslt:when test="$parserdiv">
- <xslt:variable name="result">
+ <xslt:variable name="result-fragment">
<xslt:apply-templates select="."/>
</xslt:variable>
- <xslt:variable name="reparsed-result">
- <xslt:apply-templates select="exsl:node-set($result)/node()" mode="书社:parse"/>
+ <xslt:variable name="applied-fragment">
+ <xslt:call-template name="书社:apply-parsed-by">
+ <xslt:with-param name="id" select="string($parserdiv/html:dt)"/>
+ <xslt:with-param name="media-type" select="string(@type)"/>
+ <xslt:with-param name="result" select="exsl:node-set($result-fragment)"/>
+ </xslt:call-template>
</xslt:variable>
- <xslt:call-template name="书社:apply-parsed-by">
- <xslt:with-param name="id" select="string($parserdiv/html:dt)"/>
- <xslt:with-param name="media-type" select="string(@type)"/>
- <xslt:with-param name="result" select="exsl:node-set($reparsed-result)"/>
- </xslt:call-template>
+ <xslt:apply-templates select="exsl:node-set($applied-fragment)/node()" mode="书社:parse"/>
</xslt:when>
<xslt:otherwise>
<xslt:apply-templates select="."/>