[Dillo-dev]Re: dillo patch: entities (BUG#605)
On Tue, Jan 04, 2005 at 01:33:01PM +0100, Matthias Franz wrote:
Hi Jorge,
On Mon, Jan 03, 2005 at 12:05:59PM -0300, Jorge Arellano Cid wrote:
I just reviewed and commited the patch.
Great!
* The ';' at the end is no longer required. In fact, it is optional according to the SGML spec (see also Sec. 5.3 of the HTML 4.01 spec). Omitting the ';' produces a warning.
When show_extra_warnings is set.
I wonder if it is better to always rise the warning. Of course it is perfectly legal for SGML but IIRC XHTML requires the ';' and authors prefer to add it with a view to avoid problems, so a reminder should be welcome. e.g. www.linuxpackages.net.
That depends on what the (extra) warnings are intended for. I thought that ordinary HTML_MSG are for errors, so that (ideally - we/you don't want to be 100% perfect) if show_extra_warnings is off, "no errors" means that the page is valid HTML. If show_extra_warnings is on, then one gets additonal warnings, for example about bad style, incompatibility with XHTML etc. Of course, this is a design question.
I also agree with this view. It provides a simple formal definition too ;). Let's keep it now and see what happens.
One more remark about the HTML error messages. I would suggest the following:
* Leave out the "HTML warning" at the beginning of each entry - all the more that most entries are errors.
* Introduce a macro HTML_ERROR for real error messages. It replaces HTML_MSG (in most of the source code; internally it may call HTML_MSG).
* Introduce a macro HTML_WARNING like
#define HTML_WARNING(fmt...) if (prefs.show_extra_warnings) \ HTML_MSG("warning: " ## fmt)
(not tested - you get the idea).
What do you think about it?
It looks like a good idea. It's more correct to label them "HTML error" and "HTML warning" than as it is done currently. My main concern is about page authors taking it personal. ;-) The other point is that we'd have to be very accurate. The nesting detection is ok now, but we'd have to start taking into account whether we're dealing with HTML.(version) or XHTML for some messages.
I made a minor change to avoid the #ifdefs.
good idea
Ah, we're now raising a warning when a named entity is not found. I don't know whether our list is complete. It'd be good to check because we could be giving misleading warnings for a small yet unsupported set.
OK, I'll do it. But give me some days ...
-- Cheers Jorge.-
participants (1)
-
Jorge Arellano Cid