Re: XHTML and MIME

Mark Birbeck wrote:
> 
> Hi Anne,
> 
>>   5. "XML parsing failed: syntax error (Line: 8, Character: 0)" in Opera;
> 
> That's interesting...does failing to parse properly necessarily have
> to prevent rendering?

It's a well-formedness error and XML 1.0's draconian error handling 
clearly dictates that the parser must not continue normal processing. 
It doesn't prevent the application rendering the content up to the 
error, but does prevent the rest of it from being passed to the 
application and rendered.

IIRC, that was the behaviour of Opera 8.5, though it seems to have 
changed in 9.0.  However, it still offers the user the choice to reparse 
it as HTML instead.

> In Sidewinder we validate the XHTML against the XML schemas in one
> thread, and do some processing on the document before passing it to a
> renderer in another thread. (Current renderers are IE and Gecko.) This
> means that you'll always see something. We did it this way for two
> reasons; firstly, because most of the content that claims to be XHTML
> is actually invalid, so there wouldn't be a lot to see!

Anne gave an example of a well-formedness error, yet you're talking 
about validation which are two different concepts.  Validation errors 
aren't fatal and the parser is free to continue as normal.

In fact, much of the content claiming to be XHTML isn't even well 
formed, let alone valid, so how does Sidewider handle well-formedness 
errors?

> And secondly, because we felt that the ability to know whether 
> something was valid or invalid was most probably something that 
> authors and developers wanted, but most likely means little to an 
> end user.

That's true, but authors frequently fail to fix errors that aren't 
immediately obvious.  Many authors only care what the user sees and if 
the effect of the error isn't immediately obvious to a normal user, it 
often remains unfixed.

-- 
Lachlan Hunt
http://lachy.id.au/

Received on Friday, 1 September 2006 14:03:06 UTC