Altova Mailing List Archives

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

From: "M. David Peterson" <m.david@---------->
Date: 3/8/2007 12:56:00 PM
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. (specifically: and )

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 | |


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.