Subject: Re: [xsl] <quote>XSL is NOT easy</quote>|
From: "M. David Peterson" <m.david@xxxxxxxxxxxxx>
Date: Tue, 26 Jun 2007 10:48:41 -0600
On Tue, 26 Jun 2007 09:51:14 -0600, Dimitre Novatchev <dnovatchev@xxxxxxxxx> wrote:
Recently I reported to this list how easy it was to parse and convert JSON documents into XML ones using a general LR(1) parsing framework written entirely in XSLT 2.0.
And it was even easier to take the FXSL JSON-to-XML conversion/parsing utility that I was able to turn it into a Saxon on .NET-drive web service[1,2] in about 5 minutes.
http://personplacething.info/service/json-to-xml/?debug=true&uri=http://api.l ocal.yahoo.com/MapsService/V1/trafficData?appid=EricBlogDemo&city=Seattle &state=wa&output=json
 http://extf.googlecode.com/svn/trunk/WebApp/service/json-to-xml/service.op  http://extf.googlecode.com/svn/trunk/WebApp/transform/model/json-to-xml.xslt
Such is the power of using well designed languages, language processors, and associated extension libraries.
NOTE: I still need to write a proper query-string parser to specify whether a query-string variable belongs to the service end point or a URI specfied as a query string variable, so at the moment the query string variables are hard coded into this demo. But that is a specific issue associated with using URI's, HTTP GET and query string variables, not with XSLT 2.0/Saxon on .NET/FXSL. You could just as easily use an XML payload via either GET or POST and avoid tbis specific issue all together.
M. David Peterson http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | http://dev.aol.com/blog/3155