XML Parser, interleaving text and elements

Lex Spoon lex at cc.gatech.edu
Tue Sep 9 14:59:35 UTC 2003


Avi Bryant <avi at beta4.com> wrote:
> 
> On Thu, 4 Sep 2003 sstnjpm02 at sneakemail.com wrote:
> 
> > Thanks. I see that my example works properly but I hope I am not trading
> > one set of problems for another. So far I found one problem which prevents any
> > of my html from rendering:
> >
> > <br/> 			prints as <br//>
> > <input href="y"/>   	prints as <input href="y"/> /&gt;
> >
> > and various other problems with &gt;....   being added
> 
> The problem seems to lie with Scamper's HTMLTokenizer class, which the
> HTML-Parser package reuses.
> 
> It looks like some hacking of #nextName and #nextTag would be in order.
> If I get a chance I'll look at that later tonight.
> 

Well, HTML doesn't have self-closing tags like this.  Are you thinking
of hacking the tokenizer to return *two* tags when it sees a
self-closing tag?  I suppose that would be a reasonable way to go, since
the main goal of these classes is to render.

What's up with self-closing tags, anyway?  XML throws away all the
niceties of SGML... and then adds this?  What a nuisance.


Lex



More information about the Squeak-dev mailing list