XML export/import is cool! (Was Re: [Zope-dev] Deprecating XML export/import?)

Andreas Jung lists at zopyx.com
Fri Mar 24 11:33:00 EST 2006



--On 24. März 2006 11:07:06 -0500 Jim Fulton <jim at zope.com> wrote:

> Andreas Jung wrote:
>> Zope supports the export of content either through Python pickles
>> (.zexp) or as XML. Unfortunatly the XML export/import has several
>> problems:
>>
>> - the generated XML is pretty much too low-level to use it e.g.
>>   for migration issues
>
> I have been working on a Zope 2 project lately and have found
> XML export to be extremely usable.  Templates and other
> large strings are enclosed in CDATA sections, which make them
> surprisingly readable.
>
> We've had sucess writing XSLT templates to transform the pickle data
> into formats easily parsable for particular applications.

That's a good argument :-)

>
>> - it was broken multiple times in the past, it still has problems
>
> How so?

XML export did not work properly over some major Zope release (I think 
until Dieter fixed it). And there is at least one unicode related bug 
report pending (when I read such reports I am thinking about the following 
options: a) ignore the report and b) who the hell wrote the code and could 
fix it).

>
>> - it has no maintainer, nobody wants to touch it without gloves
>
> Is that any more true than for lots of other things?

Right, but for duplicate functionality that is not widely used and that I 
consider buggy it is legitimate to propose the deprecation. But as usually 
I am open to good arguments :-)



>
> As I said above, I've been finding it surprisingly useful lately.
>
> When I first wrote it, I viewed it as someowhat of an academic
> exercise, but I've come to realize that it is far more useful than
> I originally thought.

I still have the impression that the implementation was made an academic
excercie  rather than something stable for production (.zexp works fine
for production).

> This is more so now that XSLT is widely used
> and quite capable of transforming the pickles into useful forms.

>
> Note that, IMO, there isn't likely to be a more generally useful
> form because usefullness is generally determined by a particular
> application.  XSLT + XML pickles together provide a general mechanism
> that can adapt to particular application needs.

In this case it has to be fixed if it should be used a general mechanism.


> I think the XML export is a facility that is and should be advertized
> as a legitimate escape hatch for data kept in Zope.  People really
> shouldn't feel afraid of putting data in Zope/ZODB as there
> really is a useful way to get it out.

Reasonable export/import should happen on a higher level. This low-level
XML import/export is not really helpful when you want to migrate data 
between applications and frameworks. E.g. on the Plone/Archetypes level we 
have some mechanisms to export/import data defined through schemas 
(possibly
we have something in Zope 3 (at least I once wrote a similar solution for 
Zope 3). The export/import mechanism is basically for moving data from one
Zope instance to another instance. It should work in a reliable way and 
should not try to solve issues that should be solved on another level.

To bring it to a point: further Zope 2 versions should get rid of buggy and 
esoteric features and apparently don't work for lots of ppl resulting in 
frustration and a bad image for Zope.

Andreas


    -----------------------------------------------------------------------
   -   Andreas Jung            ZOPYX Ltd. & Co KG                        -
  -   E-mail: info at zopyx.com   Web: www.zopyx.com, www.zopyx.de         -
   -----------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20060324/42e8b18f/attachment.bin


More information about the Zope-Dev mailing list