> > Of course, insert says: > > "Each node in the origin-sequence is cloned in the order it appears in > the > sequence." > > which may just have moved the problem to there, since we don't strictly > define what "clone" means. Right, "clone" == "deep copy" ;) I am now a little puzzled that there is no simple formal definition in any of the XML specs, although to be fair, XSLT doesn't work via mutation but by producing new trees, while here we have mutation. The DOM has a `cloneNode(deep)` function. [1] However, reading it doesn't exactly feels great, and I don't see a notion of in-scope namespaces, for example. The actual logic is simple: all node properties must be preserved in a deep copy, except that all the nodes have new identities. [2] -Erik [1] https://www.w3.org/TR/domcore/#dom-node-clonenode [2] https://www.w3.org/TR/xpath-datamodel/#node-identityReceived on Friday, 29 March 2019 17:28:59 UTC
This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:37:51 UTC