Wednesday, January 27, 2010

Transforming XML Browser-Side

I like using XML and XSLT and find it a simple and powerful way to produce friendly, web-centric content. My utopia would be an easy to develop SQLXML output, which can be pumped as directly as possible to the browser, which then uses XSLT client side to render XHTML.

Currently, this is possible by using (for me) C# to pull the SQLXML content from the DB (I'm using T-SQL, ie: MSSQL, processing it using the .NET XML transformation API ( and pushing the produced XHTML to the browser.

This approach is good because any extraneous processing or user values, validation, security and browser differences can be catered for, while removing strain on the browser. It's important to note that asking the client to do the XSL transformation isn't a great idea because browsers like Mobile Safari will ask a remote service to do the transform, which slows things down and will obfuscate a lot of data away from your app.

However, if you want to go ahead with having the browser do the heavy XSLT lifting, the best place to start is:

No comments:

Post a Comment