Re: [xml] Apparently incorrect paragraph wrapping in HTML parser



> We use the HTML parser in NetSurf, a browser
> (http://netsurf.sourceforge.net/).

Good job -- it looks very, very nice (judging by the screenshot and description, I have no RiscOS).

> We're happy with the current behaviour of the parser (which isn't what > you describe in your original message in the latest version). I agree > that the parser mostly shouldn't alter the document, although the
> current behaviour of inserting implied html, head, and body is useful.

So are saying you are happy about the status when the paragraphs do not get inserted?

I have no problem with implied html, head and body; I only have problem with paragraphs, since they generally occure more than once in the document, and at various places... so if there is a rule regarding <p> in CSS, and some extra <p> appears where the designer didn't expect it to pop up, issues may arise.

> I'd prefer if the parsing was not affected by the Doctype, because
> it's mostly meaningless on the web.

Ehm... no, they are not meaningless? As Liam Quinn himself confirmed earlier, the tags allowed in <body> _DO_ depend on the given doctype. How come it is meaningless? And what about the case of someone using custom DTD with libxml2 HTML parser?


Basically, my claim is that the paragraph insertion is broken and nonstandard at way too many levels; it ignores doctype, it doesn't wrap tags it supposedly should (the forementioned "img").

Perhaps solution that'll keep those who want the document modification happy would be to have the paragraph inserting function only do something if application coder explicitely demands it? (by something like, I don't know, htmlDoAddParagraphs() or something like that)

 -- iSteve



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