[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XSLT Processor Detection

Subject: XSLT Processor Detection
From: "Kevin Nardi" <kevnardi@xxxxxxxxxxx>
Date: Tue, 24 Jul 2001 15:07:33 -0700
processor detection
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"
xmlns:msxsl="http://www.w3.org/TR/WD-xsl"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/TR/xhtml1/strict">
<head>
<title>XSLT Processor Check</title>
</head>
<body>
<script>
var expDate = new Date("June 13, 2023");
<xsl:choose>
<xsl:when test="false()">
<msxsl:if test=".">
var xslprocessorcookie = "upcast_xslprocessor=old;path=/;expires=" + expDate.toGMTString();
</msxsl:if>
</xsl:when>
<xsl:otherwise>
<msxsl:choose>
<msxsl:when test=".">
var xslprocessorcookie = "upcast_xslprocessor=old;path=/;expires=" + expDate.toGMTString();
</msxsl:when>
<msxsl:otherwise>
var xslprocessorcookie = "upcast_xslprocessor=new;path=/;expires=" + expDate.toGMTString();
</msxsl:otherwise>
</msxsl:choose>
</xsl:otherwise>
</xsl:choose>
document.cookie = xslprocessorcookie;
window.navigate("<:var returnTo>");
</script>
</body>
</html>


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.

-Kevin

_________________________________________________________________
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.