Importer Module =============== This module imports content from a Lenya 1.2 publication into a Lenya 2.0 publication. Configuration ------------- The importer module can be configured and adapted to custom needs as follows: 1. config/cocoon-xconf/usecase-importdocument.xconf: - parameter 'contextPath': This is the webapp context path of the source pub, e.g. /lenya. In Lenya 1.2, internal links contain this context path, e.g. /lenya/default/authoring/tutorial.html, therefore the link rewriting of the import will only work if the context path is configured correctly. If the webapp has been deployed in the root context, this value is empty. - parameter 'validate': Turn schema validation on/off. If 'validate' is set to true, each document will be validated during the import against the schema of the corresponding doctype. It is recommended to set this parameter to true, otherwise it may happen that imported documents cannot be saved anymore with editors which use validation. - parameter 'assetXpath': Xpath expression to find images and asset urls in the imported content (must denote attribute nodes), so they can be rewritten to uuids. Changing any of these two parameters in usecase-importdocument.xconf requires a clean re-build of Lenya. Alternatively, the values can be changed in cocoon.xconf in the webapp, which requires a restart of the servlet container. 2. XSLT stylesheets The following XSLT files can be adapted to customize the import: xslt/transformContent-xhtml.xsl xslt/transformMeta-xhtml.xsl xslt/transformRCML.xsl xslt/transformSitetree.xsl xslt/transformWorkflow.xsl A note on resource types (aka doctypes): The importer tries to guess the resource type name from the name of the document element of each document. Then it will try to find specific XSLT stylesheets for this resource type: xslt/transformContent-{resource type name}.xsl and xslt/transformMeta-{resource type name}.xsl If these files do not exist, a fallback to xhtml will happen (transformContent-xhtml.xsl and xslt/transformMeta-xhtml.xsl will be used). Usage ----- The import usecase is callable from the Edit menu. Imported documents will be inserted as child documents of the document where the usecase has been called. The usecase lets the user specify a directory on the server containing the Lenya 1.2 publication. On the next screen, the user may optionally select a sitetree entry-point to import only a subtree, and additional options. A progress bar indicates the progress of the import and of the link rewriting. When the import has completed, a link to a report is available. Note: - the import will overwrite existing content without asking - the import cannot be cancelled once it has been started