|Um, what's a DOM?|
According to the W3C, the DOM is ``a minimal set of objects and interfaces for accessing and manipulating document objects''. Basically, it's a programmatic way to tweak the document structure, altering element order, attributes and text content. You can also create new elements (called ``Nodes'') from scratch and stick them in the document tree. Nifty stuff. Our current plans are for a JS-exposed DOM, but someone might want to do a C/C++ one as well. There's no accounting for taste.
The Level 1 Document Object Model was recently finalized. ``Core'' Level 1 DOM stuff applies to both XML and HTML. It is hoped that our DOM will as well. There are additional interfaces specified for HTML (``Level 1 HTML''), too.
|What have we got?|
4.x as the ``Level 0'' DOM. That's already in place.
More exciting, though, is new stuff that was recently checked
into the tree. The pieces are:
lm_dom.c. This code is part of libmocha, the big hairball that ties layout to JS. Oh, and netlib and imglib and Java when it's there. It's big fun. lm_dom.c is the code that builds the DOM tree for layout. It's got all the callbacks that tweak layout structures and so forth.
Simple instructions on how to play with the DOM stuff:
- Update your tree via CVS. (This stuff is recent. Some of the bits only went in this morning, for example.)
- Build normally, but set the DOM flag. In Unix you do
$ setenv DOM 1Windows and Mac instructions coming as soon as someone fixes the build systems on those platforms to make it go. (You have to build the stuff in lib/libdom, as well as adding -DDOM=1 when building lib/layout and lib/libmocha.)
There are demos.Mike Shaver Last modified: Fri Aug 28 11:04:18 EDT 1998