Multiple predicates

  • Andrew

    Andrew - 2009-07-02

    I realise there hasn't been any updates to TinyXPath since 2007, but thought I would post this anyway.

    Here's a test xml:

        <item name="item1" />
        <item name="item2" />
        <item name="item3" type="special" />
        <item name="item4" type="special" />

    I'm trying to use two consecutive predicates in an expression...


    ...which I believe SHOULD return me the name of the 1st node that has the type 'special' (in this case 'item3'). However, instead it returns me the first node ('item1'), as though its ignoring the first [@type='special'] predicate completely.

    So, a few questions:
    1) Is this expected behaviour, or is it a bug?
    2) Is there anyone still around who is familiar with the TinyXPath codebase?
    3) Has anyone else encountered this problem before and fixed it?

  • Anonymous - 2009-10-29

    if exp is

    may get item4 why?
    i think it is bug .

  • karsten

    karsten - 2012-09-11

    I tested it with xqilla, and it got the result
    so your query seems correct to me.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks