似乎不可能将 parent
的缩写符号用于 key
函数的 use
属性,至少对于我的设置。
这不起作用
<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
关于XSLT/Xpath : Why is it not possible to use the shortened notation for parent for the use attribute of the key function,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61463881/