RE: 2 HTML documents in one

> Not just that, but *ANY* HTML or XML document can only have one root
> element. The only things allowed outside that element are the XML
> declaration and the DTD tag.

Nick-picking point: You can have an SGML document that has more than
top-level tag, because it could have elements that were inferred from the
DTD. The following is valid HTML4.0, though not XML1.0 or earlier:

<title>some title</title>
<p>some content

In such a case the html, head and body elements, and the end of the p
element were deduced. They were in the document-model, but not in the actual
file. In practice this tended to not work very well and was confusing.

> I'm not sure who was claiming the "if it works" school, but without
> proper standards in place defined and used, no user-agent or parser can
> be expected to work properly. Also, markup-compatible technologies such
> as CSS and the DOM could behave unexpectedly.

There are two types of "if it works". There's the type were one says
"Because of bugs in other implementations I am forced to do something
non-standard", and there's the type were one says "I'll get paid whether I
do my job right or not." Of course the main reason that some people adopt
the first is to interoperate with stuff developed by people who have adopted
the second :(

Received on Thursday, 3 April 2003 11:04:59 UTC