This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Processor version detection stylesheet
- To: xsl-list at mulberrytech dot com
- Subject: Processor version detection stylesheet
- From: Tony Graham <tgraham at mulberrytech dot com>
- Date: Sun, 30 Apr 2000 23:10:25 -0400 (EST)
- Reply-To: xsl-list at mulberrytech dot com
I have thrown together a stylesheet for detecting the version of an
XSL processor, with the eventual aim of getting people to use the
stylesheet and include the result when they post a "why doesn't this
work?" question to the XSL-List.
The stylesheet uses elements in both the old and the current XSLT
namespaces so it works with both IE5 (plus older versions of other
processors) and current XSLT processors, but it's hardly elegant.
I'm looking for suggestions for improvements both in the dual-mode
operation of the stylesheet and in the identification of the version
of specific processors.
To use the stylesheet with IE5, save it to a file named
"processor-version.xsl" then double-click on it in Windows Explorer.
To use it with other XSL processors such as XT, run the stylesheet on
itself.
------------------------------------------------------------
<?xml version="1.0"?>
<?xml:stylesheet href="processor-version.xsl" type="text/xsl"?>
<?xml-stylesheet href="processor-version.xsl" type="text/xsl"?>
<!-- ============================================================= -->
<!-- MODULE: XSL Processor Version Detection Stylesheet -->
<!-- -->
<!-- MULBERRY INTERNAL VERSION CONTROL:
$Id: processor-version.xsl,v 1.1 2000-04-30 22:49:04-04 tkg Exp $
============================================================= -->
<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>
<xsl:choose>
<xsl:when test="false()">
<msxsl:if test=".">
<p>Vendor: Microsoft</p>
<p>XSLT Version: Original IE5 or old version of other processor</p>
</msxsl:if>
</xsl:when>
<xsl:otherwise>
<msxsl:choose>
<msxsl:when test=".">
</msxsl:when>
<msxsl:otherwise>
<p>Vendor: <xsl:value-of select="system-property('xsl:vendor')"/></p>
<p>Vendor URL: <xsl:value-of select="system-property('xsl:vendor-url')"/></p>
<p>XSLT Version: <xsl:value-of select="system-property('xsl:version')"/></p>
</msxsl:otherwise>
</msxsl:choose>
</xsl:otherwise>
</xsl:choose>
</body>
</html>
------------------------------------------------------------
Regards,
Tony Graham
======================================================================
Tony Graham mailto:tgraham@mulberrytech.com
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Direct Phone: 301/315-9632
Suite 207 Phone: 301/315-9631
Rockville, MD 20850 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list