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

Thursday, March 24, 2011

Portable GIT for windows

I was facing issues setting up my git account the other day because my default user.home was pointing to a H: drive on which I only had read rights. Really helpfull if you ask me. Anyway... i found this nice article of how to create a portable GIT config.

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

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

Goal of project: Easily allow webapps within our intranet to fetch data from XML DB (Sedna) in JSON format.

First I wanted to come up with a XML schema to represent JSON data. So after some trial and error I ended up with following schema:


Some concrete examples of above schema:










More info available at Part 2