[whatwg] Conformance checking using schemas (was: Re: [html5] tags, elements and generated DOM)

Henri Sivonen hsivonen at iki.fi
Sat Feb 25 14:34:37 PST 2006


On Feb 25, 2006, at 01:16, Ian Hickson wrote:

> For the kind of detailed conformance checking HTML5 requires,
> you'll be wanting to use your own explicit hard-coded  
> implementation, not
> one or more schemas. IMHO.

Is there any particular reason why you think one wouldn't want to use  
schemas?

The downside I see is that error messages will be less precise than  
what carefully crafted custom code would allow. However, I believe a  
schema-based implementation to be easier to write, more maintainable,  
more portable and better customizable (portable and customizable e.g.  
for inclusion in a CMS that wants more restrictions on input).

My current plan is
1) to use RELAX NG for everything it is convenient for (element  
nesting, attribute occurrence, attribute datatypes through datatype  
libraries)
2) to use the XSD datatype library within RELAX NG for everything it  
is good for
3) to define (in English) and implement (in Java) a datatype library  
for stuff that the XSD library is not good for
4) to use Schematron for stuff that Schematron can cover but the  
above can't conveniently cover
5) to use custom Java code if there is still something that is not  
covered.

-- 
Henri Sivonen
hsivonen at iki.fi
http://hsivonen.iki.fi/





More information about the whatwg mailing list