是否可以为xslt模板标签中的匹配属性值设置变量名。 有什么帮助吗?
最佳答案
我不完全确定你想要实现什么,但这里有一个例子:
<!-- 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>
关于templates - xslt 模板标签的匹配属性变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5337487/