[xsl] XSLT Processor Detection

Subject: [xsl] XSLT Processor Detection
From: "Kevin Nardi" <kevnardi@xxxxxxxxxxx>
Date: Tue, 24 Jul 2001 15:07:33 -0700
I'm trying to figure out what XSLT processor a browser is running, so I copy/pasted the processor-version.xsl source into a new xsl document, and modified it to put a cookie in the user's browser, like so:

<?xml version="1.0"?>
<?xml-stylesheet href="xslProcessorCheck.xsl" type="text/xsl"?>

<html xsl:version="1.0"
<title>XSLT Processor Check</title>
var expDate = new Date("June 13, 2023");
<xsl:when test="false()">
<msxsl:if test=".">
var xslprocessorcookie = "upcast_xslprocessor=old;path=/;expires=" + expDate.toGMTString();
<msxsl:when test=".">
var xslprocessorcookie = "upcast_xslprocessor=old;path=/;expires=" + expDate.toGMTString();
var xslprocessorcookie = "upcast_xslprocessor=new;path=/;expires=" + expDate.toGMTString();
document.cookie = xslprocessorcookie;
window.navigate("<:var returnTo>");

However, when I try to load the xsl file, I get a "Syntax error" on line 14. Line 14 appears to be the first <xsl:choose>. Any ideas on what's wrong? Thanks.


Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

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

Current Thread