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

Re: Feature request: validation by snippet

From: Stephanie Troeth <steph@unadorned.org>
Date: Thu, 22 Mar 2007 21:24:39 -0400
Message-ID: <46032C57.10404@unadorned.org>
To: www-validator@w3.org

Hi Jirka,

Jirka Kosek wrote:
> Stephanie Troeth wrote:
> 
>>Working with some folks familiar with CMS issues, the point was raised
>>that it would make it easier on developers to continually check if they
>>are creating valid markup if validators allow validation by snippet
>>rather than a full document. As a developer myself, I know my own team
>>and I would find this very useful.
> 
> 
> Maybe I'm living on a different planet, but why they do not use
> validating editor? I can hardly imagine pasting text back and forth
> between web-form of validator and editor or other web-form in CMS.

Maybe I haven't been very clear - I'm talking about people who are 
_writing_ code and templates behind CMSes, not people who are creating 
content within a CMS.

When you are creating templates using any kind of templating system that 
is part of a content management system, often you are only creating 
markup for a module that will eventually appear within a greater page.

Hence, if you just want to validate the chunk of code that applies to 
what you are building, a validator for snippets is immensely useful.


> It should be sufficent to add !DOCTYPE for root element of your snippet
> as DTD can't specify which element is allowed as the only root element
> (which is another big problem of DTDs). For example, the following
> snippet should be validated without problems:
> 
> <!DOCTYPE div PUBLIC "-//W3C//DTD HTML 4.01//EN">
> <div>
>   Foo
> </div>


Indeed it is. However, most commercial software developers/programmers 
are generally barely understand or care what valid mark-up means, or 
they simply have not been trained. This is why even today, most CMS 
generate such horrendous code. If they have been told they have to 
generate valid code, and you make it easy for them to validate 
something, then the adoption of the habit is easier once they are convinced.

My job, like many of my colleagues, is to do the convincing and the 
teaching. It would help us do our job if tools like the validator make 
the the lives of developers easier.

By automatically inserting the Doctype and basic skeleton HTML elements 
within the validator, you are removing an extra step that a "lazy" 
developer would have to take, therefore removing one excuse for them NOT 
to validate.

I hope this gives you a better sense of where I am coming from.

best regards,
-steph
Received on Friday, 23 March 2007 01:24:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:24 GMT