Re: Mistakes in the XHTML Transitional DTD

At 2:43 PM -0500 1/22/01, Mike Krier wrote:
>Hello, I have found several mistakes in the XHTML Transitional DTD.  Can
>you explain or correct these mistakes?
>
>1. There is no background attribute for td tags,
>2. There is no Marginwidth attribute for the body tag
>3. There is no Marginheight attribute for the body tag
>4. There are no width, height, or body attributes for the input tag (needed
>for type="image")
>5. For some reason, a form tag cannot be within a tr or td element, which
>is frequently done to avoid unwanted line breaks.

XHTML Transitional is supposed to be merely an XML version of HTML 4 
Transitional, not introducing any new attributes or other tweaks of 
its own.

None of the points you note are valid HTML 4 Transitional, so their 
omission is  not an error.

You may criticize the design of HTML 4 as insufficiently attuned to 
the "needs" of some authors, but bear in mind that some of attributes 
you note were introduced by Netscape *after* they had voted to 
finalize CSS-1. Their use is not, therefore, "transitional" to 
reliance on stylesheets, but effectively a diversion from 
then-existing approved alternatives. I think w3c is right in not 
acknowledging such attributes.

If you must use these things, you can edit the XHTML DTD to permit, 
and still enjoy most of the benefits of validation. A colleague has 
cooked up such a DTD: 
<http://descend.metrius.com/~melanie/dtds/metrius_xhtml.dtd>. It 
assumes that you will use CSS to do what CSS can do in common 
implementations, but permits presentational attributes where Netscape 
4 just can't hack the CSS alternative.

It does not accommodate the FORM in TR hack you mention, nor 
height/width on INPUT (but it does allow for border). I was unable to 
edit HTML 4 simultaneously to permit FORM in TR *and* in the usual 
valid places. I don't know whether this reflects more on my DTD 
editing skills or on SGML per se.

>When I asked about this in the newsgroups, I got a very perplexing
>response.  People said that much of the above could be done with CSS, so it
>wasn't necessary.

I support that view, mostly, but it doesn't address your assertion 
that these are mistakes in the DTD. They are not.

>I thought the entire point of a Transitional DTD was so
>that html documents would be compatible with lower browser versions,
>including browsers that cannot make use of CSS.

Again, the "lower browser version" you are talking about was released 
after CSS-1. The first three of the attributes you cite don't work in 
Netscape 3. IE has supported most of the CSS alternatives since 3.0.

Also, "compatible" includes the notion of graceful transformation. 
Because CSS does not work in Netscape 3 (or Lynx, or a cellphone) 
does not mean that they are not compatible with CSS. Ignoring is 
benign. What most CSS browsers do - misinterpreting CSS - is another 
matter.

>If the people responding
>to my inquiries were correct, then can you tell me why there is a <font>
>tag in the Transitional DTD?

Because FONT was deployed before CSS-1, and is even in 3.2. 
Transitional puts a cap on CSS-redundant practice. It does not 
continue to evolve it.
--
Todd Fahrner               The printed page transcends space and time.
<mailto:fahrner@pobox.com> The printed page, the infinitude of books,
                            must be transcended. THE ELECTRO-LIBRARY.
                                              - El Lissitzky, 1923

Received on Monday, 22 January 2001 17:21:59 UTC