[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] scripts for XALAN


Subject: [xsl] scripts for XALAN
From: "Roman Huditsch" <roman.huditsch@xxxxxxxx>
Date: Thu, 22 Aug 2002 10:29:02 +0200

Hi all,

we are using some simple scripts for IE, but now we would like to have them work in connection with Xalan, too. Is there a way to do it?
Can you please help us on that?


<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xform="http://www.w3.org/2001/08/xforms" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:fn="rh" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" extension-element-prefixes="fn msxsl">
	<xsl:output method="html" version="4.0" encoding="UTF-8"/>
	<msxsl:script language="JavaScript" implements-prefix="fn">
	function getFN(context){
		return context.nextNode.url;
	}
	</msxsl:script>
	<msxsl:script language="javascript" implements-prefix="fn">
		function evaluate(context, expression)
			{
			return context.nextNode().selectNodes(expression);
			}
		
	</msxsl:script>


wbr,
Roman Huditsch 

-----Ursprüngliche Nachricht-----
Von: David Carlisle [mailto:davidc@xxxxxxxxx]
Gesendet: Mittwoch, 18. Juli 2001 11:42
An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Betreff: Re: [xsl] script for netscape



> I have to create a dynamic Javascript within my XSL-Stylesheet, which
> can be executed both by IE and Netscape. I thought that it would work
> with <xsl:script>

If you mean to put javascript into the output so that it runs in the
generated HTML page then you don't need to do anything special. To XSLT
the javascript is just text content of the script element, you'd
generate it with templates in the same way as you'd generate any other
textual content.

xsl:script (in XSL 1.1 draft) and msxsl:script are for something
different: They are for executing javascript within the stylesheet
engine, whilst generating the output, not for placing javascript code in
the output.

David


_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

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


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



Current Thread
Keywords