XSLT/Xpath:为什么不能对键函数的use属性使用缩短的parent表示法



对于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

最新更新