[xquery-talk] Adaptive serialization of an empty sequence

Joe Wicentowski joewiz at gmail.com
Sat Apr 14 11:14:50 PDT 2018

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?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://x-query.com/pipermail/talk/attachments/20180414/2d1dd4be/attachment.html>

More information about the talk mailing list