This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: output javascript braces not avt
- From: "Carsten Klein" <carstenklein at yahoo dot de>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Tue, 10 Sep 2002 14:09:20 +0200
- Subject: Re: [xsl] output javascript braces not avt
- References: <63C4AD0365821F4291ACF76C0672FA35057E63@piper6.piper-group.int>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi Andrew,
you could use <xsl:attribute/> instead:
<body>
<xsl:attribute name="onLoad">
if (true) {
alert('foo');
alert('bar');
}
</xsl:attribute>
...
</body>
This I prefer, since it allows me much more readable code in xsl, especially
when it mixes xsl, html and javascript.
You must obey the rules for <xsl:attribute/> though. This means, not output
from the beginning of the output tree element <body> to the first occurrence
of <xsl:attribute/> is allowed, otherwise the <xsl:attribute> is not
considered to belong to the body element.
Bye
Carsten
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list