Re: [xsl] Using xsl:output in browsers, was: Re [xsl] XHTML html validation

Subject: Re: [xsl] Using xsl:output in browsers, was: Re [xsl] XHTML html validation
From: Abel Braaksma <>
Date: Tue, 20 Feb 2007 15:48:26 +0100
Manfred Staudinger wrote:
Its available in most modern browsers, it has no known security issues, it
is working independent of browser settings, it runs before any JS, it provides
screen-reader compatibility - this in _addition_ to the JS triggered

This is only partially so. But instead of this discussion, I tried to move it upwards a little to show the pros and cons of either.

What I want to compare is: PI + JS transformations vs. JS transformations

There is no use in that, because PI+JS vs JS == PI.
By comparing PI vs JS alone, one can decide to either combine the techniques or not.

On the PROS side for PI (partially copied from Manfred):
- less security problems than with Javascript,
- overall easier to implement
- easy to understand and follow
- no javascript needed to get it working

On the CONS side for PI
- can be a bit hard to setup the non-standard PI instruction for one browser and the standard PI instruction with correct IANA mimetypes for the other, if you bother at all for this (other browsers allow the IE-only erroneous declaration)
- cannot serve the xml as text/xml anymore, IE expects text/html (perhaps others?) or it shows the content.
- no way to pass in parameters
- heavy load when used to fill IFrames (each IFrame is internally a new browser window), which makes it not ideal to build a page out of tiles or snippets.

Of course, if you can without client side transformations, it is even better.

-- Abel

Current Thread