Re: [xml] patch: support <embed> in HTML parser

Hi Daniel,

 <grin/> where is the limit ?

So far <embed> is the only element I've seen that triggers error messages from the HTML parser. Then again, it doesn't seem to support <blink>, but I'm not sure if any site uses it unironically these days :)

In practice what were the problems except getting (rightful) error messages ?

Confusing error messages. Since the HTML parser already supports <applet> and <iframe> it doesn't seem like there is any harm in adding <embed> as well.

It seems to work for me, but it would be good if someone could check that I got the magic numbers right in the HTML element array.
+{ "embed",   0, 2, 2, 1, 0, 0, 1, "generic embedded object ",
+       EMPTY, NULL, DECL embed_attrs, NULL, NULL

  is it an empty element ? I would tag it as deprecated though.
See _htmlElemDesc in HTMLparser.h

Actually no, it doesn't seem to be an empty element at all, and it should be deprecated, and also only in the loose DTD, so could switch the patch to look like this:

+{ "embed",   0, 1, 2, 0, 1, 1, 1, "generic embedded object ",
+       EMPTY, NULL, DECL embed_attrs, NULL, NULL

Is endTag=1 correct? (means the end tag can be omitted). There is also a value of 3, meaning "the tag is stylistic and should be closed easily", but I don't really know what that means.

Best regards,


Print XML with Prince!

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