#112: XML Import / Export
- Contents
Extend Plone with core functionality to export sites or content trees to a neutral format, and to import from that format. The neutral format here is an XML dialect, that captures a complete infoset regarding site configuration and content state.
- Proposed by
- Kapil Thangavelu
- Seconded by
- Jens Klein
- Proposal type
- Architecture
- Repository branch
- plip112-xml-import-export
- State
- in-progress
Definitions
- XMLIO
- XML Import and Export
- RelaxNG
- An XML Schema Validation language.
- libxml
- A c-based implementation of many of the core XML Specs, it is the reference implementation used by much of the FOSS landscape and also has SWIG based python bindings.
- Goldegg
- A project aimed at improving Plone through funding development of the entire software stack that Plone is built on. XMLIO is a goldegg funded project.
- Marshall
- A product from Enfoldsystems, which allows for defining via configuration the import / export serialization used for a given content object.
- GenericSetup
- A framework for managing configurations within a Zope application.
- CMFSetup
- A product that represents additional policies ontop of the GenericSetup framework for serializing tool/service configuration to and from XML.
- ZUCCARO
- ZUCCARO (Zope-based Universally Configurable Classes for Academic Research Online) is a database framework for the Humanities developed by the Bibliotheca Hertziana, Max Planck Institute for Art History For further information: http://zuccaro.biblhertz.it/
Motivation
There are a number of use cases that XML Import/Export can satisfy.
Site Upgrades
Site Upgrades currently, utilize a function registry to enable upgrades, this process is labor intensive and non introspectable with regards to the changes it makes to a site. Site Import/Export offers an alternative to this mechanism via being able to export a site, manipulate/transform the XML, and import it back in as a new site.
Content Exchange
Allows for the exchange of site content with other content consumers.
Archival Purposes
Many business and governmental organization have strict legal requirements regarding the availability of content and information. XML Import/Export facilitates this with the ability to periodically export a site or subset thereof to of thatThe ability to export to perm
Application Import/Export
Applications often need to exchange data between systems in an application specific fashion, the XML Import/Export Framework (XMLIO) utilizes the Zope3 Component architecture to define adapters for content import and export as well as shipping default adapters for content. This is to facilitate integrators and developers utilizing the framework when developing their own application specific import/export adapters.
Proposal
See Implementation for details. High level overview, define zcml registrations and adapters from plone content to cmfcore filesystem import/exporter interfaces, utilize the marshall product for XML serialization.
Implementation
The XMLIO implementation tries to reuse as much as possible of extant products. Tres Seaver has landed GenericSetup infrastructure into CMF-2.0 including interfaces and adapters for content import / export. The XMLIO builds on this infrastructure to provide adapters and registrations for Plone content and utilizes the existing tool handlers in CMFSetup for configuration XMLIO. The content import/export adapters utilize the Marshall product to handle xml serialization and deserialization for a given Archetype content object. The default xml marshaller in the Marshall product uses its own format ( relaxng schemas provided) as a canonical representation.
The Marshall implementation in use for XMLIO is the one on the pluggable namespace branch, which refactors the marshall core to allow for user defined registration of xml namespaces import and exporters for content, and additionally allows includes handlers for security and workflow state associated with an archetype object. Additionally allows for runtime selection of which regstered namespaces (dublincore, workflow, etc ) to utilize while exporting.
Deliverables
ContentSetup Product
- defining adapters and registrations for content to do XMLIO.
- providing an import/export tool and a basic Plone Control Panel UI
Risks
libxml and its python bindings are needed as dependencies and will be needed in platform installers.
UPDATE: Marshall was refactored to use ElemenTree.
Progress log
- 2006-07-19 (jensens)
- For the ZUCCARO project we developed XMLForest. XMLForest uses Marshalls ATXMLMarshaller for single content objects (de-)serialization and build from all this snippets an IMS-Content-Package ZIP-File. It im- and exports it. XMLForest support Archetypes References and Relations including content-references and content-relations. It is UID-aware and supports updates.
- 2006-08-25 (jensens)
- After bugged by Alex Limi and talked to Phil Auersperg I created a bundle for this plip including XMLForest.
Participants
Jens Klein
Phil Auersperg
Gogo Bernhard
Martin Raspe


- What version of Plone would you target this for?
- How compatible will it be with previous versions?
- Will there be some kind of migration nescessary, or some toying with the products, to make them XMLIO compatible?
Or is it too early to ask these questions?
Otherwise, knowing it will export not only the objects, but also their properties, relations (or references), workflow and path. Exporting the site, and thus the configuration of its tools and properties. I can only rejoyce knowig this is being made.