Christian Smith: > > Not quite. Even when the validator has noted this error, the lack of a > > DOCTYPE, it is still useful to parse the rest of the doc, noting other > > errors, and in doing that it must suppose an _intended_ DOCTYPE. > If this is what is desired (and I'm not really sure this is more desirable > than just reporting the absense of a DOCTYPE and saying "no futher parsing > is possible without a doctype") than the thing to do might be this > Either: > 1) Check to see if there is a DOCTYPE. If there is, validate against this. > 2) If there is no DOCTYPE, scan the document for XML hints. If there are > hints that the file is an XML document use the latest XHTML standard to > validate the document. If there are no XML hints then validate against the > latest HTML standard. Excellent idea, except for the last few words. XHTML _is_ the latest HTML standard (recommendation). You meant: "If there are no XML hints then validate against HTML 4.01." > Or: > 1) Provide a method (via a popup) that allows the user to specify a > doctype to validate the document against. Also a good idea. > 2) There should also be an option (via a checkbox which defaults to on) to > have a doctype in the document overide the selected value in the popup. I'm not sure I understand this last one. > As I said, I'm not convinced that either of these are better than just > reporting a single error re the missing doctype and a note that no further > parsing will be done. I'm not completely sure either. But if there is going to be any supposing of DOCTYPE, then it's valid to discuss which one it should be. ##################################################################### Bertilo Wennergren <http://purl.oclc.org/net/bertilo> <bertilow@hem.passagen.se> #####################################################################Received on Saturday, 21 October 2000 10:14:46 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 1 October 2009 14:48:40 GMT