[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] XSLT 3.0 JSON processing -- a few comments from a friend


Subject: Re: [xsl] XSLT 3.0 JSON processing -- a few comments from a friend
From: "Dimitre Novatchev dnovatchev@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 8 Jan 2015 00:10:05 -0000

On Wed, Jan 7, 2015 at 4:01 PM, Michael Kay mike@xxxxxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> In the meantime, XPath 3.1 has come out with a data model for arrays, which although it has some usability problems, is technically workable. So some of the
> original justification for developing the JSON-to-XML conversion has disappeared. However, I think many people would still consider it useful, especially as
> transformation of XML using pattern-matching template rules still works far better than transformation of JSON-like map/array hierarchies. If you want to get
> your JSON into a form where XSLT can manipulate it, converting it to XML as input to a transformation step is going to work much better than transforming it to
> maps and arrays. There are various reasons for this: patterns for matching nodes are much more powerful than patterns for matching maps and arrays, and
> navigation within XML trees using the full set of XPath axes is much more powerful than navigation within map/array structures.

I am part of the group of programmers who find the current XML
representation of JSON rather stressful.

Therefore a wish for a compromise:

            Could a second function be added that alongside with
json-to-xml(), would convert JSON to a map?

Then the future will show which of the functions is more generally
used and valuable -- ideally both will be.


-- 
Cheers,
Dimitre Novatchev


Current Thread
Keywords