README
plone_docbook
- by "Mario Theodoridis" <mario@schmut.com>
Most of the test code is from other products.
This product allows importing of XML Docbook files into a Plone instance. The
file is specified by typing the filepath into a text field. The filepath refers
to the filesystem of the server that's running the plone instance not the
filesystem of the computer that's running the browser. The title of the
document will be extracted from the docbook file. All local images that the
docbook file refers to will be imported and linked provided that they exist.
Remote image src paths i.e. those that start with http:// will be untouched.
Note, that while this product is convenient, it is not safe. I plan to later
implement a version that allows uploading instead of using the local filesystem.
Currently there's also a lack of checks for document types.
This product contains a mimetype (for the mimetypes_registry), a transform
(for portal_transforms) that is capable converting xml docbook into HTML and
an ArcheType (for portal_types) that facilitates editing and viewing. There are
also an overridden view and a content icon in the skins directory.
The mimetype, in mimetype.py, is 'text/x-docbook'. The transform is
called 'DocbookToHtml', and can be found in transforms/docbook_to_html.py. The
content type is in docbook.py.
Disclaimer:
This is a VERY initial release of this product. it is also my first Plone/Zope
product ever, so this is NOT ready for production in any form whatsoever.
Consider it a sneak preview.
Requirements:
An xslt processor such as xsltproc
The xml docbook xslt stylesheets
- Before installing plone_docbook you need to have the unsafe_transforms in
PortalTransforms enabled else it will not show up in the quick installer.
- xmltreewalker - http://www.schmut.com/
- Zope 2.9 - Plone 2.5 - Python 2.4
Installation:
- Enable the unsafe portal transforms (see
PortalTransforms/docs/user_manual.rst in your Products directory for details)
Add __init__.py into the PortalTransforms/unsafe_transforms directory to make
that happen.
- Untar plone_docbook-0.1.tar.gz in your Products directory
tar -zxvf plone_docbook-0.1.tar.gz -C <path/to/plone/instance/Products>
- Restart your Plone instance
- Login as admin in your Plone-instance
- Use the portal_quickinstaller tool in the ZMI, or (Add/Remove Products) in
your Plone Site Setup interface to install it.
- In the ZMI - portal_transforms - docbook_to_html adjust the paths to the
processor, the XSLT Path of the DTDs and default xslt stylesheets to point
to where you have them installed.
Usage:
Goto Add to folder -> docbook
Type the local filepath to the xml docbook file into the text field.
To update a file, simply click on the edit tab and hit the save button.