Hi Jonathan,
Is there any way for me to control the order of attributes in BaseX when I insert new attributes?
If you evaluate the following XQuery expression in BaseX …
<a b='b' c='c'/>
… you can be sure that the attributes will be placed in the original order. Please note that we cannot give a guarantee that this will stay that way forever, even though it’s unlikely to change.
If you have an existing element, you can reinsert all attributes in the order you want:
let $a := <a b='b' c='c'/> return element { node-name($a) } { $a/@*, attribute d { 'd' }, $a/node() }
How do you currently proceed?
Best, Christian