开发者

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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜