XSLT section ============ A XSLT pipeline section lets you apply stylesheet to some XML data stored on item. The XSLT section blueprint name is ``quintagroup.transmogrifier.xslt``. That data need to be transformed is determined by ``source`` option. It gives the key in dictionay where data is stored. Dictionary is standard structure for storing files data in other our sections. It's stored on item on ``_files`` key, but this can be changed with ``files-key`` option. Usually stylesheets are used to transform data returned by ``marshall`` section. We register those stylesheets in ZCML with special directive, for example: ``source`` atribute in this directive is similar to that in section option. Which stylesheet to use is determined for every pipeline item by inspecting it's values stored on keys specified in ``from-key`` and ``to-key`` section options. If item don't has those keys, it will be skepped. >>> xslt = """ ... [transmogrifier] ... pipeline = ... xsltsource ... xslt ... printer ... ... [xsltsource] ... blueprint = quintagroup.transmogrifier.tests.xsltsource ... ... [xslt] ... blueprint = quintagroup.transmogrifier.xslt ... source = marshall ... from-key = _old_type ... to-key = _type ... ... [printer] ... blueprint = collective.transmogrifier.sections.tests.pprinter ... """ >>> registerConfig(u'quintagroup.transmogrifier.tests.xslt', xslt) >>> transmogrifier(u'quintagroup.transmogrifier.tests.xslt') # doctest: +ELLIPSIS {} {'_type': 'Weblog'} {'_old_type': 'Blog'} {'_files': {'manifest': {'data': 'xml', 'name': 'manifest.xml'}}, '_old_type': 'Blog', '_type': 'Weblog'} {'_files': {'marshall': {'data': 'transformed xml', 'name': 'marshall.xml'}}, '_old_type': 'Blog', '_type': 'Weblog'}