Re: OpenOffice/ODF support for Silva?
Dave Kuhlman <dkuhlman-7elm6Tqn/[email protected]>
| Newsgroups | gmane.comp.web.zope.silva.devel |
|---|---|
| Message-ID | <[email protected]> |
Here is a little bit of an update on my export to ODF effort. I've been studying the code in: - Silva/adapters/zipfileexport.py - Silva/silvaxml/xmlexport.py - SilvaDocument/silvaxml/xmlexport.py - Sprout/src/sprout/saxext/xmlexport.py Perhaps the code in these files seems a bit convoluted; it bounces back and forth and up and down in several inheritance hierarchies. However, that looks like good scaffolding for the ODF export stuff also. And, I'm hoping that once I understand the existing code better, the fit with ODF code will be good. That's because the code I wrote to export Docutils/reStructuredText to ODF was also event driven in the sense that the export code (called a "writer" in Docutils speak) contains visit_*/depart_* methods for each node type, which are called by a "walk" method. It seems like in the Silva export mechanism, the export code has to do its own walk (calling methods like subsax). But, the approach is similar. And, by adding code that is reasonably symmetric with the existing code, future maintenance will be easier, I believe. I'll be travelling for the next week or so. My Sweetie needs to visit her Mother in Devils Lake, North Dakota, USA. So we're driving from Sacramento, California, will visit for a few days in North Dakota, then driving back. We'll try to make something of a vacation out of it and see some scenery along the way. We're especially looking forward to Yellowstone National Park, Wyoming, which is on the way. So, I'll pick this up again when I get back home. Dave -- Dave Kuhlman http://www.rexx.com/~dkuhlman