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

Leif Halvard Silli wrote:
>> In that case, why does the web page need anything in it at all?  If 
>> web  browsers want to ship a strict non-default parser mode, that's 
>> fine. They can just do that.  No need to annotate pages to use it.
> 
> 
> If we say that an "authoring device" is a device of its own, then you 
> can do
> 
>     <link rel="stylesheet" media="authoring" .... >
> 
> in order to send special style properties to the authoring device.  When 
> editing a page, one often need a more "semantic" and simple stylesheet 
> than when browsing it with a reading device.

That's fine. but completely orthogonal to parsing.

> As for strict parsing, even if strict parsing should be reserved for 
> authoring devices, authoring devices should still not be forbidden from 
> also supporting normal parsing as well. Then, if there is some pages 
> that you want to edit with the non-default parsing mode, then one would 
> be able to get the right mode automatically, without adjusting the 
> preferences.

I'm not sure I follow.  What's your specific proposal?

> The point is that one can specify special CSS for the "authoring device 
> mode" - not only parsing mode, but other things as well.

OK, but we're talking about parsing here.  New media types aren't really 
part of HTML's purview, no?

> If your web browser accepts User CSS sheets, and if you tell it to 
>  render <h1> elements in read, then this stylesheet will be part of the 
> "armor" with which your browser meets the World Wide Web. No reparsing 
> needs to be done - the UA knows before it starts to read a page that 
> eventual <h1>-s are to be colored red.

OK...  What does this have to do with HTML?  User stylesheets are 
outside the purview of HTML.

> Why not? This is how Amaya works - it lets you identify it as any of the 
> CSS media device types that it is aware of. This way an author can 
> test/see which styles that applies to the media type that he/she selects.

That's fine, but has nothing to do with HTML or HTML parsing...

> For this to work, the UA would need to be informed that it should switch 
> to strict parsing (if possible). A HTTP header.

We have that; it's called the Content-Type header.  You set it to 
application/xhtml+xml to get a nice strict parser.

-Boris

Received on Thursday, 16 July 2009 05:19:10 UTC