Re: [VE][73] New Error Message Suggestion

On Wed, 2 Jun 2004, [iso-8859-2] Martin Koní?ek wrote:

> Your parser write bug, where is no bug in my opinion

Pardon, what was your new error message suggestion?

> 370: <ul>
> 371: </ul>
> 372: </div></div><!-- /column-box -->
> Line 371, column 4: end tag for "ul" which is not finished
> But <ul> is finished correctly,

It isn't. But the error message is perhaps not quite clear. My suggestion:

end tag for "..." which lacks required content element(s)

> I thing you expect <ul><li>some</li></ul>,

That's more or less what the DTD says. A <ul> element must contain one or
more <li> elements (and nothing else).

> but in some time you have no data on dynamic page

There's no point in arguing with a validator, which has just analyzed
whether your document complies with the DTD you have specified.

(Practical hint: When you generate HTML markup dynamically and some list
might be empty, either test for this before emitting the <ul> markup, so
that there will be no <ul> element, or emit an empty <li> element,
<li></li>, which is poor usage but valid.)

Jukka "Yucca" Korpela,

Received on Wednesday, 2 June 2004 07:48:54 UTC