Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Applying CSS to client-side transformed pages

From: Peter Flynn <peter.nosp@-.--------.-->
To: NULL
Date: 4/2/2006 1:20:00 PM

Simon Brooke wrote:
> I've been doing XSL transforms, converting XML to HTML, server side since
> 2000. In those days, clients which could do the transformation client
> side didn't exist, so whether to transform client-side or server-side
> wasn't an issue.
> 
> Recently I've been overhauling the code in order to pass transform to the
> client wherever possible, and I've hit two problems

Right. Client-side XML isn't worth it unless you can control the browser
version. For some unexplained reason, browser-makers simply haven't put
any effort into fixing client-side transformation yet.

> (i) How do I know whether the client can do transforms? Currently I'm
>     only passing the transform to the client if the client sends an
>     'Accepts' header which contains either 'application/xml' or
>     'text/xml'. However, Internet Explorer 6, which apparently can do
>     transforms client side, doesn't send either of these.

See http://xml.silmaril.ie/users/browsers/

> (ii) When the transforms transform XML to HTML which includes a link to a
>     CSS stylesheet, the visual appearance (in Firefox, anyway) which
>     results from a client-side transform is quite different from that
>     which results from a server-side transform, and it appears that the
>     CSS styling is being applied before the XSL transform is complete.

That sounds unlikely. XSLT transformation undergoes serialisation only
as the last stage (in the applications I have seen) so it ought to apply
CSS only once the output HTML hits the browser's parser. But I guess
it's possible that it works differently internally -- yet another reason
why client-side transformation simply isn't worth it yet.

>     How can I ensure that the CSS is applied to the completed page?

You can't. IE is hopelessly broken. Firefox is better, but still
incomplete. Opera is slightly better still, but all three do a number
of things differently, and some of them are just plain wrong.

///Peter
-- 
XML FAQ: http://xml.silmaril.ie/


transparent
Print
Mail
Like It
Disclaimer
.

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 www.altova.com/list/index.html. 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.

.
.

transparent

transparent