XPath that does not include other XPath

A

Anna

Hi all. I have a rather odd question:
I need to construct an XPath, where one of the conditions is not() on
other XPath. SOmething like this:
//img[not(//img[@alt])] - image that is not image with alt attribute.
Of course, in this case I could just say //img[not(@alt)], but my
XPaths are
generated automatically, so I have to have it in the form of
XPath1[not(XPath2)].
//*[not(self::*=//img)], for example, will choose all the nodes that
are not img nodes.
But if I try for the above case to say :
//img[not(self::*=//img[@alt])]
it doesn't work. So is there a way to do such a thing?

Thank you very much for help.

Anna
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top