Regular Expression Help for Python Newbie.

Tony J Ibbs (Tibs) tony at lsl.co.uk
Tue Apr 11 10:41:11 EDT 2000


I was being a pedant about HTML allowing <TR>'s to be absent or not...

> Fredrik Lundh replied:
> you're right -- but only in theory ;-)

Well, yes, I knew that!

> so when the browser stumbles upon a <TABLE> followed by
> a <TD>, it can easily figure the rest out itself, based on the
> DTD.

in that case, and in the example given, because it's not in a record 'cos
it's just ended one, yes, it's obviously easy.

Then, on trying to "guess" what to do next:
> > And obviously that's what some browsers do. This way also lies
> > madness.
>
> some?  I suspect 99.99% of browsers used for serious surfing
> do things like this -- and *much* more...  (if you want to see
> some real madness, go browse the original navigator sources ;-)

as I said, madness did lie that way! (you perhaps haven't spent as much time
as I have trying to get browsers to behave correctly when they have
*correct* HTML, or striving to find out what is wrong when they guess wildly
incorrectly because of a stupid typo - "where did the rest of my page go?".
I seem to be fated that way sometimes).

I don't mind the browser attempting to continue, what I mind is wild
unpredictability...

> (the real design mistake is of course to do the fixes in the
> browser, instead of doing them in the authoring system or
> the server, but that's another story).

on which we agree entirely. Unfortunately, given all the people who don't
know what they're doing when they write authoring (well, I hesitate to say
"systems") I guess we're stuck. But it's still a pity, and I can't help
grumbling.

And (as you gave an example) obscure messages from validators don't help at
all.

Tibs

--
Tony J Ibbs (Tibs)      http://www.tibsnjoan.demon.co.uk/
Feet first with 5 wheels...
My views! Mine! Mine! (Unless Laser-Scan ask nicely to borrow them.)





More information about the Python-list mailing list