Charles Blair wrote:
i'm looking for an easy way to compare differences between two
documents, something that will return just those elements that are
different, something like op:except in the w3c recommendation. if
anyone has such a thing, i'd appreciate it. thanks.

If I understand correctly, op:except isn't suitable for your use-case because op:except uses node-identity comparison. So this sounds like a job for fn:deep-equal().

let $a := document { <test id="a"/> }
let $a1 := document { <test id="a"/> }
let $b := document { <test id="b"/> }
return ($a1, $b)[ not(deep-equal(., $a)) ]
=> <test id="b"/>

http://www.w3.org/TR/xpath-functions/#func-deep-equal

-- Mike

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to