This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The rules for insert and delete are careful to call removeType() only if the nodes being inserted/deleted can affect the type (that is, if they are elements, attributes, or text nodes). The rules for replace make no such provision; they remove the type annotation even if the only effect is to replace a comment with a processing instruction. It's a minor point, but the rules should be symmetrical. removeType() is necessary if either the node being replaced or one of the nodes inserted in its place is a text, attribute, or element node.
I agree with Mike. We should make the following change: In Section 3.1.8 (upd:replaceNode), change Rule 4d as follows: (d) If $target or any node in $replacement is an element, attribute, or text node, upd:removeType(parent($target)) is invoked.
Michael, On 22 Jan 2008, the Query Working Group considered this bug report and accepted the proposed change in Comment #1. Since this change is aligned with your suggestion, I am marking this bug report as Closed. --Don Chamberlin (for the Query Working Group)