[silva-dev] Silva XML import/export machinery
Luthiger Stoll Benno
benno.luthiger at id.ethz.ch
Wed May 24 17:44:25 CEST 2006
I eventually got it.
The things that worried me until I understood it was that I have to implement both the old style and the more up-to-date import/export system.
The old style import/export is triggered when the user selects "export to Silva xml (.xml)" and consists of implementing the 'to_xml()' method on the custom content object (for the export) and the xml_import_handler() method for the import.
The newer import/export system is started when the author selects "full media export (.zip)" and consists of implementing the sax handlers and producers.
Thanks Andy and Eric for your feedback
> -----Original Message-----
> From: silva-dev-bounces at infrae.com
> [mailto:silva-dev-bounces at infrae.com]On Behalf Of Andy Altepeter
> Sent: Dienstag, 23. Mai 2006 15:45
> To: silva-dev at infrae.com
> Subject: Re: [silva-dev] Silva XML import/export machinery
> > Hmmm, the readme may be out of date, I'll look into that.
> The way to go
> > is create your own sax handlers and producers and register
> them. This
> > may sound more daunting than it actually is, since Silva and Sprout
> > provide handy base classes which do a lot of the work. If
> you look at
> > the silvaxml directory of SilvaDocument, you can see how an
> > can register its own handlers and producers, but since
> SilvaDocument is
> > something of a special case, and rather complicated, a
> simpler example
> > may be in order. SilvaDLCMS now also uses the new import/export
> > infrastructure, so have a look at the dlcms_xml directory
> in the trunk
> > version of that, for a relatively simple example.
> > Silva's own export and import classes may be good examples as well.
> If you want even more examples, my Silva extensions
> (SilvaCustomAutoTOC and
> SilvaStylesheets, on zope.org/Members/aaltepet) also
> implement both the old
> and the new xml i/e apis.
> silva-dev mailing list
> silva-dev at infrae.com
More information about the silva-dev