Dear BaseX team,
I have a problem with a subtle bug which has been introduced with version 7.8, it seems.
In 7.7, the declare copy-namespaces ..., inherit;
was implemented correctly - see below for example code and result.
But from 7.8 on, copy namespaces mode "inherit" is ignored.
I would greatly appreciate if you could restore the correct behaviour, as I have code running which must be compatible with XQuery 1.0 and which needs to "add" in-scope namespaces dynamically. (And in XQuery 1.0 I see no alternative to the pattern shown below.)
Kind regards - Hans-Juergen
Example code: ================================ declare copy-namespaces preserve, inherit;
declare function local:addNamespace($elem, $prefix, $uri) { let $qname := QName($uri, concat($prefix, ':dummy')) return <A>{ attribute {$qname} {""}, $elem }</A>/* };
let $elem := <foo/> return local:addNamespace($elem, 'z', 'http:example.com')
================================
=> BaseX 7.7:
<foo xmlns:z="http:example.com"/>
BaseX >= 7.8: <foo/>