This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: XSLT Processor Detection


<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0">
 <xsl:template match="/">
xsl:version    = <xsl:value-of select="system-property('xsl:version')"/>
xsl:vendor     = <xsl:value-of select="system-property('xsl:vendor')"/>
xsl:vendor-url = <xsl:value-of select="system-property('xsl:vendor-url')"/>
 </xsl:template>
</xsl:stylesheet>

is the correct code,

i also relise that microsoft doesnt give any difference with the 2
namespaces in question, which of course is a bad thing, but i would expect
in the future, to not use old namespace, and to have any namespace changes
etc, to coincide with some information, maybe there is a requirement to add
a new system-property; xsl:vendor-version ???

cheers, jim fuller
----- Original Message -----
From: "cutlass" <cutlass@secure0.com>
To: <xsl-list@lists.mulberrytech.com>
Sent: Thursday, July 26, 2001 7:19 AM
Subject: Re: [xsl] XSLT Processor Detection


>
> and what about using this ?
>
> <?xml version="1.0"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> version="1.0" xsl:version="1.0">
>  <xsl:template match="/">
> xsl:version    = <xsl:value-of select="system-property('xsl:version')"/>
> xsl:vendor     = <xsl:value-of select="system-property('xsl:vendor')"/>
> xsl:vendor-url = <xsl:value-of
select="system-property('xsl:vendor-url')"/>
>  </xsl:template>
> </xsl:stylesheet>
>
>
> cheers, jim fuller
>
>
> ----- Original Message -----
> From: "Kevin Nardi" <kevnardi@hotmail.com>
> To: <xsl-list@lists.mulberrytech.com>
> Sent: Wednesday, July 25, 2001 8:28 PM
> Subject: RE: [xsl] 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@iclway.co.uk>
> > >Reply-To: xsl-list@lists.mulberrytech.com
> > >To: <xsl-list@lists.mulberrytech.com>
> > >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="http://www.w3.org/TR/WD-xsl";
> > > >       xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> > >
> > >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:  http://www.mulberrytech.com/xsl/xsl-list
> > >
> >
> >
> > _________________________________________________________________
> > 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
> >
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]