you are absolutely right - the old the old basex version (9,2,4) considered both statements as equal. This means - the issue was in 9.2.4 and is fixed in 9.3 ... sometimes existing code makes existing bugs accessible as features

thanks in advance
alex

Am 02.12.2019 um 21:07 schrieb Christian Grün:
Hi Alex,

Could you share a little self-contained example with us that
demonstrates the wrong behavior, and name the versions of BaseX you
tested?

The two following expressions are equivalent:

   //row[position() > 1]
   /descendant-or-self::node()/child::row[position() > 1]

They are not equivalent to:

   //row[./position() > 1]
   /descendant-or-self::node()/child::row[./position() > 1]

Each result of child::row will be bound one by one to the context item
in the predicate, thus ./position() will always yield 1.

You can run the following queries to see the difference:

   (<a/>,<b/>)[trace(position())],
   (<a/>,<b/>)[trace(./position())]

Does this help?
Christian


On Mon, Dec 2, 2019 at 7:25 PM Alexander Witzigmann
<alexander.witzigm...@tanner.de> wrote:
the results of equivalent semantics:

e.g.

//row[position()>1]

is no more equal to in latest 9.3 release to

//row[./position()>1]

the later results in not correct result.
Alex




Reply via email to