Re: XSLT like CSS with media and different styles

Bernd Fuhrmann <[email protected]>
Newsgroups gmane.comp.mozilla.devel.layout.xslt
Organization Private
Message-ID <[email protected]>
Axel Hecht wrote:
> This is not implemented, and I don't see us doing it, really.
> 
> Note that doing a new transform for printing would nuke all form entries 
> in a page, for example, which would be a very unexpected behaviour.

Yes, this would certainly be difficult. To be honest, I have no idea how 
it is currently done (especially handling script-generated content) or 
if such a thing could be solved.

> I'd suggest that you do one transform, and then work with CSS.

That is what I was about to do now. But it is sometimes nasty because 
you need to have all your structural changes in advance and then select 
via display:none and so on which one you want to have. This is not good. 
It's also a waste of resources.

> There is no support for alternative stylesheets on XSLT either. Not sure 
> what the specs would say on that.

The reason why I thought that it might be possible is this one:
http://www.w3.org/TR/xml-stylesheet/

This document says something about an alternative way to use CSS (via 
processing instruction). It does not say, however that this is limited 
to CSS. There is not much difference to specifying an XSLT stylesheet. 
So I thought it would be just logic to have XSLT stylesheets handled in 
the same way. It would certainly be useful, because one could change the 
actual structure of a document depending on the media.

Just think you would have a look at a site with your browser 
(media=screen) that contains some applet. Then you want to print that 
site and get a different document that explains e.g. different states of 
that applet, so you wont miss anything important. To have such thing it 
would be useful (though not absolutely necessary) to have 
media-dependant XSLTs.

What's your opinion?

Regards,
Bernd Fuhrmann
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.