RE: table and form

On 27 Sep 2000 at 07:31, Sebastian Lange wrote:
>
> At 14:06 27.09.2000 +0100, Fred Bone wrote:
> >
> >OK, try this:
> >
> ><table>
> ><tr><form><td> ... form content ... </td></form></tr>
> ><tr><form><td> ... form content ... </td></form></tr>
> ></table>
> 
> I see... valid point.
> 
> Yet, Tidy's approach with nested tables produces incorrect HTML, <form> may 
> not be contained within <form>:

  [output omitted]

> What do we do now?
> I think it should be quite safe to move <form> around <table> if there is 
> not more than ONE <form> within the <table>...
> If there are multiple <form>s, I see two ways: either move the <form> into 
> <td> or split the table into multiple tables (not nested), but this might 
> cause problems with the rowspan attribute.
> 
> Any way out?

Even worse:

  <table>
    <tr>
      <form><td>...form content...</td></form>
      <form><td>...form content...</td><td>...form content...</td></form>
    </tr>
  </table>

or:

  <table>
    <tr>
      <form><td>...form content...</td></form>
      <form><td>...form content...</td>
    </tr>
  </table>
  ...form content...</form>

These can't be translated into standard HTML.  Unfortunately they work
in both IE and Netscape.  I think Tidy's policy for impossible-to-fix
cases like this is to treat them as fatal errors and refuse to output
anything.  So arguably Tidy could do a better job by discriminating more
cases than it currently does and reacting accordingly (move the <form>
outside the table, move the <form> inside the <td>, report a fatal error,
etc.).  Easier said than done, I know.

--Randy

Received on Wednesday, 27 September 2000 18:22:16 UTC