xml doctypes implemented
qMax <[email protected]> Fri, 27 Jan 2006 17:26:24 +0600
| Newsgroups | gmane.comp.cms.bitflux.general |
|---|---|
| Message-ID | <[email protected]> |
Hi.
I finally get my xmldoc plugin working.
Posted as enhansement bug:
http://bugs.bitflux.ch/cgi-bin/bugzilla/show_bug.cgi?id=899
I hope it will be usefull.
Soon I'll post example to use simplified docbook
(need to clean up stylesheets abit).
Here's brief description of how it works.
====
There is plugin xmldoc and resource xmldoc to handle arbitrary structured
xml documents.
And supplementary class xmldocconfig to handle their configuration.
Resources in xmldoc-plugined collection is propertied with doctype.
When resource is to be rendered, content of a file is transformed
into xhtml using separate sitemap pipeline 'xmldoc' and a stylesheet
configured for the doctype,
the result is put in /bx/plugin[@name='xmldoc']
and ready to pass theme-styling stage.
Doctypes are configured in site-wide config file,
each doctype is associated with stylesheet, templates to create
resource and editors to choose.
For completeness, there should be also rng-scheme, but is't not yet
supported.
====
To use this plugin:
1. configure doctype in BX_LIB_DIR/conf/xmldoctypes.conf:
<doctype name="foo">
<template src="samples/foo-template.xml"/>
<editor name="oneform"/>
<stylesheet src="transform/foo.xslt"/>
</doctype>
1.1. make sure the editor is listed in BX_LIB_DIR/conf/editors/xmldoc.xml
2. Put a template into BX_LIB_DIR/doctypes/samples/foo.xml
There could be more then one template.
3. Create stylesheet in BX_LIB_DIR/doctypes/transform/foo.xslt
This stylesheet should transform node /bx/plugin[@name='xmldoc'] into
xhtml, and leave everything else untouched.
4. Configure collection:
<plugins>
<parameter name="xslt" type="pipeline" value="static_or_whatever.xsl"/>
<extension type="html"/>
<plugin type="xmldoc" admin="true"></plugin>
<plugin type="navitree"></plugin>
</plugins>
5. Create resource from admin pages,
menu will list all configured doctypes.
====
--
qMax
--
bitflux-cms mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bitflux-cms