Wednesday 24 December 2008

XML Love In

Ok, so realize that to some people XML is just a bit overrated and not worth getting excited about. I know, I used to be one. Sure there's some benefit in having a standardized syntax but when I first learn about XML I couldn't see beyond that. It was just a way of adding a standard structure to your file yet to me that structure was still arbitrary.

Fast foward to the present and I'm starting to realize that the real benefit of XML is having lots of standards use it. When my web pages, my images and my data are all in XML I can begin to do some powerful things like covert my data into an image automatically (XML -> SVG via XSLT). I can also do powerful things like create a form that automatically binds to the XML data I give it without me having to carefully construct it. XForms (though support is currently weak) will be a huge improvement over the current HTML forms as you can throw many inputs into your form and only the ones that match your XML data will be used! Great concept.

So yes, I've gotten the XML bug just a little though it's not all straight sailing. Despite knowing that I can convert my XML data into images I still haven't managed to get it working as I expect it should. Browsers are still weak on allowing you to debug XSLT. Sure I could generate the SVG server side, still using XSLT if I wished but that's not the point. I want to deliver the data to the browser and let it render it as needed.

I've got the bug so bad that Im' now thinking of all the ways I can use XML in my intranet site. I want to experiment with submitting XForms via SOAP (though I thnk thats XForms 1.1) and I want to look at being able to pull an XForms instance via SOAP also. I would like to be able to use XSLT to completely transform my data into a web page that looks the same as my existing pages. Then all I would need to worry about was the correct generation of my XML data. I would also like to better validate my data against my still growing schema. I would like to be able to use XSLT to transform my XML data into formats for use by other applications.

So many things to think about. The power of XML is just begining to dawn on me and I'm enjoying it. Just though I would share all this with you nice folks.

If anyone out there has managed to get embedded SVG (ie in an XHTML page) working form an XSLT tranformation of XML data withing firefox then I'd love to hear about it.

Thanks.