[xsl] Browser-based XSLT page initialization...

Subject: [xsl] Browser-based XSLT page initialization...
From: "M. David Peterson" <m.david@xxxxxxxxxx>
Date: Thu, 08 Mar 2007 05:59:17 -0700
As mentioned in the PI vs. Javascript transformation thread from a while back, here's the code that matches my point of using Browser-based XSLT/PI's to minimize your overall code size, performance, and the frustrations of attempting to build cross-platform Javascript which uses client-side browser sniffing which code to determine whice code it actually understands.

http://extf.googlecode.com/svn/trunk/WebApp/public_web/ (specifically: http://extf.googlecode.com/svn/trunk/WebApp/public_web/index.xml and http://extf.googlecode.com/svn/trunk/WebApp/public_web/build-output.xsl )

The idea is simple: Use a declarative-style approach to your web apps in which you declare "here's this, please give me this in return" to then let the peculiarities of each browser do whatever it needs to do to accomplish what needs to be done, without first having to parse through a bunch of browser sniffing code to get to the stuff it understands.

The result tends to be smaller code files, smaller DOM objects, faster load times, and the ability to isolate browser specific issues, making your code that much easier to debug.

PLEASE NOTE: All this does is initialize the page with the css and javascript files that are specific to the browser, and renders any hardcoded XHTML, which could just as easily be copy/pasted into the page:content element from an existing XHTML code base.  In other words, this can and should be used to do nothing more than compliment the code base you already have.  Nothing more, nothing less.


M. David Peterson
http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | http://dev.aol.com/blog/3155

Current Thread