Re: [xsl] links don't work when IE transforms local XSL document

Subject: Re: [xsl] links don't work when IE transforms local XSL document
From: Anton Triest <anton@xxxxxxxx>
Date: Sat, 02 Oct 2004 00:04:32 +0200
Hi Pieter,

I could reproduce your (interesting) problem. IE is loading the xsl as xml because of its extension.

Well not really as xml, because all the formatting is correct, the links show as links
and even the CSS styles are OK, it's apparently only the anchors that don't work.


Renaming the file's extension to .html solves the problem.

Yes but strangely, renaming to .xml also solves it. It seems like IE treats
the anchors differently just because it's a local xsl file.

You're right about that IE doesn't use MSXML 4.0 - you should work against
what IE uses: 3.0 or make sure that your clients use 4.0 and use Javascript
to use the 4.0 version-specific dll classes.


Sorry I don't understand this - how can I make my IE use another version of MSXML?
(I have MSXML 3 and 4 installed in my windows/system folder, but I don't have a clue
if any program uses the 4.0 version, or how I could change that, or how Javascript
is involved in this)


Like Tom Passin already pointed out, serving an .xml or .xsl in IE will not
activate the html rendering feature, therefore the anchors do not appear. I
tried to make IE aware of how it should treat the .xsl:

<xsl:output method="html" encoding="utf-8" indent="yes"
       doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
       doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";
       media-type="html"/>

I first added the attribute media-type but nothing changed. Then I changed
the attribute method from xml to html. Nothing changed.

I'm afraid you will need to change the MIME-type that IE recieves from the
server that sends the file out.
See http://www.xml.com/pub/a/2003/03/19/dive-into-xml.html

Thx! interesting article (I like reading Mark Pilgrim) but I don't think this can be solved with
MIME types because the error also occurs with "plain html" output (and, as it turned out, only
on local xsl files, so the server is the local filesystem) - BTW: MSXML3 adds this meta tag to the
output: <META http-equiv="Content-Type" content="text/html; charset=UTF-16">


Anyway, thanks a lot
Anton

Current Thread