This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: script tag in xsl
On Friday 15 March 2002 05:15, stevenson wrote:
> I am using :
>
> <script language="text/JavaScript" src="functions.js">
> </script>
>
> in my xsl but doesn't seem to work well. I was adviced to use:
>
> <script type="text/javascript" src="functions.js">
> <!-- comment inserted for Internet Explorer -->
> </script>
I read your earlier question on this subject (script with no content being
collapsed to <script/> confuses IE), and I think the problem is that you have
to use it like this:
<script type="text/javascript" src="functions.js">
<xsl:comment> comment inserted for Internet Explorer </xsl:comment>
</script>
Otherwise the comment is completely ignored by the XSLT processors XML
parser, and you end up with <script/> all over again.
>
> But still didn't work.
>
> Can anybody explain to me why it is not working and if possible a solution
> also. Please help!!
It wasn't clear whether you were showing the stylesheet or the output above,
so if you are already using <xsl:comment>, I really don't know what the
problem could be. Check that functions.js is in the proper location and all
that good stuff. Also, try writing an HTML page by hand (or modify the
output from your stylesheet) so that you know it works, and then try to get
your stylesheet to match that.
--
Peter Davis
"Little prigs and three-quarter madmen may have the conceit that the laws of
nature are constantly broken for their sakes."
-- Friedrich Nietzsche
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list