XPath that does not include other XPath

Discussion in 'XML' started by Anna, Jul 31, 2003.

  1. Anna

    Anna Guest

    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
     
    Anna, Jul 31, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Danny Anderson
    Replies:
    5
    Views:
    517
    Victor Bazarov
    Aug 15, 2003
  2. rote
    Replies:
    2
    Views:
    7,437
    Mark Fitzpatrick
    Jan 23, 2008
  3. Andreas Bogenberger
    Replies:
    3
    Views:
    959
    Andreas Bogenberger
    Feb 22, 2008
  4. Eric
    Replies:
    10
    Views:
    484
  5. Eric
    Replies:
    0
    Views:
    268
Loading...

Share This Page