This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Is the parent node property of $node preserved when doing a copy to $node? The spec is not totally clear, saying that "The parent, children, and attributes properties of the copied nodes are set so as to preserve their inter-node relationships." My assumption would be that $node does not have a parent, since this parent should have $node as a child, which -to me- does not really make sense. If this is true, id-transform-expr-057 will not give an error about replacing the same node twice, but replacing a node without a parent (See also XQuery Update Facility, 2.4.3.1, 2c))
Like you, I believe that the parent node property of a node is not preserved when doing a copy. This could be made a bit clearer. You might want to raise this is an issue against the Update Facility specification. I've modified id-transform-expr-057 to attempt conflicting replace operations on nodes with parents. Please close this bug report if you agree with this resolution.