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

Subject: RE: [xsl] xsl:script tag not being allowed
From: "Richard Lander" <rlander@xxxxxxxxxxxxx>
Date: Fri, 11 Oct 2002 07:49:28 -0700
If you write transforms against system.xml (.net framework), you'll find
that you can write inline extension functions in C#, using the
msxsl:script approach.

You can also register extension objects, which you can reference in your
transform. These objects are not inline, but compiled code outside of
your transform. I believe that these objects can be written in any
CLS-compliant language, such as C#, VB.Net, J#, managed C++,
(I think that there is such a thing) ...

I believe that the latter approach is more parallel to your approach.


-----Original Message-----
From: Jeni Tennison [mailto:jeni@xxxxxxxxxxxxxxxx] 
Sent: Friday, October 11, 2002 7:22 AM
To: Vedu Hariths
Cc: xsl-list@xxxxxxxxxxxxxxxxxxxxxx

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=""; 
> 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.



Jeni Tennison

 XSL-List info and archive:

 XSL-List info and archive:

Current Thread