On Tue, 26 Jun 2007 09:51:14 -0600, Dimitre Novatchev
<dnovatchev(_at_)gmail(_dot_)com> 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.local.yahoo.com/MapsService/V1/trafficData?appid=EricBlogDemo&city=Seattle&state=wa&output=json
[1]
http://extf.googlecode.com/svn/trunk/WebApp/service/json-to-xml/service.op
[2]
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:D
M. David Peterson
http://mdavid.name | http://www.oreillynet.com/pub/au/2354 |
http://dev.aol.com/blog/3155
--~------------------------------------------------------------------
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>
--~--