[Prev][Next][Index][Thread]

Re: B.10 Empty elements?



James Clark wrote:
> 
> At 07:57 15/10/96 -0500, Len Bullard wrote:
> >James Clark wrote:
> >>
> >> At 18:21 14/10/96 -0700, Bill Smith wrote:
> >> >Len Bullard wrote:
> >> >
> >> >> 3.  Is the processing time severe for the case you state?
> >> >> I realize this question has many hands to argue with.
> >> >
> >> >While the average case time may not be "severe", the worst case behavior
> >> may be
> >> >and therefor cannot be ignored.
> >> >
> >> >If an empty element is inserted high in a document instance (say an <A>
> >> within a
> >> >high-level <DIV> in HTML 3.2), the emptiness of <A> cannot be inferred
> >> until the
> >> >enclosing element is closed - or the parser performs lookahead. Either way,
> >> >processing is delayed and application complexity increases.
> >>
> >> Isn't the problem even worse than this?  You don't just to figure out that
> >> empty elements are in fact empty, you also have to figure out that non-empty
> >> elements are not in fact empty. The first time I see a chapter tag, I can't
> >> tell that it is not in fact an empty tag until I see its close tag.  So
> >> either I can't start displaying the chapter until I have got the whole
> >> chapter or I have to assume initially that every tag is non-empty and be
> >> able to go back and reformat when I discover one that's not.  This just is
> >> not going to work.
> >>
> >> James
> >
> >But it is working.
> 
> I meant that neither of the two possibilities in the penultimate sentence
> were viable: if you are guaranteed to have a DTD (or at least a partial one)
> there's no problem using <e> for empty elements; if you are happy not to
> have the document display as it loads, there's also no problem.
> 
> James

I buy that.  Which do you prefer?

<e></e> or <@e>

The <@e> solution is attractive to me because it 
is easy to explain, easy to use, and meets the 
rule of thumb Dr. Goldfarb mentions that different 
features need different syntax.

I can live with either, it's just easier to explain <@e>
because most SGML hackers have stumbled over empty elements 
and know there is a problem there.  Like mixed content, just 
say, "oh that solves the mixed content fubar" and they 
will be happy.

Otherwise, we say, "you use empty elements, you need a DTD", 
or, "please get used to this syntax convention that was 
proposed to make your production simpler, and the cost 
of your tools less?"

len


References: