Thanks a lot!
So it seems, I must give the node a new identity instead of just modifying the old identity.
On Mon, Sep 9, 2019 at 10:41 PM Martin Honnen martin.honnen@gmx.de wrote:
On 09.09.2019 20:35, Martin Honnen wrote:
On 09.09.2019 20:30, Andreas Mixich wrote:
Hi,
copy $c := <lorem>ipsum dolor sit amet</lorem> modify insert node namespace {"lipsum"} {"lorem-ipsum"} into $c return $c
Expected result:
<lipsum:lorem xmlns:lipsum="lorem-ipsum">ipsum dolor sit amet</lipsum:lorem>
The namespace is part of the name of a node so you need to rename the node(s) in a namespace if you want to change the namespace
Your example would be
copy $c := <lorem>ipsum dolor sit amet</lorem> modify rename node $c as QName("lorem-ipsum", "lipsum:" || local-name($c)) return $c