[XML-SIG] Zope and DOM

Mike Olson Mike.Olson@fourthought.com
Mon, 05 Jun 2000 09:17:39 -0600


Dieter Maurer wrote:
> 
> Lars Marius Garshol writes:
> 
>  > I just noticed that Zope is distributed with something they call ZDOM,
>  > which seems to be a straightforward DOM implementation, although with
>  > some strange assumptions and base classes that I don't fully understand.
>  >
>  > However, it uses getFoo, where foo is an IDL attribute, rather than
>  > get_foo or _get_foo, which is not very good for interoperability.  Are
>  > lots of people using this? Should we try to get the Zope people to
>  > change this?
> As far as I now, DC works with FourThought for XML technology.
> 
> They, probably, won't like "_get_foo", because names starting
> with "_" are private and can be used neither from DTML nor
> from HTTP.

Yep, we just started working with them.  The ZDOM your looking at is the
old prototype.  The new prototype supports the _get_foo and get_foo. 
The second for the exact reason Dieter mentions.

> 
>  > Also, one solution to problems like those Bjorn Pettersen has been
>  > experiencing might be a DOM implementation based on ZODB. I've looked
>  > at this briefly and it seems as though it should be fairly easy to do,
>  > even though some attributes may not be available as attributes, but
>  > only as methods. (Since we shouldn't use __getattr__ with ZODB.) The
>  > _p_changed attribute also has to be maintained.
> ZODB objects can have (application specific) attributes that
> are accessed as attributes.
> Usually, the "_p_changed" attribute is maintained automatically.
> Jim Fulton recently announced that soon "__getattr__" and "__setattr__"
> will be usable by the application.

I think this was just released.

> 
>  > Beyond that, however, implementing a DBDOM seems relatively
>  > straightforward. Has anyone done this already? (If so, with what
>  > interface?) Is there any interest in this sort of thing?
> I just read, that they have such a thing.
> Extract from a message of "Martijn Faassen <faassen@vet.uu.nl>"
> to "zope-dev@zope.org" and "zope-xml@egroups.com":
> 
>  : Right -- XMLDocument does this. It parses the XML into a DOM-like tree,
>  : storing the XML nodes as objects in the database. You still get an XML
>  : view on it, but it's actually all objects.

This is the old XMLDOcument prototype.  We are adding this as a feature
to the new prototype.  Unlike Amos's implementation, we hope to give the
user a very wide range of flexibility over what portions of the document
are converted to objects, and which are stored as attributes on
objects.  We have a bit of hashing out to yet but hope to have something
useful out in a week or two....

Mike
> 
> Dieter
> 
> _______________________________________________
> XML-SIG maillist  -  XML-SIG@python.org
> http://www.python.org/mailman/listinfo/xml-sig

-- 
Mike Olson				 Principal Consultant
mike.olson@fourthought.com               (303)583-9900 x 102
Fourthought, Inc.                         http://Fourthought.com 
Software-engineering, knowledge-management, XML, CORBA, Linux, Python