W3C home > Mailing lists > Public > www-validator-css@w3.org > December 2007

Re: validating my wblog

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Tue, 11 Dec 2007 19:12:04 +0200
Message-ID: <030a01c83c18$f4a2a2c0$0500000a@DOCENDO>
To: "David M. Riley" <rileydavidm@gmail.com>, <www-validator-css@w3.org>

David M. Riley wrote:

> T\I have read all the faq's and cannot validate my site. when I first
> tried it I got green, validation. I am having no more luck. Any
> suggestions Thanks  http://www.thebloggiest.absorbs.com

Looks bad, 196 errors. But it's really not as bad as it sounds. The 
first few errors are caused by using <BR> which is OK in classic HTML 
but surely not in XHTML, which requires <br />. I guess this _is_ in the 
FAQs... But are you sure you want to use XHTML? Really? Why? (Just 
rhetoric questions.)

Anyway, much of the rest depends on XHTML as well. At line 73, you're in 
the midst of a <script> element's content and generating markup (in a 
rather non-XHTMLish way, I dare say: the idea is to play with elements 
and the Document Object Model, not to use strings containing markup to 
be parsed), there you have <a ... which opens an <a> element, which is 
not permitted inside a <script> element. The point is XHTML has a 
different content model for <script>, so you can't just write markup as 
such there, even if it is string data in scripting terms (which terms 
mean nothing to a validator). There's something about this in the FAQs 
I'm sure, but the bottom line is that any bulky piece of JavaScript code 
is best written in a separate file, invoked via <script ... src="...">, 
thereby avoiding the issue.


Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/ 
Received on Tuesday, 11 December 2007 17:12:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 June 2012 00:14:19 GMT