[英]XSLT - Xpath comparing attribute
can any one explain me the difference between 谁能解释一下
<xsl:template match="a/@ref[.='attr']">
and 和
<xsl:template match="a[@ref='attr']">
is this template matches the same thing or different thing? 这个模板是相同的东西还是不同的东西?
The first template is selecting the attribute ref
. 第一个模板是选择属性ref
。
The second template is selecting the element a
. 第二个模板是选择元素a
。
Both have a predicate that requires the attribute ref
to equal attr
. 两者都有一个谓词,要求属性ref
等于attr
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.