Re: SGML

Anne van Kesteren wrote:

> 
> Surendra Singhi wrote:
> 
>> Should I retain support for SGML or remove it(doing so will help the 
>> parser in speed as well as keeping the code simple)? And speed is a 
>> big concern for this browser.
> 
> 
> You should probably have to parsers. One tag-soup parser and one XML 
> parser.
> 
Thanks for all the suggestions and the answers.

I am thinking of having only one XML parser and for the tag-soup let the 
html renderer take care of it.
For example if there is a tag like < .... > this increases the depth of 
the parse tree, a closing tag like </ ...> this decreases the depth, and 
  a tag like < ... /> just increases the breadth.

So, for instance, if the document contains lot of <br> tags, they will 
increase the depth of tree. But if instead the tags are <br/> the depth 
of the parse tree remains same.

The reason why I don't want to handle tag soup parsing in the parser is 
because, the renderer is the one which ultimately decides how to print 
the document and so it is the one which will be best able to decide what 
to do with the tagsoup.

I heartily welcome all suggestions or criticisms on the above.

Thanks.
-- 
Surendra Singhi
www.public.asu.edu/~sksinghi/

"O thou my friend! The prosperity of Crime is like unto the lightning, 
whose traitorous brilliancies embellish the atmosphere but for an 
instant, in order to hurl into death's very depths the luckless one they 
have dazzled." -- Marquis de Sade

Received on Monday, 7 March 2005 17:35:05 UTC