Re: Proposal: @parsing="loose | strict"

On Jul 14, 2009, at 12:32 AM, Boris Zbarsky wrote:

> Doug Schepers wrote:
>> To meet this need, I propose a new attribute, 'parsing', which,  
>> when placed on the document root, defines the type of parsing which  
>> a UA must use when parsing the document.  The values would be  
>> "loose" and "strict", with loose parsing as the default (an omitted  
>> @parsing attribute would result in loose parsing).
> ...
>> and very little implementation cost, since browsers will already  
>> have both modes
>
> Is the proposal actually to parse part of the document (with which  
> parser?), then switch to an XML parser in some cases?  Or something  
> else?
>
> If that's the proposal, how is that better than the existing ability  
> to select the XML parser using the MIME type?  It seems strictly  
> more difficult from an implementation standpoint (very very complex  
> to specify and implement, in fact), and the XHTML MIME type is well- 
> enough-supported by servers that I have a hard time believing that  
> someone who wants to send data with that type can't.
>
> If that's not the proposal, then we are in fact proposing a third  
> parsing mode, sounds like (with corresponding spec and  
> implementation complexity).  This might be worth it, but I just want  
> us to be clear on the costs.

Why might it be worth it? It seems that the XML serialization of HTML5  
already serves this use case. Adding a second draconian syntax doesn't  
seem like it adds anything. A new draconian syntax would also have  
several disadvantages over the XML serialization, namely it would not  
work with existing XML tools and it would not work as intended in any  
current browser. Furthermore, asking new browsers to do draconian  
parsing when all current browsers would parse the same content  
leniently seems like it would trigger a race to the bottom and neuter  
the feature.

Regards,
Maciej

Received on Tuesday, 14 July 2009 07:50:44 UTC