Re: [xsl] analyze-string regex

Subject: Re: [xsl] analyze-string regex
From: "Abel Braaksma (Exselt)" <abel@xxxxxxxxxx>
Date: Fri, 28 Mar 2014 04:59:09 +0100
On 27-3-2014 18:06, Rushforth, Peter wrote:
>> > 
>> > There might be a JSON-to-XML library out there, which'd be my first choice.
> Yes, that was my first instinct too.  I found a generic json2xml.xsl library, but it 
> performed too slowly.  I figured I needed something more specific in order to
> speed things up.
>
>


As it turns out, if you can use XSLT 3.0, you can use the new
fn:json-to-xml() function, which takes JSON as input and produces XML as
output. Conversely, it also has the fn:xml-to-json() function, which
takes a predefined XML format that represents JSON and returns the JSON
representation of that XML.

The XML produced, or the XML that is used as input is well-defined.
http://www.w3.org/TR/xslt-30/#schema-for-json.

(note: we have not yet implemented that function, otherwise I would
invite you to the testing team to have a look. If you are interested, I
can drop you a line once we have it)

Cheers,

Abel Braaksma
Exselt XSLT 3.0 processor
http://exselt.net

Current Thread