对于key
函数的use
属性,似乎不可能使用parent
的缩写符号,至少在我的设置中是这样。
不起作用
<xsl:key name="eventsSuppressedByTheSameEventKey" match="suppressedMonitor" use="../suppressingMonitor/@event" />
但这确实有效
<xsl:key name="eventsSuppressedByTheSameEventKey" match="suppressedMonitor" use="parent::suppressingMonitor/@event" />
为什么?use
属性中是否因任何原因不支持缩写符号?
的缩写
parent::suppressingMonitor/@event
是:
../@event
不是:
../suppressingMonitor/@event