variable for match attribute of xslt template tag
Is it possible to set a variable name for the match attribute value in xslt template tag. Any开发者_如何学Go help?
I'm not entirely sure about what you want to achieve, but here is an example:
<!-- a variable -->
<xsl:variable name="x" select="//some/path"/>
<!-- a template to match all elements with the name of the variable -->
<xsl:template match="*[name(.)=$x]">
Yes! <xsl:value-of select="."/>
</xsl:template>
精彩评论