RE: [xsl] XSLT Processor Detection

Subject: RE: [xsl] XSLT Processor Detection
From: "Kevin Nardi" <kevnardi@xxxxxxxxxxx>
Date: Wed, 25 Jul 2001 12:28:03 -0700
Well, the processor-version.xsl on seems to work correctly. I think this is because if you have the old version, only the WD-xsl code is processed, while if you have the new version, only the XSLT code is processed.

Anyway, I finally was able to accurately detect the XSLT version using this code:

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

<html xsl:version="1.0"
   <title>XSLT Processor Version</title>
		var version = "old";
     <xsl:when test="false()">
       <msxsl:if test=".">
         <script>version = "old";</script>
         <msxsl:when test=".">
           <script>version = "new";</script>

var expDate = new Date("June 13, 2023");
var versionCookie = "upcast_xslprocessor=" + version + ";path=/;expires=" + expDate.toGMTString();
document.cookie = versionCookie;



From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: [xsl] XSLT Processor Detection
Date: Wed, 25 Jul 2001 09:56:05 +0100

> I'm trying to figure out what XSLT processor a browser is
> running, so I
> copy/pasted the processor-version.xsl source

> <html xsl:version="1.0"
>       xmlns:msxsl="";
>       xmlns:xsl="";

Mixing WD-xsl and XSLT in the same stylesheet is like mixing COBOL and
FORTRAN in the same program. It doesn't work.

Mike Kay
Software AG

XSL-List info and archive:

Get your FREE download of MSN Explorer at

XSL-List info and archive:

Current Thread