Message Text
Attribute with name variable1 already exists
Cause
An update operation such as xdmp:node-insert-child
attempted to insert an attribute node for an attribute that already exists.
Response
Correct your code. For example, use xdmp:node-replace
instead of xdmp:node-insert-child
.