Re: [Bug 8611] Consider adding a full schema to H:TML

On Tue, 2010-01-05 at 20:00 -0800, Joe D Williams wrote:
> Ok, so that is a rule for XHTML but does not describe or explain the 
> text/html usage where the atttribute may appear in html as a string 
> not followed by = but having the special rule that says if only the 
> attribute name string is present and followed by separator then that 
> is ok and the default value is the empty string which means a default 
> functionality that you can go read in the spec what it does. In this 
> case it is the =value part of the attribute that is optional in the 
> user code (or is the name= part optional?) . 

Clearly an XML schema would only be directly applicable to HTML5 that is
also XML (i.e. XHTML5), but even with this limitation, it still seems
like a valuable exercise.

HTML5's text/html syntax has a canonical mapping to the DOM, and --
excepting a few edge cases[1] -- the DOM can be serialised to XHTML[2],
so via this indirect route text/html would also be checkable against an
XML schema.

1. And some of the edge cases could be worked around. e.g. DOMs that
contain unserializable Comment nodes could just have those nodes removed
prior to serialisation, as they're not going to cause any problems
checking against an XML schema.

Toby A Inkster

Received on Wednesday, 6 January 2010 07:24:52 UTC