Re: xml doctypes implemented

Christian Stocker <[email protected]> Fri, 27 Jan 2006 13:11:09 +0100
Newsgroups gmane.comp.cms.bitflux.general
Organization Bitflux GmbH
Message-ID <[email protected]>
Thanks for that, I will look into as soon as I find some time .) Looks
useful and interesting, for sure.

And I'll think about the "stylesheet" parameter, maybe we can make it
more general, as it is now, it's only useful for that xmldoc plugin, but
in general I have nothing against adding this

chregu

On 27.1.2006 12:26 Uhr, qMax wrote:
> 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.
> 
> ====

-- 
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 44 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71
http://www.bitflux.ch | [email protected] |  GPG 0x5CE1DECB
-- 
bitflux-cms mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bitflux-cms