RE: Question: empty elements in XML and HTML

Subject: RE: Question: empty elements in XML and HTML
From: Gabriel Paiz III <gpaiz@xxxxxxxxx>
Date: Tue, 6 Apr 1999 10:23:06 -0700
I've resorted to putting a non-breaking space inside of the script
element(IE5):

<xsl:template match="/">
<HTML>
<HEAD>
   <TITLE>Title</TITLE>
   <SCRIPT DEFER="DEFER" LANGUAGE="JavaScript"
SRC="..\scripts\script.js">&#160;</SCRIPT>
</HEAD>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="..\css\style.css"/>
<BODY>
   <xsl:apply-templates/>
</BODY>
</HTML>
</xsl:template>

---
> Another (hopefully quick) question... 
> 
> When I generate HTML from XML using XSL and XT, empty HTML 
> elements such as 
> 
> <script language="JavaScript" src="../scripts/revised.js"></script>
> 
> as part of a template, result in 
> 
> <script language="JavaScript" src="../scripts/revised.js"/>
> 
> in the final HTML output. However, IE4 chokes on this; I 
> suppose it requires
> the </script>. How can I prevent XT from returning an XML 
> conforming empty
> element, and instead, have it return a <script></script>? 
> 
> Linda
> 


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


Current Thread