lynx-dev
[Top][All Lists]
Advanced

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

Re: LYNX-DEV pre-announcing a new Lynx SGML.c parser


From: Foteos Macrides
Subject: Re: LYNX-DEV pre-announcing a new Lynx SGML.c parser
Date: Tue, 22 Apr 1997 10:06:03 -0500 (EST)

Klaus Weide <address@hidden> wrote:
>[...]
>Some other existing dependencies of HTML.c on SGML.c hacks seem to be
>that there is no handling code for </P>, and SELECT's don't seem to work
>if OPTION is SGML_MIXED and there are explicit </OPTION>'s.  (It should
>not be EMPTY, according to the DTDs... And yes, there are probably very
>good reasons why HTML.c does it the way it does.)  

        I had left P the way it was, going to HTML_start_element() for
the end tag, instead of changing it as I did for FONT together with
the mods for FORM, A, and the emphasis elements, because it should
do the same things as for a P start tag, and count on the GridText.c
paragraphing code, or my LYEnsure...Space() functions in LYCharUtils.c,
to enforce the correct number of blank lines between that paragraph and
whatever follows it, and case P: has a great deal of code.  You can
simply add a case P: to HTML_end_element(), or rather, remove my
#ifdef NOTDEFINED for it there, and simply copy all the case P: code
from HTML_start_element().  It would be better, though, to make it a
function in LYCharUtils.c, so HTML.c doesn't creep back up to a size
which makes some compilers choke on it.

        You've created the situation where sp[0].tag_number becomes
HTML_OPTION instead of staying HTML_SELECT, so I assume all you
have to do in HTML_put_character() for the switch() on that stack
element is add case HTML_OPTION: together with case HTML_SELECT:
where it appends the character to the me->option chunk.  I assume
you're calling HTML_end_element() and poping the stack for implied
or overt OPTION end tags, so the case HTML_SELECT: code should still
work as intended.


>Here is another page of *really* awful "HTML" that you may want to
>test against: http://www.ludd.luth.se/~max/ and the computers.html
>links in that.  (Recently came up in a crash report.) My code may 
>actually give better results there, although it is really hard to tell
>what the author intended there...

        They work fine with lynx2-7-1+FOTEMODS, but they also work
fine, without a crash, for the vanilla lynx2-7-1.  The only difference
is for bullets associated with LIs, due to the bad HTML changing the
UL nesting level from what's intended.

                                Fote

=========================================================================
 Foteos Macrides            Worcester Foundation for Biomedical Research
 address@hidden         222 Maple Avenue, Shrewsbury, MA 01545
=========================================================================
;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]