This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

XSL support detection


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!


Round 2: javascript!

I am not a javascript wizard, but I know that there is at least a microsoft
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@terpstra.ca>

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]