This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
In section 2.4.5 Transform, the specification states that v. All other properties of the copied nodes are preserved. The copied node may be a document node. This means that the document-uri property will be copied. However, in section 2.1.2 Dynamic Context of XQuery 1.0 it is stated that "This means that given a document node $N, the result of fn:doc(fn:document-uri($N)) is $N will always be True, unless fn:document-uri($N) is an empty sequence." The query copy $N := doc('data.xml') modify () return fn:doc(document-uri($N)) is $N demonstrates that this is violated. I would expect that the document-uri property should not be copied, and that document-uri($N) should be the empty sequence.
The XQuery WG discussed this on 2013/01/15 and agreed that the suggested change should be made in the XQuery Update 3.0 working draft. Implementations of XQuery Update 1.0 can consider making the same change.
I'm reopening, as I'm unable to find the agreed change in the XQuery Update 3.0 editor's draft.
I'm closing this bug again, as the decision is recorded in changes.txt and will be made in the course of time.