RE: Silva XML import/export machinery

"Luthiger Stoll Benno" <[email protected]>
Newsgroups gmane.comp.web.zope.silva.devel
Message-ID <[email protected]>
Hello

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
Benno

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of Andy Altepeter
> Sent: Dienstag, 23. Mai 2006 15:45
> To: [email protected]
> 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 
> extension
> > 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.
> 
> 
> Cheers,
> Andy
> _______________________________________________
> silva-dev mailing list
> [email protected]
> https://infrae.com/mailman/listinfo/silva-dev
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.