Project

Profile

Help

optimizations and node identity

Added by Anonymous over 19 years ago

Legacy ID: #2820703 Legacy Poster: marcvc (marcvc)

Michael, with Saxon 8.1, I've the impression there are issues with certain optimizations and how they affect node identity. Consider the following query: declare function local:foo(){<e/>}; "--- expect 1 element ---", let $w := <e/> return (for $v in (1,2,3) return ($w,$w,$w))/. ,"--- expect 3 elements ---", (for $v in (1,2,3) let $w := <e/> return ($w,$w,$w))/. ,"--- expect 9 elements ---", (for $v in (1,2,3) return (<e/>,<e/>,<e/>))/. ,"--- expect 1 element ---", let $w := local:foo() return (for $v in (1,2,3) return ($w,$w,$w))/. ,"--- expect 3 elements ---", (for $v in (1,2,3) let $w := local:foo() return ($w,$w,$w))/. ,"--- expect 9 elements ---", (for $v in (1,2,3) return (local:foo(),local:foo(),local:foo()))/. Thanks, Marc


Replies (1)

RE: optimizations and node identity - Added by Anonymous over 19 years ago

Legacy ID: #2820792 Legacy Poster: Michael Kay (mhkay)

Yes, this is correct. It's a known limitation (though missing from the list of documented limitations - which I will now fix). This is partly because the rules have only recently been clarified/confirmed, and partly just because it's work I haven't got around to doing yet.

    (1-1/1)

    Please register to reply