xsl-list
[Top] [All Lists]

RE: [xsl] [XSL] XSL Browser Integration

2007-09-14 14:36:52
-----Original Message-----
From: Alain [mailto:alainb06(_at_)free(_dot_)fr] 

Does W3C, and you, experts readers of this list, view XSL *MOSTLY* as a 
server-side technology?
--~------------------------------------------------------------------

Very much so. I use XSLT as much as I can at work for handling the big,
sweeping, tedious logical transformations for merging our UI layout
coming from the session / configuration scripts, and large amounts of
data coming from SQL. Since XSLT "styling" is more of a structural
"style", you'd still need CSS on the client to present your end data.
(XSL-FO aside.) Plus, when the documents are transformed on the server
side, you know EXACTLY what engine is being used to transform it, and so
you don't need as many workarounds for implementation inconsistencies.

That said, if you'd still like to use XSLT on the client side (not a bad
idea overall, it pushes some of the work to the client), I'd say you
should still use a preprocessor-based wrapper script to do your initial
transformations - you can easily capture any GET/POST parameters at this
point and pass them into the transformation. Also, you can do multiple
transformations here if needed, and perform any side-effect-producing
actions. (output data to a file, database manipulations, etc.)

When you're certain that any remaining transformations are purely
presentational and can be handled by the current browsers on the market,
then you can send an HTTP header of "Content-type: application/xml" (or
text/xml, I'm not sure how the browsers react) and write your final XML
data straight to the output. If have a transformation that you know will
always happen directly before this point, you can even create the
<?xml-stylesheet?> processing-instruction there.


The main issue is that browser inconsistencies in client-side XSLT have
dramatically different effects compared to CSS. Where your output might
simply be mis-styled or ugly with CSS, it will exist in the result
document at a completely different position with XSLT, or even, worse,
won't exist at all. (See the recent discussion regarding Opera and the
document() function.) Server-side transformations are, for all intensive
purposes, much safer than client-side ones.

~ Scott

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--