Re: [gdome]detail of 'how to extend a module?'


On Wed, 19 Mar 2003, Kang Jeong-Hee wrote:
> 1. how to determine which Vtab and API required?
> each module has their own Vtab struct and APIs.
> how to know what exactly API is required?
> I can read W3C recommendation and IDL of each interface.
> but don't know what is required to implement in libgdome.

well, if your objective is to create the Gdome2 module corresponding to
DOM HTML then you should implement _ALL_ the interfaces as they are
described in the recommendation. Straight simple. Or am I missing

> 2. apigen in test?
> what is real work of apigen and its xml files?

I've used it once calling it manually, but I think that Paolo or Tobias
have more experience to report on that.

> building xml file for a module itself is really annoying work, I think.
> is that impossible to just call each IDL file and convert to something?
> and why in test?

it depends. The creation of the DOM XML and DOM Event layers are not so
easy to automatize, the computer can't just guess the code. Once you've
implemented it in Gdome2, however, the creation of bindings for other
languages can be almost completely automatic, as it is the case of the
C++, Ocaml, Ruby bindings. And perhaps Perl too?

In the particular case of the DOM HTML module, however, it is true that by
having an abstract description of the interfaces it may be fairly easy to
create most of the code automatically. Perhaps you might find interesting
the generation mechanism of gmetadom
( which is based on XSLT stylesheets going
directly from W3C IDL spec (in XML format) to C++ code.
BTW, I plan to do this for the MathML DOM at some point, although I think
I'll do it for the C++ level directly.

-- luca

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