I am having issues with the new json-to-xm functions with a copy clause.
I would expect the following query to work:
*let $json := '{"age":23,"name":"Bob"}'return copy $out := json-to-xml($json) modify delete node $out//*[@key='age'] return xml-to-json($out)*
Instead I get an error when calling xml-to-json: [FOJS0006] Element 'map' has invalid namespace: ''.
It appears the copy clause is dropping the namespace on the map object. Is this something I must manually prevent or a bug?
Thanks for all your time. - James
James, thanks for the hint. The bug has been fixed [1]. All the best, Christian
[1] http://files.basex.org/releases/latest
On Thu, May 28, 2015 at 6:39 PM, James Wright balugajames@gmail.com wrote:
I am having issues with the new json-to-xm functions with a copy clause.
I would expect the following query to work: let $json := '{"age":23,"name":"Bob"}' return copy $out := json-to-xml($json) modify delete node $out//*[@key='age'] return xml-to-json($out)
Instead I get an error when calling xml-to-json: [FOJS0006] Element 'map' has invalid namespace: ''.
It appears the copy clause is dropping the namespace on the map object. Is this something I must manually prevent or a bug?
Thanks for all your time.
- James
basex-talk@mailman.uni-konstanz.de