Hello, I have noticed that this query using the "following" axes //*[@xml:id = "lemma-aMSa"] /following::*[self::tei:entry or self::tei:re] [position() <= 3] is much slower than the same query with the "preceding" axes //*[@xml:id = "lemma-aMSa"] /preceding::*[self::tei:entry or self::tei:re] [position() <= 3] The query that uses "preceding" takes about 2.5 ms to execute, while the one using "following" takes about 250 ms: it is 100 times slower. Why this discrepancy between these two queries? I can provide the base XML file (19MB) on request. Also, I also get a warning about «'following::*[(self::tei:entry or self::tei:re)][(fn:position() <= 3)]' will never yield results.» but that is obviously false, as it yields exactly the 3 results I expect. Regards, -- Gioele Barabucci <gioele@svario.it>