#100 EXSLT set:leading and empty nodeset

Michael Kay

Saxon's implementation of the EXSLT set:leading
function doesn't implement the rule:

"If the second node set is empty, then the first node
set is returned. "

Instead, it implements the rule:

If the second node set is empty, then the empty node
set is returned.

Saxon also doesn't implement the rule:

"If the first node in the second node set is not
contained in the first node set, then an empty node set
is returned."

This rule is particularly horrible, in fact it requires
a complete redesign of the implementation, because it
means that the function can't be pipelined. You can't
decide whether the first node in arg1 should be
included in the result until you have read all the
nodes in arg1. Saxon returns all the nodes in arg1 that
precede the first node in arg2.

Similar problems are probably present in set:trailing()

Test case added (for the first problem) in exslt31

Present in 6.5.2, in 7.2, and in earlier releases.


  • Michael Kay

    Michael Kay - 2002-11-18

    Logged In: YES

    Fixed in 7.3

  • Michael Kay

    Michael Kay - 2003-08-07

    Logged In: YES

    Same fix applied to source code for 6.5.3


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

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks