Re: [xsl] xsl:script tag not being allowed

Subject: Re: [xsl] xsl:script tag not being allowed
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Fri, 11 Oct 2002 15:22:20 +0100
Hi Vedu,

> This is how my code looks (copied and pasted from
> Michael Kay's book, pg 100)
>
> <xsl:stylesheet version="1.1"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
> xmlns:Date="java:java.util.Date"> 
> <xsl:script implements-prefix="Date" language="java"
> src="java.util.Date" />
> <xsl:variable name="Date"
> select="Date:to-string(Date:new())" />
> </xsl:stylesheet>

See the 'version' attribute on the <xsl:stylesheet> element? It
specifies version 1.1 of XSLT. Version 1.1 of XSLT was a Working Draft
that got halted so that attention could be focused on XSLT 2.0
instead. There are only a couple of processors that implemented the
XSLT 1.1 Working Draft (Saxon and jd.xslt); most processors, including
MSXML3 (the processor that IE6 uses) didn't implement it.

IE6 *does* support a different way of defining extension functions
using <msxsl:script>, but it doesn't support defining them using Java.
Instead, you have to write some JavaScript or VBScript to implement
the function. Have a look at page 134 of Mike's book for an example.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


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


Current Thread