[XSL-LIST Mailing List Archive Home]
[xsl] XSL support detection
Subject: [xsl] XSL support detection|
From: "Wesley W. Terpstra" <wesley@xxxxxxxxxxx>
Date: Sun, 18 Aug 2002 06:17:10 +0200
Ok, another question I can't find a good answer too.
My application supports server-side xslt or client-side.
The browser can access .html or .xml.
However, I would like the front-page to somehow check for xslt and redirect
the browser to the right location.
First I thought: simple! Make an xhtml index file which references an xsl
stylesheet. Then have the stylesheet rewrite the meta http-equiv refresh.
If the browser doesn't support xsl, it will look at the xhtml and follow the
refresh that is there. If the browser does, it will apply the stylesheet and
have a new refresh location.
However, after much banging of my head against the wall, I finally realized
that it doesn't matter a damn what content-type the webserver says it is,
IE6 _will not_ apply xslt unless the file is called *.xml!
So, an alternative is to call the index .xml, but have the content-type be
xhtml. However, this would simply die on older browsers! This defeats the
whole point of the detection.
If anyone has an idea how to make this trick work, let me know!
extension that deals with XSL. Is there a (non microsoft-only) way to detect
the capability to render with xsl? I don't really want to play the game of
browser detection since there are so many out there.
Wesley W. Terpstra <wesley@xxxxxxxxxxx>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list