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: Pieter Reint Siegers Kort <pieter.siegers@xxxxxxxxxxx>
Date: Fri, 1 Oct 2004 17:56:12 -0500
Hi Anton,

Yeah, you're right about your comments. I said like 'xml' not because of the
view but because of the browser's interpretation of the content. And I
didn't realize that .xml does work locally - that makes it even weirder!
Looks like it is a specific IE6 problem, mot MSXML... so even if you were
able to use MSXML 4.0, then you may still have the same problem.

Let us know what you think and what you plan to do about it. I'm interested
in knowing the eventual outcome. 

BTW, I think xdoc is a brilliant idea, I see some similarity with C#
documentation tags. Very useful stuff.

Cheers,
<prs/>

-----Original Message-----
From: Anton Triest [mailto:anton@xxxxxxxx] 
Sent: Friday, October 01, 2004 5:05 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] links don't work when IE transforms local XSL document

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