Page 1 of 1

Re: Why doesn't this XPath query work as I assumed?

Posted: Mon Sep 15, 2025 1:15 pm
by Radu
Hi,
There is answer by Michael Kay, the person who develops the Saxon XSLT processor here:

https://stackoverflow.com/questions/105 ... xslt-xslif

Code: Select all

not(A = "NA") returns true if A is either absent, or has a value not equal to "NA". By contrast, A != "NA" returns true if A is present and not equal to "NA"
So in our case "@type!='step'" is not true because @type does not exist as an attribute on the element. But this works "not(@type='step')".

Regards,
Radu