xsl-list
[Top] [All Lists]

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

2015-01-07 18:10:11
On Wed, Jan 7, 2015 at 4:01 PM, Michael Kay mike(_at_)saxonica(_dot_)com
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> 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
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>