John Beaman wrote:
>
> From: [EMAIL PROTECTED] (Sean M. Burke)
>
> Thanks for your effort. Greatly appreciated.
>
> >From your document:
>
> --------------------------------------------------------
> If we alter the parser to accomodate the above features
> of HTML, we will still find that it cannot properly handle
> this code:
>
> <p>You can run.
> <p>But you can't hide!
>
> It will parse as if it were:
>
> <p>You can run. <p>But you can't hide!</p></p>
>
> To do this, the parser needs to understand that since
> a ``p'' element can't contain another ``p'' element, the
> second start-tag ``<p>'' acts as if it were preceded by
> a close-tag ``</p>''.
> ----------------------------------------------------------------------
>
> I beg to differ on your assumption " It will parse as
> if it were: " as the following paragraph is how it parses.
> .
What I meant is that if we don't inform the parser about proper
containment, it will parse:
<p>You can run.
<p>But you can't hide!
just as it (not NS or IE) would parse
<p>You can run. <p>But you can't hide!</p></p>
I've changed this to explain it in terms of wanting not this:
* p
* "You can run."
* p
* "But you can't hide!"
but this:
* p
* "You can run."
* p
* "But you can't hide!"
(It's interesting that the problem here -- the lack of redundancy in
HTML -- complicates both our ability to parse it as well as to talk
about what the content of misparsed trees.)
--
Sean M. Burke [EMAIL PROTECTED] http://www.spinn.net/~sburke/