Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XPath that does not include other XPath

Reply
Thread Tools

XPath that does not include other XPath

 
 
Anna
Guest
Posts: n/a
 
      07-31-2003
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
/* #include <someyhing.h> */ => include it or do not include it?That is the question .... Andreas Bogenberger C Programming 3 02-22-2008 10:53 AM
'' is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long. rote ASP .Net 2 01-23-2008 03:07 PM
ASP Error 0126 include file not found, when using ".." in include file path Eric ASP General 10 01-11-2007 07:38 AM
ASP Error 0126 include file not found, when using ".." in include file path Eric ASP General 0 01-09-2007 06:54 PM
#include "bar" negates #include <string> ; how to fix? Danny Anderson C++ 5 08-15-2003 06:38 PM



Advertisments