Re: Why Doesn't IE5 use the DTD to Validate?

Subject: Re: Why Doesn't IE5 use the DTD to Validate?
From: Chris Lilley <chris@xxxxxx>
Date: Thu, 01 Apr 1999 13:49:03 +0200

Daniel Austin wrote:

> As a content provider, I can see little need for *client-side* validation,
> except in certain special cases. Validation against a DTD is a check for
> structural validity, and should be carried out by the author prior to
> serving the document.

Yes, it should be. But hey, if it works in the browser without, why
bother?

>  As Jonathan notes, what is the client supposed to do
> on receiving an invalid document? Popping up a Javascript alert box is not
> acceptable, nor is refusing to show the page.

On the contrary, refusing to show the page ensures that the  authors
either validate, or make well-formed documents. It ensures that they do
not ship documents which claim to be well formed but are not.

It ensures that all browsers are using the same identical parse tree.
With HTML, browsers are in error-recovery mode 99.9% of the time, so
different browsers end up with different parse trees; hence, CSSS and
DOM do not work as expected.

So, appearing to accept and validate XML documents while silently
fixing-up errors just means that interoperability suffers and the load
on document authors is increased; validation is no longer enough, you
have to check the pahge in all the browsers that you know about.

Back to the bad old days.

> Also, validation by clients would
> simply take too long and be too large a performance hit.

Have you seen the whole slew of comments about how slow IE5b2 was and
how much faster IE5full is??

No, nor have I. This p[erformance argument does not have any facts to
back it up.

 
> <TIMBRAY>
> > Some members of the first
> > generation of XML processors
> > actually are both validating and
> > non-validating. Usually, they have
> > some way to turn the validating
> > behavior on and off. Nothing in the
> > spec rules this out, and it seems
> > to be useful.
> </TIMBRAY>
> 
>         To the best of my understanding (and I am sure Jonathan will correct
> me once again if I am wrong) this is the design Microsoft used for their
> browser. 

OK, so its a well-formed parser that fetches entities. This is fine, as
long as it is never described as a validating parser.

--
Chris


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread