Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: Root element specified by DTD ? [Thread Next] Re: Root element specified by DTD ?To: NULL Date: 6/4/2006 1:00:00 AM Peter Flynn <peter.nosp@m...> scripsit: > Jukka K. Korpela wrote: >> Peter Flynn <peter.nosp@m...> scripsit: >> >>>> Is this fragment a valid HTML document ? >>> >>> Yes, perfectly. >> >> No, it is a valid SGML document, but it is not an HTML document, as >> defined in HTML specifications. > > Yes, if you need to reference the HTML Spec in addition to the DTD. I'm not sure I see what you are saying "Yes" to and what the if statement relates to. Surely what is or is not an HTML document is to be defined in HTML specifications, not in a DTD. >> That would indicate the validity, but the HTML 4.01 specification >> requires that one of three specific DOCTYPE declarations be used - >> not just that one of three DTDs be used. > > That's why it is unenforceable by a standard parser. Yes, but the question was not whether something can be enforced. > Only browsers > implement this requirement, and they are not conforming SGML > applications. They surely aren't, but they don't implement the requirement. They simply started using the presence and exact form of a DOCTYPE declaration to decide on the "quirks" vs. "standard" mode. They don't reject a document on the grounds that it lacks a correct DOCTYPE; they simply process it differently. (OK, you might say that "quirks" mode intentionally deviates from the standards, but this is really just a difference in degree - the "standards" mode isn't standard-conforming either. Besides, "quirks" mode largely means intentionally broken CSS implementation rather than intentionally broken HTML implementation.) > I'm not clear why you were asking this question if you already knew > the answer. I wasn't. It wasn't me who asked the original question. I'm just commenting on the answers. -- Yucca, http://www.cs.tut.fi/~jkorpela/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
