[xquery-talk] return only latest version of an item
A. Steven Anderson
steve at asanderson.com
Thu May 14 19:14:00 PDT 2009
>
> I thought Pavel's suggestion was just fine and, indeed, the result is more
> than one item (transcript below).
Something must be lost in my translation from my real data to this
simplified example, because it definitely doesn't work with my real data. I
only get 1 result.
> Find another processor?
>
I'm not sure which processor exist-db 1.2.5 is using out of the box and if
it can be swapped.
> BTW, your data set happens to have steadily increasing version values for
> each <id>. If it is true that the last of each <id> has the highest
> version, this might execute even faster because it has no function call:
>
> /items/item[not(id=following-sibling::item[1]/id)]
>
Thanks, but the real data isn't guaranteed to be in this order. It was just
a simplified example.
Thanks for the responses though!
--
A. Steven Anderson
Independent Consultant
steve at asanderson.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090514/0338713b/attachment.htm
More information about the talk
mailing list