Hi,
we've recently updated BaseX from 10.5 to 10.6 and it seems there was some change in the namespace declaration behavior.
Example:
declare function local:list() as element()+ { ( <string>1</string>, <string>2</string>, <string>3</string> ) };
declare function local:to-json() as element() { <map xmlns="http://www.w3.org/2005/xpath-functions"> <string key="id">id</string> <array key="list">{local:list()}</array> </map> };
local:to-json()
Output 10.5:
<map xmlns="http://www.w3.org/2005/xpath-functions"> <string key="id">id</string> <array key="list"> <string>1</string> <string>2</string> <string>3</string> </array> </map>
Output 10.6:
<map xmlns="http://www.w3.org/2005/xpath-functions"> <string key="id">id</string> <array key="list"> <string xmlns="">1</string> <string xmlns="">2</string> <string xmlns="">3</string> </array> </map>
The empty namespace attributes are added when the elements are created with a function and not directly in the context of the parent element.
Was this intended and if yes is there a switch to get the old behavior back?
Best Regards Johannes