Re: Incorrect Error messages

David Swindlehurst <davidms@uwclub.net>, 2012-05-01 14:24 +0100:

> G'day folks:
> 
> The following 2 Error messages are generated by the Validator from this page
> <http://www.lancsarchsoc.org.uk/programmelisting2012.html>.
> 
> 1. Error /Line 51, Column 148/: No p element in scope but a p end tag
>    seen.
[...]
> You will notice that, in reality, each p end tag DOES have a p start tag.
> For Line 51 the start tag is at Line 41, column 242. For Line 73 the start
> tag is at Line 64, column 2.
> 
> Why is the Validator generating incorrect messages, please?

The messages are correct. A <p>foo<ul> causes an implied </p> to generated
by the parser: <p>foo</p><ul>. So your </p> end tag is redundant.

Another way to look at it is, the <ul> element is not allowed as a child of
<p> element. But we don't emit an error message for <p>foo<ul> because it's
not actually an error -- because the </p> end tag is optional, <p>foo<ul>
and <p>foo</p><ul> mean exactly the same thing.

  --Mike

-- 
Michael[tm] Smith http://people.w3.org/mike

Received on Tuesday, 1 May 2012 13:55:15 UTC