If you're interested in functional programming, you might also want to checkout my second blog which i'm actively working on!!

Wednesday, March 16, 2011

Building JSON webservices with Sedna, XQuery, Apache Cocoon and XSLT2.0 (part 2)

Next I needed to come up with a generic xslt that would transform the Javascript-ish xml representation to JSON.

So after some struggling i ended up with following solution:

So with input below I would get

output below:

Please pay attention to the fact that I even took care of supporting formatting date(time)s and numbers with my implementation.

Another more complex example

will result in

No comments:

Post a Comment