XSLT 1.0 从列表中跳过节点属性

XSLT 1.0 skip node attribute from the list

我的变量有很多节点值。

<xsl:variable name="IgnoreItems" select="'ITEM10 | ITEM20 | ITEM30| ITEM50'......| ITEMX'" />

我想在执行 For-each 循环时忽略这些值。

<xsl:for-each select ="//Instruction/Item[@Definition !=$IgnoreItems]/Deviations/Planned">

如何使用 XSL 1.0 实现这一点?

通常的技巧是检查例如Item[not(contains(concat('| ', $IgnoreItems, ' |'), concat('| ', @Definition, ' |')))]。或者检查处理器是否具有或允许简单的 tokenize 扩展,以便您可以使用 Item[not(@Definition = ext:tokenize($IgnoreItems, ' \| '))] 或类似的扩展函数,具体取决于扩展函数是否适用于子字符串或正则表达式模式。