Of course, Liam, but of course the BaseX format has its escaping rules, so that it works *always*. The names become less beautiful here and there, but in practise a couple of warped names among hundreds of nice and meaningful ones are better than meaningless names throughout. A document with element names being "map", "array", "string", "number", "boolen", "number" and "null" is totally at odds with the goal to *express* information in a natural and intuitive way. (It's like ordering "liquid matter (named beer) and solid matter (named Bratwurst), politeness token (named please)", instead of "A beer and a Bratwurst, please." Nota bene, "ordinary" messages and "ordinary" configurations speak XML compatible names more or less exclusively. If one has to *work* with JSON data (extractions, transformations, reporting), it would be downright eccentric to opt for the W3C format if you have access to the BaseX one. I hope the W3C will come up with a meaningful format definition, comparable to the BaseX one. The importance for the scope of XQuery applicability cannot be overestimated.
Kind regards,Hans-Jürgen
Liam R. E. Quin liam@w3.org schrieb am 22:02 Samstag, 26.August 2017:
On Sat, 2017-08-26 at 13:53 +0000, Hans-Juergen Rennau wrote:
I find the W3C-defined format obtained from fn:json-to-xml unnatural and unpractical;
It is, but it works in more cases. JSON keys can have values that aren't possible XML element names, e.g. { "1" : "one", "2" : "two", "*" : "lots" }