summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
inline | side by side (from parent 1:
53a87e0)
This supports the beneficial case of wanting to match on
`@书社:parsed-by` or `@书社:media-type` in (re)parsers.
<xslt:variable name="parserdiv" select="exsl:node-set($书社:parsers)//html:div[html:dd=current()/@type]"/>
<xslt:choose>
<xslt:when test="$parserdiv">
<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: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: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="."/>
</xslt:when>
<xslt:otherwise>
<xslt:apply-templates select="."/>