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

Post here questions and problems related to editing and publishing DITA content.
Radu
Posts: 9631
Joined: Fri Jul 09, 2004 5:18 pm

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

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com