Joe Wicentowski
2018-04-14 18:14:50 UTC
Hi all,
Many thanks, as always, for the very helpful feedback here.
I have noticed that Saxon, eXist, and BaseX all serialize the empty
sequence `()` not as `()` but instead as the empty string ``. Sample code:
serialize((), map { "method": "adaptive" })
I was expecting to see `()` because when serializing a map entry, the empty
sequence is serialized as `()`:
serialize(map { "test": () }, map { "method": "adaptive" })
This returns `map{"blah":()}`.
Can anyone enlighten me on why the empty sequence is serialized as `()` in
the latter context and the empty string in the former?
Thanks,
Joe
Many thanks, as always, for the very helpful feedback here.
I have noticed that Saxon, eXist, and BaseX all serialize the empty
sequence `()` not as `()` but instead as the empty string ``. Sample code:
serialize((), map { "method": "adaptive" })
I was expecting to see `()` because when serializing a map entry, the empty
sequence is serialized as `()`:
serialize(map { "test": () }, map { "method": "adaptive" })
This returns `map{"blah":()}`.
Can anyone enlighten me on why the empty sequence is serialized as `()` in
the latter context and the empty string in the former?
Thanks,
Joe