This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Problem Using Javascript with XSLT
- From: "stoneson" <stoneson at xinhuanet dot com>
- To: "xsl-list at lists dot mulberrytech dot com" <xsl-list at lists dot mulberrytech dot com>
- Date: Fri, 26 Jul 2002 9:8:40 +0800
- Subject: Re: [xsl] Problem Using Javascript with XSLT
- Organization: MIB
- Reply-to: xsl-list at lists dot mulberrytech dot com
Kuhns Matt,
maybe this will do some help to you:
http://www-900.ibm.com/developerWorks/cn/xml/tips/x-tipxsltjs/index_eng.shtml
¡¡¡¡
======= 2002-07-25 Wrote £º=======
>I am having a problem putting a javascript function in
>a XSLT.
>Here is my XSLT, I simplified it for this example:
>
><xsl:stylesheet version="1.0"
>xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>xmlns:lxslt="http://xml.apache.org/xslt"
>xmlns:totalSys="TotalSystem"
>extension-element-prefixes="totalSys">
><xslutput method="html" encoding="utf-8"
>indent="yes"/>
>
><lxslt:component prefix="totalSys" functions="toggle">
><lxslt:script lang="javascript">
>
>function toggle() {
>alert("hi");
>}
>
></lxslt:script>
></lxslt:component>
>
><html>
><head>
><title>"Errors"</title>
></head>
><body>
><a href="#" onclick="totalSys:toggle()">
><xsl:text>hi</xsl:text>
></a>
></body>
></html>
>
>When my sheet is generated, I click on my link and I
>get an error from my browser it says that an Object is
>expected.
>What am I doing wrong?
>Thanks in advance
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Health - Feel better, live better
>http://health.yahoo.com
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
= = = = = = = = = = = = = = = = = = = =
stoneson
stoneson@xinhuanet.com
2002-07-26
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list