[xquery-talk] Adaptive serialization and indendation

Joe Wicentowski joewiz at gmail.com
Sat May 27 19:36:08 PDT 2017


Hi all,

I'm involved in commissioning the addition of adaptive serialization [1] to
eXist [2], and I would like to confirm my reading of the spec.  It appears
that adaptive serialization has no facility for indenting maps and arrays.
The ser/method-adaptive.xml tests in the qt3 test suite reflect this
understanding, esp. tests 32-34.

In other words, `map { "a": "b", "c": "d" }` must be serialized as
`map{"a":"b","c":"d"}` without any whitespace inserted inside the map
constructor or between the map entries, and it would be *incorrect* to
serialize this map as:

```
map {
    "a": "b",
    "c": "d"
}
```

Is there room for implementations to use such indentation and still call it
"adaptive"?  If so, what basis is there in the spec for such behavior?

Thanks in advance for any insights into this question,
Joe

[1] https://www.w3.org/TR/xslt-xquery-serialization-31/#adaptive-output
[2] https://github.com/eXist-db/exist/issues/1124
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://x-query.com/pipermail/talk/attachments/20170527/fda2e31d/attachment.html>


More information about the talk mailing list