Hi Christian -- I was after a better, or at least less convoluted, way to add the UID attribute nodes. Your code snippet works in place, and faster; thank you!
If anyone happens to have a good general case structure-but-not-position document compare algorithm lying around, I'd be delighted to hear about it. (It can't be just XSD because there's a pile of WSDL documents, too. And who knows what in the future.) Thanks! Graydon On Tue, Oct 18, 2016 at 3:28 PM, Christian Grün <christian.gr...@gmail.com> wrote: > > Is there a better way to do this? > > Your query could probably be shortened as follows: > > let $new := db:open($newName) update { > .//* ! (insert node attribute UID { generate-id() } into .) > } > ... > > It does the same as your original query. But maybe you were asking for > a better solution to compare documents against each other? >