xsl-list
[Top] [All Lists]

Re: [xsl] XSLT functions for JSON

2008-05-19 00:35:20
On Mon, May 19, 2008 at 7:54 AM, Jesper Tverskov 
<jesper(_at_)tverskov(_dot_)dk> wrote:
This thread is about the need for functions in XSLT making it easy to
transform relevant XML to JSON and json2xml.

your original post listed drawbacks to JSON which you then go to solve
by proposing functions marshaling a serialization format into XML ...

We should not discuss JSON versus XML.  JSON is mostly relevant for
AJAX based web application in order to optimize them for speed and for
an easier interface.

agreed to the speed argument ... I would place a caveat to 'easier
interface' and say 'if working in javascript, provides an easier
interface'

At the beginning of the thread I proposed 3 functions, a general
json2xml and a pair of xml2json and json2xml making back and forth
transformation possible.

yes, but I would argue to just not use JSON and use XML ... I am
assuming u are talking about the scenario where u are forced to use
JSON .... which in that case you can either spend the time to provide
a generic solution and all that entails (roundtripping will be
interesting) or just have separate widget outside of XSLT that
converts JSON into XML.

The back and forth is far the most difficult and maybe not that useful
except that it so to speak is proof of the pudding.

Still it would be nice to have jason2xml (FXSL is one example) and
also xml2jason for data-oriented markup when it makes sense. And maybe
we should just accept that back and forth transformation is only
possible and relevant for the most data-oriented and json friendly
XML.

EXSLT is another possibility for XSLT 1 (now that firefox 3 has it built in it)

gl, Jim Fuller

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

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