- From: Thanasis Kinias <tkinias@optimalco.com>
- Date: Thu, 25 Apr 2002 22:34:37 -0700
- To: "Timothy J. Luoma" <luomat@peak.org>
- Cc: css-discuss@westciv.com, jam.macdonald@sympatico.ca, www-validator@w3.org
scripsit Timothy J. Luoma: > On Tue, 23 Apr 2002, Thanasis Kinias wrote: > > > The code on the page isn't valid. Line 12: > > > > <script type="text/javascript" src="styleswitcher.js" /></script> > > > > The <script> element is closed twice. > > > > How does this reveal a limitation in the Validator? > > When I validated the page, it showed no errors when it was just: > > <script type="text/javascript" src="styleswitcher.js" /> > > which isn't valid. You can't close a <script> with a ' />' and the > validator didn't say anything about it. Why can't you close a <script> with a ' />'? In XML, that is a perfectly acceptable way of closing an element. It's the normal way of writing, e.g., images: <img src="foo.gif" alt="foo" />. It's also not restricted to elements declared in the DTD as EMPTY (like <img>), but can be used for any element which, in any particular instance, has no children. See the XML spec [1]. References 1. <http://www.w3.org/TR/1998/REC-xml-19980210#sec-starttags> -- Thanasis Kinias Web Developer, Information Technology Graduate Student, Department of History Arizona State University Tempe, Arizona, U.S.A. Ash nazg durbatulūk, ash nazg gimbatul, Ash nazg thrakatulūk agh burzum-ishi krimpatul
Received on Friday, 26 April 2002 01:35:26 UTC