Re: Schemas and validation

We need to move on to concrete suggestions that apply to work products 
that are produced by this working group.

Krzysztof Maczyński wrote:
>>> But it's a common problem, so people should be encouraged to 
>>> validate. Being valid is supposed to enhance forward
>>> compatibility, so authors who consider W3C trustworthy will care
>>> about it. Valid markup is also more consistent and provides nice
>>> invariants for development of content and dependent standards.
>>> I'm sure that you, a prominent Mozilla developer, could give more
>>> advantages off the top of your head than me, a humble author.
>> Validation is a good practice, but it's not a substitute for
>> testing. Just as running "lint" or "gcc -W -Wall" on your C++ code
>> is a good practice, but not a substitute for testing.
> Of course. As Knuth said:
>> Beware of the above code. I have only proven it correct, not tested
>> it.
> That doesn't invalidate my points though. But there seems to be some
> prejudice in the WHATWG against formal methods and machine
> processability. And I consider it important and helpful for authors
> (including myself) to provide as much of requirements as feasible in
> a form usable by computers. Or do you believe users are likely to
> forgo automation, read the prose in the spec, turn it mentally into
> an algorithm and perform validation by looking at a document? Some
> formal method of assesing compliance (partially, I know, that's why
> validity is a narrower technical term) will be needed in authoring
> tools too. One final thought: validation _is_ a form of testing.
> Browsers may consume tag soup because they're usually the last piece
> of software before content gets to the user. But for other types of
> user agents it's reasonable most of the time to test for validity
> before even attempting to feed a document itno that tool.

There exists an open source validator that goes beyond what schemas can 
do -- both in terms of spec coverage and in usability.  You are welcome 
to use it today.  It is also possible to contribute to that direction -- 
in fact, I have done so.

http://about.validator.nu/

If you prefer a schema, you can create and use one today, with or 
without standardization.  You can even use the schemas that are present 
in the source of validator.nu as a starting point:

http://s.validator.nu/html5/

If you prefer XSD over RELAX NG, there is an open source tool which will 
do the conversion: Trang.

http://www.thaiopensource.com/relaxng/trang.html

As to whether any or all of these could ever be considered a work 
product of this WG, that primarily will depend on whether or not there 
exists anybody who is willing to do the work.  Perhaps you are, and if 
so, that's fine.  If not for whatever reason, please be willing to 
accept that others might not for their own reason(s).  I will say that I 
have no interest in producing an XSD description of HTML5 at this time.

It is also my personal opinion, based on the limits of what can be 
expressed in an XSD, the most that can be achieved is for such a schema 
to be included either as a non-normative appendix or as a separate document.

If that is something you wish to work on, let us know.  If not, my 
opinion is that it is highly likely that the lack of an non-normative 
appendix is unlikely to hold up HTML5 proceeding.

> Best regards,
> 
> Krzysztof Maczyński

- Sam Ruby

Received on Tuesday, 2 March 2010 14:21:12 UTC