Forum OpenACS Development: Re: XML to XoTCL Object

Collapse
3: Re: XML to XoTCL Object (response to 1)
Posted by Stefan Sobernig on
Nima,

Is there already an api available that maps xml records to xotcl objects?

From my side (which is mostly xosoap's), there is on-going work to provide something that is close to what you are looking for. The key idea is to provide some support for bridging xml schema and schema instances to the XOTcl object system (and vice versa). The result will be a dwarfish brother to the plethora of "xml data binding" frameworks available, just to name a few (predominantly created for the Javaverse):

and an uncountable number of others ...

However, this issue is certainly NOT TRIVIAL. For a fairly comprehensive (and practioner-oriented) overview, see the article on Revealing the X/O impedance mismatch. A rough conclusion is that no framework support can be (a) generic and, therefore, needs to be build around (b) specific use cases; remoting (xosoap) being one.

Anyway, as for the current status:

  • My current code work is just an implementation study, I am still fiddling around with major details. I can hardly promise something operative in the very near future. I would say that I have not tackled more than 40% of the work needed overall, ...
  • However, I am not re-inventing the wheel: I re-use the approach of xotcl-core's html procs, i.e. tdom based inline scripting, for "deferred building" of documents. Also, xotcl comes with powerful language features/ idioms that align nicely to the design requirements. This is particularily valid for xotcl's slots, or attribute slots to be specific.
  • I am concentrating on providing a basic infrastructure to cover more specific details of x/o mappings when needed.
  • Finally, there the basic facilities should be linked to the existing xotcl-core features, such as the ACS Object infrastructure, db stubs, widgets etc.

Again, there is no concrete code artifact I could easily share, it is just a rough outlook. However, maybe there is something in Gustaf Neumann's arsenal that I am not aware of and that fits nicely in your scenario?!