W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 2001

RE: Tidy becomes less forgiving

From: Reitzel, Charlie <CReitzel@arrakisplanet.com>
Date: Fri, 14 Sep 2001 14:43:58 -0400
Message-ID: <B5C79DDBC655D311B6BD0008C7E64D76013C1840@exchange.arrakisplanet.com>
To: "'Fred.Bone@dial.pipex.com'" <Fred.Bone@dial.pipex.com>, Html-tidy@w3.org
Hi Fred,

Thanks for the correction on 3.2.  I'm clear about overlapping block tags.

Not sure about HTML 4, tho.  From
http://www.w3.org/TR/html4/struct/tables.html#h-11.2.1

<!ELEMENT TABLE - -
     (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)>

Clearly I'm no expert, but I read this as requiring at least one TBODY.  But
this is a quibble.  

On 14 Sep 2001 at 10:21, Allan Clark wrote:
> Does this show that the text Tidy is correcting is indeed
> non-compliant?  Not just ambiguous but non-compliant, which 
> requires tidy to clean it to be compliant to either 3.2 or 4.0 ?
>
> In past, I've made each row of a table into a form
> (<tr><form...>...</form></tr>) but this is illegal?

I think the approach Allan and I have used in the past can be considered
deprecated at best.  I have migrated away from this approach because it has
layout problems in IE.  Instead of nested tables, however, I would suggest a
single form and using a bit of Javascript to copy the data into hidden
<input> tags before calling form.submit().

take it easy,
Charlie


-----Original Message-----
From: Fred Bone [mailto:Fred.Bone@dial.pipex.com]
Sent: Friday, September 14, 2001 5:35 AM
To: Html-tidy@w3.org
Subject: RE: Tidy becomes less forgiving


On 13 Sep 2001 at 17:50, Reitzel, Charlie wrote:

> Hi Allen,
> 
> You are not the first to raise this sensible point.  However, 
> Tidy strikes a sometimes uneasy balance between the HTML specs 
> -plural- and what browsers actually do.  If there is a general 
> rule, it might be stated, "1) Parse any and all markup to the 
> degree possible.  2) Emit spec compliant HTML that
> renders the same on most browsers as the non-compliant input."
> A bit messy, yes.  But I think that's what makes Tidy useful.
> 
> Further, the spec does not directly address nesting <form> 
> tags within various table tags (<table>, <tr>, <td>).  According
> to the HTML 3.2 DTD, <form> tags are not allowed at all within 
> a table.  Only <tr>'s are allowed within <table>'s and only 
> text elements are allowed within a <td>.  

Quote from the 3.2 reference spec:

> <!ELEMENT (th|td) - O %body.content>

That includes FORMs.

> <form> is a block level tag.  HTML 4 requires an 
> additional intervening TBODY tag. So we are already playing 
> fast and loose w/ the spec.  My only suggestion
> was to move the line over one notch - you've got to draw 
> it somewhere.

TBODY is optional (implied) and has no effect on the permitted content 
of TD.

In both 3.2 and 4, you can nest a TABLE in a FORM or a FORM in a TD. You
can't have one block-level element overlapping another. (And you can't  have
a FORM in a TD that's inside a FORM).
Received on Friday, 14 September 2001 14:43:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:46 GMT