Re: Tidy [Inferred Table] Bug

Ger Hobbelt <[email protected]> Tue, 24 Nov 2009 05:43:20 +0100
Newsgroups gmane.comp.web.html-tidy.devel
Message-ID <[email protected]>
On Mon, Nov 23, 2009 at 4:58 PM, Christopher Woods <[email protected]> w=
rote:
> Are you sure that the browsers are actually turning the <tr> content befo=
re the table into a table?

AFAICT they don't, but then browser rendering isn't exactly the
epitome of reference for deciding what to do with shoddy html IMHO.
May sound odd, but I don't use tidy to 'keep it looking exactly the
same' in browsers; I use it as a, by now instinctive, part of my
editorial workflow to ensure the servers get fed reasonably well
formed HTML while I might have been doing sleight of hand in the
manual edit process. In which case wrapping a <table> around those
<tr>s is particularly desirable as my hands might have forgotten my
brain wanted it in there - it happens that I sometimes outthink my
typing so words get lost midway.

In other words: tidy sits in an early position in the editorial
workflow chain with me, not as a slapped-on webserver 'afterthought'
where [generated] crud is compressed into W3C standards adherence,
while required to keep the 'intended look an feel'. mod_tidy et al are
nice, but there are some days where I think a crossbow with serrated
edge bolts is a far better solution to the problems mod_tidy and
friends is expected to solve.

Never mind that bit of early morning temper, the current state of
affairs ditches the <tr> if it doesn't come with <td>s as well, so it
discards 'completely misplaced <tr>s' shall we say? At least it does
now for several of my test cases, which is desirable behaviour, at
least to me. [Testcases in+out to be posted later; I still suspect the
code from hiding a couple of nasties from me]

>
> If I remember correctly, when I did some tests on this back in Feb 2006 t=
he browsers just basically stripped the <tr> (or maybe I only had checked <=
td>) before any table away and discarded it. =A0I put in a feature request =
to add a new option to disable Tidy's "inferred table" functionality:
>
> https://sourceforge.net/tracker/?func=3Ddetail&aid=3D1429519&group_id=3D2=
7659&atid=3D390966
>
> It's a bit dated now as the request was filed in late Feb 2006 but I did =
note which versions of the code the diffs were created from. =A0You *might*=
 want to check this and see if the behavior is visually more consistent.
>
> -Chris

Hadn't checked that one, but will do, certainly. I think I'm much
closer to your original intent now than I was when I wrote that
message you responded to (and I was trying to be lazy about
implementing functionality), but there are still cases where inferred
tables have merit: when everything but the <table> is missing, I'd
like to see them happen. Otherwise, completely shot <tr> sections
would probably be best served without the <tr> at all. Trying to
accomplish that [ballet] splits now. ;-)


-- =

Met vriendelijke groeten / Best regards,

Ger Hobbelt

--------------------------------------------------
web:    http://www.hobbelt.com/
        http://www.hebbut.net/
mail:   [email protected]
mobile: +31-6-11 120 978
--------------------------------------------------

---------------------------------------------------------------------------=
---
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day =

trial. Simplify your report design, integration and deployment - and focus =
on =

what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july