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 krimpatulReceived on Friday, 26 April 2002 01:35:26 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 1 October 2009 14:48:45 GMT