:<pre>insert node attribute id{'0'} into doc('doc.xml')//n</pre>
:Result: <pre style='color:red'>[XUDY0021] Duplicate attribute "id".</pre>
If DOM nodes have to be processed you can pipe them through a [[Update#transform|transform expression]].
===Fragments & fn:put()===