我有一个相当大的测试检查顺序,我想忽略baz
属性attri
等于的元素y
,这是我尝试过的,但它似乎无法正常工作。baz
无论属性如何,它似乎都被忽略了:
语境:
jd:foo|jd:bar|jd:baz[@attri != 'y']|jd:bam
测试:
(name()='foo' and
(preceding-sibling::*[local-name()='bar']
or preceding-sibling::*[local-name()='baz' and @attri != 'y']
or preceding-sibling::*[local-name()='bam']
)
) or
(name()='bar' and
(preceding-sibling::*[local-name()='baz' and @attri != 'y']
or preceding-sibling::*[local-name()='bam']
)
) or
(name()='baz' and
(preceding-sibling::*[local-name()='bam']
)
)