Snook.ca

Validation and Content Management Systems

I, personally, feel that validation is the goal to be achieved in every site. Mainly because it helps reduce errors. Errors are a vicious problem that can rear its quirky head when you least suspect. Whether you validate to HTML 3.2, HTML 4.01, or XHTML1.0, it doesn't really matter.

For us technical types, maintaining a valid site is usually fairly easy. Sure, we may miss a page or two due to laziness but if we see that something doesn't work, we have the know-how to fix it.

But what of users who use some type of Content Management System? You're suddenly at the whim of the developers of such a tool.

ANY tool that generates final content for you has the potential to get it wrong.

This realization became a problem for myself just today when I did a quick validation test on one of my pages and it failed. It turns out the target attribute on an <a> tag is invalid in XHTML 1.0 Strict. What makes this odd is that I don't normally set target attributes on my links.

I use MovableType 3.1 and, at this stage, I hopped into the templates to see what was wrong. Hmmm, interesting. It seems that MovableType doesn't give me the choice of how a comment author link gets generated.

I had to do some digging in the code to find where it generated the link (It's in lib/MT/Template/Context.pm, in case you're interested) and made the necessary change and rebuilt my site.

CMS developers these days (and this will include me) will have to come to the realization that their tools mustn't make assumptions on code output. What with the different HTML standards and syndication formats such as RSS and Atom, there's no way to predict every variation.

Conversation

CMS developers these days (and this will include me) will have to come to the realization that their tools mustn't make assumptions on code output. What with the different HTML standards and syndication formats such as RSS and Atom, there's no way to predict every variation.

It is for this exact reason that CMSs should give complete control over the output.

I feel that MovableType does an excellent job of this, even with the problem that you mentioned.

A CMS should not generate markup. It should manage the content, and provide tools for designers to decide how to setup the output.

If you want to to know which content management systems are most likely to produce valid code on installation, then bookmark my list of 160 content management systems in order of code validity.CMS Valid Code

Thanks Christopher. I am using Joomla on my main site, I noticed that when I had my site all done and went to validate all sort of errors popped up. Some were mine of course =/ but some I was unable to correct without uninstalling a module. I am not ready to re do my whole site yet but I had been thinking of switching to another CMS and your list has helped me alot.

Sorry, comments are closed for this post. If you have any further questions or
comments, feel free to send them to me directly.

Want to learn about scaling CSS for large projects?

I'm available for full and half-day workshops on scalable CSS architecture. I can provide on-site training for your team. Interested? Get in touch.