Re: Gnomescape...when?



brett@milliways.itd.uts.edu.au (Brett Morgan) writes:
> > 
> > brett@milliways.itd.uts.edu.au (Brett Morgan) writes:
> > > 
> > > > 
> > > > I think it is more of a victory of the Linux crowd, Netscape obviously bought
> > > > into the "Bazar" model of programming. 2000 distributed programmers with
> > > > no leadership, can write "cooler" (but not neccesarily cleaner) code. 
> > > > 
> > > > It will be interesting to see what happans. 
> > > 
> > > Heh. have a look what the netscape parser does to html. its so far from
> > > the standard that it cant be too hard to write better designed code than 
> > > the stuff currently in it ;)
> > > 
> > 
> > Hmm..  no, the parser accepts valid HTML.  It's just following the old
> > adage: be strict about what you write out, be lenient about you read
> > in.  writing a lenient parser is a lot more difficult than writing a
> > strict one.
> 
> Try writing a page that sets say bold on and then say italic off,
> load it into a browser and gee whiz, that italic off just became
> a bold off ;)
> 

That's broken HTML.  There's nothing wrong with netscape's treatment
of it.  You're not supposed to have unbalanced tags, such as:

<i> foo <b> bar </i> baz </b>

if you build up a tree (since an HTML document really does represent a
tree) when you find the end tag for a node, it's logical to pop it.

> Ie, the browser just takes whichever token is on top of the 
> push down stack and pops it. This means all your style tags
> must not span other style tags. There aint nothin in the standard
> about those style tags having to be inside or outside :P

sure there is.  tags are supposed to be balanced.  Isn't that a basic
premise of SGML.  Otherwise you get ambiguity, and people thinking
a browser is doing the wrong thing when it isn't.

Now, I'm not saying that the navigator shouldn't be as lenient as
possible.  In my mind, it would be worth it to fix the parser so it
could handle cases like the above in a less surprising, but perhaps
less standard way.  But what netscape is doing is not incorrect.

christoph



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]