Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Root element specified by DTD ?

From: "Jukka K. Korpela" <jkorpela@--.---.-->
To: NULL
Date: 6/3/2006 8:01:00 AM

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. (Of course, most "HTML documents" on the Web are not 
HTML documents in that sense, but the question is meaningful only if 
interpreted as relating to specifications. "HTML document" in the loose 
sense - as well as "XML document" when well-formedness is not required - is 
far too fuzzy a concept to be argued about.)

>> If not, why isn't it? Just
>> which part of its definition is forbidding this fragmentary use?
>> <!DOCTYPE div PUBLIC "-//W3C//DTD HTML 4.01//EN"
>> "http://www.w3.org/TR/html4/strict.dtd">
>> <div>
>>     <p>Foo</p>
>> </div>
>
> You can test this by running it through any SGML validating parser
> (eg nsgmls).

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. And this isn't one of them. Moreover, the 
specification explicitly says:
"After document type declaration, the remainder of an HTML document is 
contained by the HTML element."
http://www.w3.org/TR/REC-html40/struct/global.html#h-7.3

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/ 



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent