Manifest exporter and importer sections
=======================================

A manifest exporter and importer sections are used to generate and parse
manifest files - listings of objects contained in some folder in XML format.
These listings are needed to set portal types for pipeline items and also act
as filter on them - items not listed in manifest will be removed. Manifest
import section is also a source section - it will generate item for every
record seen in manifest which didn't have any corresponding item in the items
stream from previous source sections. The manifest exporter section blueprint name is
``quintagroup.transmogrifier.manifestsexporter`` and importer section blueprint
name is ``quintagroup.transmogrifier.manifestimporter``.

Both sections has ``files-key`` option that gives key in item where XML data
will be or is stored (default is ``_files``). Exporter section has
``entries-key`` option, which specifies key in item where list of 
(object_id, portal_type) pairs that represents folder contents is stored 
(default is ``_entries``). Importer section has ``path-key`` option which
specifies key in item where path to object is stored (default is ``_path``)
and ``type-key`` option that gives key to store item's portal type (default is
``_type``).

>>> manifest = """
... [transmogrifier]
... pipeline =
...     manifestsource
...     manifestexporter
...     manifestimporter
...     printer
...     dataprinter
... 
... [manifestsource]
... blueprint = quintagroup.transmogrifier.tests.manifestsource
... 
... [manifestexporter]
... blueprint = quintagroup.transmogrifier.manifestexporter
... 
... [manifestimporter]
... blueprint = quintagroup.transmogrifier.manifestimporter
... enable-source-behaviour = true
...
... [printer]
... blueprint = collective.transmogrifier.sections.tests.pprinter
... 
... [dataprinter]
... blueprint = quintagroup.transmogrifier.tests.dataprinter
... print = 
...     _files
...     manifest
...     data
... """
>>> registerConfig(u'quintagroup.transmogrifier.tests.manifest',
...                manifest)
>>> transmogrifier(u'quintagroup.transmogrifier.tests.manifest') # doctest: +ELLIPSIS, +REPORT_NDIFF
[('_entries',
  (('news', 'Folder'),
   ('events', 'Folder'),
   ('front-page', 'Document'),
   ('only-in-manifest', 'Document'))),
 ('_files',
  [('manifest',
    [('data',
      '<?xml...>\n'),
     ('name', '.objects.xml')])]),
 ('_path', '')]
<?xml version="1.0" encoding="utf-8"?>
<manifest>
  <record type="Folder">
    news
  </record>
  <record type="Folder">
    events
  </record>
  <record type="Document">
    front-page
  </record>
  <record type="Document">
    only-in-manifest
  </record>
</manifest>
<BLANKLINE>
[('_entries', (('aggregator', 'Topic'), ('once-more', 'File'))),
 ('_files',
  [('manifest',
    [('data',
      '<?xml...>\n'),
     ('name', '.objects.xml')])]),
 ('_path', 'news'),
 ('_type', 'Folder')]
<?xml version="1.0" encoding="utf-8"?>
<manifest>
  <record type="Topic">
    aggregator
  </record>
  <record type="File">
    once-more
  </record>
</manifest>
<BLANKLINE>
[('_path', 'news/aggregator'), ('_type', 'Topic')]
[('_path', 'events'), ('_type', 'Folder')]
[('_path', 'front-page'), ('_type', 'Document')]
[('_path', 'only-in-manifest'), ('_type', 'Document')]
[('_path', 'news/once-more'), ('_type', 'File')]
