Steve Downey wrote:> In reading a few threads at the Firefox site, this appears to be a function
of
> the web server giving the wrong mime type. But I can access the XSLT file
> directly just fine. It seems that Firefox only has a problem with WEBricks
> Content-type if it tries to fetch the XSL file via a processing
instruction.
Surely accessing it is different to accessing it and using it as XSLT - I
think that''s where the problem occurs. If you''re simply
accessing it, you''re
probably seeing it as plain text, since that''s probably what the server
will
serve it as if nobody has set it up for the specific MIME type you require.
Have you tried this?
@headers["Content-Type"] = "application/xslt+xml"
There is some debate about which MIME type is correct for XSLT (some use
"application/xml" or even "text/xsl", which kinda sucks but
is probably the
most likely to work) - it''s all about as clear as mud, see these links
for a
few more details:
dpawson.co.uk/xsl/sect2/mimetypes.html
xslt.com/html/xsl-list/2002-06/msg01043.html
Actually, you''ll probably find that if you use the proper MIME type, it
won''t
work in IE for the same reasons that XHTML 1.1 served properly as
"application/xhtml+xml" won''t work in IE (because
IE''s understanding of
certain MIME types is utterly useless). You should ideally configure your
server to do content negotiation, based on "Accept" headers and Q
value, but
maybe this is the problem in WEBrick, that you don''t have it set up?
(I don''t
know how to set it up in WEBrick either.)
If in doubt, "text/xsl" is probably your safest bet for the moment....
yuck.
Firefox is a lot stricter than IE, and for example, would also refuse to work
with a CSS file that was served as "text/plain" instead of
"text/css". While
on the surface this may seem annoying, it''s a good thing, because
Firefox
doesn''t silently swallow the error in your server configuration like IE
does.
Firefox is designed to improve the web for everyone, by making web
developers do things properly for once, so be glad that it shows you when your
setup is broken! ;-)
Oh, and this is a very very useful Firefox extension for troubleshooting these
kind of problems:
livehttpheaders.mozdev.org
Cheers,
~Dave
--
Dave Silvester
Rent-A-Monkey Website Development
Web: rentamonkey.com