xsl-list
[Top] [All Lists]

Re: xsl:script tag not being allowed

2002-10-11 07:34:49
Hi Vedu:

The script element needs to be bound to the language you are using. IE6
doesn't recognize the namespace you are using, so you need to implement the
appropriate namespace recognized by IE. So add this in your stylesheet
element:

xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:user="http://mycompany.com/mynamespace";>

Then you call the function later, such as in a value-of statement:

<xsl:value-of select = "user:myFunction()" />

Note that user is an arbitrary prefix, you can name that however you like,
as long as it is the same as the namespace declaration it is supposed to be
bound to.

Visit www.exslt.org to get a nice grasp on all this.

Cheers,

Charles White
The Tumeric Partnership
http://www.tumeric.net
chuck(_at_)tumeric(_dot_)net
http://www.javertising.com
________________________________________
Author, Mastering XSLT, Sybex Books
Co-Author, Mastering XML, Premium Edition, Sybex Books

----- Original Message -----
From: "Vedu Hariths" <vhariths(_at_)yahoo(_dot_)com>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Friday, October 11, 2002 6:52 AM
Subject: [xsl] xsl:script tag not being allowed


Hi all,
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>


This is what IE(6) spits out:
Keyword xsl:script may not be used in namespace
http://www.w3.org/1999/XSL/Transform.

I ofcourse need the Java part for other functions but
I was just trying this out to begin with and I wonder
what I am doing wrong.

Thanks in advance,
Vedu



__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

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




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



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