[Sigia-l] Word HTML - money were my mouth is (was When Should a Manual be Web-based?)

Jon Hanna jon at spin.ie
Tue Mar 4 06:13:19 EST 2003


> > No, that's one and the same thing. How else do you define "HTML
> > error" except by saying it differs from what HTML allows?
>
> Well, here is an example:
>
> <html><head><title>title<body>test</body></html>
>
> The above has HTML error even though there is no reference to a
> published HTML version. If you save the above HTML as an HTML file and
> have the browser displays it, you won't see "test" displayed. To see
> "test" displayed, you need:
>
> <html><head><title>title</title></head><body>test</body></html>

That is completely wrong.
If it was an non-XML based HTML (that is it was HTML, but not XHTML) and it
had a DTD which included:

<!ELEMENT TITLE O O (#PCDATA) -(%head.misc;) -- document title -->
<!ELEMENT BODY - - (%block;|SCRIPT)+ +(INS|DEL) -- document body -->

then the first example would be perfectly valid, with the end of the head
element being deduced from the beginning of the body element and the end of
the title element being deduced from the (deduced) end of the head element.
(Note that we had to change the definition of BODY to make its tags
mandatory, if they were kept optional then the DTD would have become
non-deterministic).

Of course you are right in saying that it is possible to produce a document
that is not well-formed, and hence could not satisfy any DTD. But that still
falls under "differs from what HTML allows". The DTD merely encodes some of
those rules (it lacks the ability to encode some though, such as the way you
can't have a <form> in a <form> at any level, nor an <a> in an <a>, and also
the rule that you must have a DTD).

> > > Mind you, web browsers do not require web pages with DTD
> > > declaration.  Unless Word acted up, Internet Explorer, Netscape
> > > Navigator, and Opera have no problem with the Word-produced HTML.
> >
> > Not strictly true.
>
> "True" versus "strictly true" is a game of semantic.
>
> The fact is that web browsers do not require web pages with DTD.

No, the fact is that interactive UAs are required to make best attempts at
rendering incorrect HTML. You may as well interpret the fact that your body
has mechanisms to help you survive a period of starvation as proof that you
don't need to eat.




More information about the Sigia-l mailing list