|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XSLT Processor Detection
Well, the processor-version.xsl on mulberrytech.com 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"
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 Version</title>
</head>
<body>
<script>
var version = "old";
</script>
<xsl:choose>
<xsl:when test="false()">
<msxsl:if test=".">
<script>version = "old";</script>
</msxsl:if>
</xsl:when>
<xsl:otherwise>
<msxsl:choose>
<msxsl:when test=".">
</msxsl:when>
<msxsl:otherwise>
<script>version = "new";</script>
</msxsl:otherwise>
</msxsl:choose>
</xsl:otherwise>
</xsl:choose><script> var expDate = new Date("June 13, 2023"); var versionCookie = "upcast_xslprocessor=" + version + ";path=/;expires=" + expDate.toGMTString(); document.cookie = versionCookie; history.back(); </script> </body> </html> Thanks. -Kevin From: "Michael Kay" <mhkay@xxxxxxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: RE: XSLT Processor Detection Date: Wed, 25 Jul 2001 09:56:05 +0100 _________________________________________________________________ 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








