xsl-list
[Top] [All Lists]

Re: xsl:script tag not being allowed

2002-10-11 07:22:20
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



<Prev in Thread] Current Thread [Next in Thread>