Subject: Re: Why Doesn't IE5 use the DTD to Validate? From: Chris Lilley <chris@xxxxxx> Date: Sun, 04 Apr 1999 20:32:21 +0200 |
Jelks Cabaniss wrote: > > James Clark wrote: > > Reading the DTD and validating aren't the same thing. Unless a document > > has standalone="yes", the browser should always read a provided DTD It seems that "should always" is not derivable from the spec. > > so that it can correctly > > > > - - default attributes > > - - normalize attribute values > > - - expand entity references Yes. But it seems that the intent was not to require this of all implementations. My feeling is that there are three classes of implementation, that should all have names: minimal well-formed - never tries to follow external entities full well-formed - always tries to follow external entities full validating - always tries to follow external entities and validates and it should be possible to always derive what class of implementation a particular instance requires. My current take on this is that "standalone="yes" is how you declare that a minimal well-formed parser is sufficient; that <!ELEMENT occurring anywhere in the internal or external subset is how you indicate that a validating parser is required and that all othger cases are saying that the full-well-formed parser is required. But it would be nice to see this explicitly spelled out in the spec. And perhaps some extra pseudo-attributes in the XML declaration would be handy, to allow the status of each instance to be clearer. standalone="yes" is one such, and standalone="no" is rarely explicitly use d because it is the default. But perhaps it should be explicit that a minimal well-formed parser should halt when encountering "standalone="no" (either explicitly written or defaulted). And perhaps there is room for another psuedo-attribute, defaulting to no, like valid="yes" At the moment, as James says, browsers "Should always" try to follow external references but they are not required to do so and it is not an error for them to not do so. > Section 5.1 of the > recommendation says > > Non-validating processors are required to check only the > document entity, including the entire internal DTD subset, > for well-formedness. While they are not required to check the > document for validity, they are required to process all the > declarations they read in the internal DTD subset ... > > That suggests a non-validating processor can ignore the external subset, and > thus not fully "read the DTD". So how does it pick up those default attributes? It isn't required to, because the first and second classes of implementation are not distinguished in the spec. There seems to be agreement forming that they should be. Which would then allow a document author to decide what class of processor is required, on a case by case basis, and clearly indicate this; so if they request full external references and the parser is a minimal well-formed parser, it can stop right there. Equally, they can process the XML they serve so that a minimal well-formed parser will always do the right thing, to ensure that all parsers can accept it. -- Chris XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Why Doesn't IE5 use the DTD to , James Clark | Thread | Why Doesn't IE5 use the DTD to Vali, Jelks Cabaniss |
Re: Why Doesn't IE5 use the DTD to, Chris Lilley | Date | Re: XML is broken (was Re: Why Does, Chris Lilley |
Month |