|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: HTML <script> tag
Hi Stuart,
> I am including the following line in an XSLT template:
>
> <script type="text/javascript" language="JavaScript" src="viewSource.js">
> </script>
>
> I use the latest Xalan for Java and the problem is that since the
> text node of the element is empty, the XSLT engine generates the
> following:
>
> <script type="text/javascript" language="JavaScript" src="viewSource.js" />
>
> Well that is fine but for some bizarre reason neither the latest
> version of IE nor Mozilla recognize this HTML and, worse, it causes
> the whole page to render blank!
For what it's worth, when I have the same problem when creating
*XHTML* (when I don't want to use the 'html' output method), I create
a comment inside the script element so that it has some content, and
this seems to work. In the XSLT:
<script type="text/javascript" language="JavaScript"
src="viewSource.js">
<xsl:comment>Comment added so script is recognised</xsl:comment>
</script>
which comes out as:
<script type="text/javascript" language="JavaScript"
src="viewSource.js">
<!--Comment added so script is recognised-->
</script>
and seems to work.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








