> I might be misunderstanding how the is-same-node() works but executing below > xquery gives me results which I find hard to reason about. ... > Returns following output (at least on Sedna): It must be a Sedna issue... check it with Saxon. -- Andrew Welch http://andrewjwelch.com