Re: printing using a different XSL

Subject: Re: printing using a different XSL
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Tue, 12 Sep 2000 18:55:01 +0100
Eric,

>Hi all.  One again I'm messing with stuff way over my head (though I
>understand more than I did a month ago!)--I appreciate all the patient
>assistance I've gotten!  When my page gets printed, it needs to look
>different than when displayed on the screen--is there a way to use a
>different XSL for printing (with IE5) than for  on screen viewing with IE5?

The xml-stylesheet processing instruction has almost exactly the same
pseudo-attributes as the HTML 'link' element has attributes, so presumably
the intended usage is something like:

<?xml-stylesheet type="text/xsl" href="screen.xsl" media="screen" ?>
<?xml-stylesheet type="text/xsl" href="print.xsl" media="print" ?>

with your browser choosing between them.  However, having tried this out
with IE5, MSXML (July), I can report that the 'media' pseudo-attribute is
resolutely ignored: the first xml-stylesheet processing instruction is used
no matter what the 'media' it declares.

Probably your best bet is to have a link from your screen version to a
'printable version' that either uses a different stylesheet or the same
stylesheet with a parameter indicating whether it's intended for screen or
print.

Sorry not to be more help,

Jeni

Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread