[xquery-talk] Adaptive serialization and indendation

Joe Wicentowski joewiz at gmail.com
Tue May 30 12:18:04 PDT 2017


Hi Liam,

Many thanks for this helpful response about the "spirit" of the spec here.
I have one last question - do you have a sense why section 10.1.4 makes
this statement?

> The indent and suppress-indentation parameters are not directly
applicable to the Adaptive output method. [1]

(What throws me off a bit here, of course, is that Adaptive is the only
output method that serializes maps *as* maps, so there isn't anywhere else
to look for direct guidance on indentation of maps.)

I may well proceed with the bugzilla request, but if you have any further
insight on this question, it would help me understand whether the current
phrasing was an unintentional oversight or whether there was some other
consideration that led the WG to state the above.

Thanks again,
Joe

[1] https://www.w3.org/TR/xslt-xquery-serialization-31/#ADAPTIVE_INDENT

On Sun, May 28, 2017 at 3:13 AM, Liam R. E. Quin <liam at w3.org> wrote:

> On Sat, 2017-05-27 at 22:36 -0400, Joe Wicentowski wrote:
> >
> > [...]
>
> > 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?
>
> Here's a personal response - use bugzilla (see the status section of
> the spec,
> https://www.w3.org/TR/xslt-xquery-serialization-31/
> for details) if you want a Working Group response.
>
> The Working Group will probably close soon, however.
>
> So,
>
> https://www.w3.org/TR/xslt-xquery-serialization-31/#JSON_INDENT
> has, for JSON,
> [[
> The indent parameter controls whether the serializer adjusts the
> whitespace in the serialized result so that a person will find it
> easier to read.
> ]]
> (the spec doesn't say _which_ person!).
>
> OK, and now we see, in 10.1,
> [[
> For some item types the Adaptive output method will delegate
> serialization to other output methods. [...] serialization parameters,
> if set, will be passed down to the serialization method that is
> applied  to each item in the supplied sequence.
> ]]
>
> So as I read it you have as implementor a license to pass the indent
> parameter down and to use JSON serialization for maps and arrays and
> hence to allow the readable indenting.
>
> Certainly that's in the _spirit_ of the adaptive method. And using a
> serialization parameter would also let you pass the tests :) although
> I don't know how important that is to you.
>
> Again, this is based on my own reading of the spec, and being at the
> meetings and on the calls, but it's not an "official" response.
>
> Best,
>
> Liam
>
>
> --
> Liam R. E. Quin <liam at w3.org>
> The World Wide Web Consortium (W3C)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://x-query.com/pipermail/talk/attachments/20170530/4519fd84/attachment.html>


More information about the talk mailing list