I finally got the main page of the blog to be valid. I'm probably not that far from being valid as Strict XHTML, but I'm not going there yet. Mostly since this doesn't really buy me anything anyway. I mean what is really the point? So a theoretical stupid browser could render my blog properly, I guess. Great, that and $3.75 plus tax will get me a cup of coffee.
Of course, the validity of the page is subject to what I put in the content of these entries. Just a little sloppiness there and I've blown it.
I did learn some stuff. Like that ampersands are not allowed even in quoted URL's. This came up with the WeatherPixie which sends some parameters in the query string. The image source URI looks like this: http://weatherpixie.com/displayimg.php?place=KSAT&trooper=1&type=F Notice that the ampersands separate the parameters. But an ampersand is used to designate the beginning of an HTML entity which is closed with a semicolon. It turns out that you can (and should) use entities in URIs as necessary. So I changed the source to http://weatherpixie.com/displayimg.php?place=KSAT&trooper=1&type=F and now it validates against the schema. (Schemum? Is schema singular and plural?)
The other problem was my javascript. The RelabelCom function used a "<" operator to compare values. Unfortunately, a less-than sign is used to tell the parser that a new tag is being opened. Entities won't work in script. Eventually I found the solution was to move the script off of the page and access it through the src attribute of the script tag. This is also recommended for any stylesheets that use ampersands or less-than symbols.
Posted to Tech Tedia + Blog at August 20, 2004 10:48 AM