Re: [xml] HTMLparser enhancements

On Wed, Jan 15, 2003 at 10:49:27PM +0000, Nick Kew wrote:
On Wed, 15 Jan 2003, Daniel Veillard wrote:
  Yes, and it's basically a libxml2 only table, we don't expect
user code to allocate such entries.

Indeed.  Actually I'd ideally like to make it writable and add a
void* userdata field (which I'd use to store a function that'll
be called from SAX [start|end]Element handlers).  But I thought
that making it non-const would probably not be acceptable.

  basically it's a const table, I would prefer to keep it that way, yes.
You can probably keep that callback table separated in your own code,
right ?

  Hum, how do you fill that ? Based on HTML4.01 DTDs ?

Yes.  Or, equivalently, XHTML 1.0.  It's basically just extending
what you've done.


Seems you don't suggest handling required attributes (like alt on img).

Indeed.  Yes, it would benefit from that info.  The reason I don't suggest
it is that I haven't implemented it in this form, but it should be
straightforward.  Also there's the issue that you can't do meaningful
repair of missing attributes without human intervention.

  true, I was thinking about being able to signal the problem.

Any recent changes to htmlParser?  Should I be sure to patch
against current CVS, or will a recent-ish 2.4.x release suffice?

  no big change that I can think of, really. It's rather stable.


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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