Hi Johannes,

This was a known bug in the previous version, the new behavior is correct:

The elements in the user-defined function have no namespace, and by
inserting them as child nodes, the namespace must not be changed.

Things work differently if the node constructors are defined within
the curly braces. The namespace context of the ancestors will be
applied to the constructed nodes:

  <a xmlns='x'>{ <b/> }</a>

So you’ll either need to get rid of the additional function, or you
can use the 'map' prefix. As it’s statically defined in BaseX, you can
omit the xmlns:map declaration:

declare function local:list() {
  <string>1</string>
};
<map:map>{ local:list() }</map:map>

Hope this helps,
Christian

Reply via email to