- From: Daniel Veillard <Daniel.Veillard@w3.org>
- Date: Fri, 25 Aug 2000 13:53:39 -0400 (EDT)
- To: Michael Champion <mike.champion@softwareag-usa.com>
- Cc: www-dom@w3.org, michael.goulish@softwareag-usa.com, eric.bratton@softwareag-usa.com
On Fri, Aug 25, 2000 at 10:45:36AM -0400, Michael Champion wrote: > Getting to my main point ... I'm wondering about C language bindings for > the DOM. I know that Oracle has published one ... and the XML C Library for > Gnome is DOM-like, but not really an attempt to be a complete, > vendor-neutral C DOM binding as far as I can tell. Maybe i should report a bit on this. At least for archival/historical purposes. The libxml [1] parser builds a tree in memory which is a 'naive' representation of the interfaces in the specification (no hash tables, no fancy stuff). The original goal was to try to couple this with simple CORBA stubs to allow ubiquitous access to any structure available in memory. I wrote an early implementation [2] using the IDL to C stubber to generate the interfaces. Raph Levien tried to use it for an early version of his SVG renderer Gill [3] and immediately found that this suffered a very fundamental problem: by browsing the XML document through this API one would collect on the client side as many proxy objects for the real objects than there were elements and attributes in the real document. And there was no way to recollect this memory. A new DOM module [4] was generated but without CORBA and using direct function accesses. Of course the portability of the API somewhat got lost since it's not using anymore on only "official" C mapping for DOM which is based on the IDL compiler for C. On the good side, once DOM had been debugged a bit, turning the SVG renderer into a basic editor was less than 30 lines of code, binding the mouse event and calling the libxml save function on exit, that was very cool ! With the release of the libxml2 version, the work had been simplified to implement a DOM APIs on top of libxml, and there is a new module which is supposed to implement DOM 1 with HTML support and the Event part of DOM 2. But again we don't expect to use CORBA, and in that case it's quite hard to justify the horrid names that the IDL compiler would generate. The libxml2 framework is now ready if support for DTD access or Saving function is added in DOM3 and if some of the Gnome hackers need those functionnalities, Daniel [1] http://xmlsoft.org/ [2] http://cvs.gnome.org/bonsai/rview.cgi?cvsroot=/cvs/gnome&dir=gnome-dom [3] http://www.levien.com/svg/ [4] http://cvs.gnome.org/bonsai/rview.cgi?cvsroot=/cvs/gnome&dir=gdome -- Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes | Today's Bookmarks : Tel : +33 476 615 257 | 655, avenue de l'Europe | Linux XML libxml WWW Fax : +33 476 615 207 | 38330 Montbonnot FRANCE | Gnome rpm2html rpmfind http://www.w3.org/People/all#veillard%40w3.org | RPM badminton Kaffe
Received on Friday, 25 August 2000 14:00:43 UTC