W3C home > Mailing lists > Public > html-tidy@w3.org > April to June 2003

Re: Problem tidying.

From: Richard A. O'Keefe <ok@cs.otago.ac.nz>
Date: Thu, 12 Jun 2003 13:07:05 +1200 (NZST)
Message-Id: <200306120107.h5C175j6358672@atlas.otago.ac.nz>
To: html-tidy@w3.org

Concerning
    <table><form><tr>...</form></table>
there's a heuristic which sometimes help:
1.  if there is a start-tag <X> inside an element <E>...
    and X is not allowed inside E
    but E is allowed inside X
    and X is allowed inside E's parent
    then move <X> to just before <E>...

2.  if there is an end-tag </X> inside an element <E>...
    and X is not allowed inside E    -- these two conditions
    but E is allowed inside X        -- imply that X is not E
    and X is (now) E's parent
    then replace </X> by </E></X><E>
    and flag the new <E> as generated by Tidy.

3.  if you find <E></E> where <E> was generated by Tidy,
    quietly remove both <E> and </E>.

In the table/form case, we get              *
    <form><table><tr>...</table></form><table></table>
and rule 3 then quietly erases <table></table>
Received on Wednesday, 11 June 2003 21:07:15 GMT

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