Validation Pitfalls

After a couple of hours effort last night my archive templates now all validate as either XHTML 1.0 strict or XHTML 1.1. That’s not to say all the content validates, however. The main page, permalinks and monthly archives created after 1 March 2004 should validate. Category archives mostly don’t validate, as they have older, non-valid content lurking within. Same for older monthly archives and permalinks. Someday …

I was able to specify my permalinks as XHTML 1.1 as they don’t use the anchors that the other pages use (see prior post regarding “ids” and “names”); that was cool.

Oh, and pitfalls to validation? Data sources that you don’t completely control. Both the history and random quote function rely on data that isn’t completely encoded as required by the XHTML specs. Hence, occasional random failures to validate. I suppose there’s probably an MT plugin out there that will cleanse this input, but that’s gonna have to wait a bit.

This situation certainly brings to mind the late, great Jon Postel’s famous quote: Be liberal in what you accept, and conservative in what you send.

The featured image (which may only be displayed on the index pages, depending on your settings) was randomly selected. It is an unlikely coincidence if it is related to the post.