doctypes - rendering pipeline - considerations

qMax <[email protected]>
Newsgroups gmane.comp.cms.bitflux.general
Message-ID <[email protected]>
Re.

While working on doctypes i considered it's a Good Thing to:
- keep themes off the details of arbitrary doctype format.
(to avoid (re)designing stylesheets for each added doctype)
- keep doctype-specific formatting independant of themes and bxcms stuff
(to reuse stylesheets, or use native xslt like NormanWalsh docbook)

The best way to achieve this is two stage processing:
 1: native xml -> plain xhtml (doctype specific)
 2: xhtml -> styled xhtml/page (theme and page layout)

The question is where to perform 1 stage.
Ideally, at stage of styling (applying pipeline transform src="{xslt}"),
the content of /bx/plugins/plugin[@name='doctype'] should already be
xhtml, so that themes are completely independant from content.
/* if required to use doctype-specific styling, 1stage could live hints like @class
attributes, which is easily to transform in theme and to understand by
webdesigners */

But as i figured out, output of plugin_foo->getContentById() is not
goes in pipelines, but inserted in /bx/ stuff in collection->getContentById(),
callen from within bxcmsGenerator, which in turn, calls plugin_foo->getContent()

Thus i see 3 ways to achieve the goal:

1. use doctype specific xslt-wrapper in place of {xslt}
(as you proposed, patching bxcms action)
Such stylesheet should overload <xsl:template name="content"/>
and transform content of /bx/plugins/plugin[@name='xmldoc'] into xhtml,
using native stylesheets.
This avoids using styling of xhtml content itself (e.g. replacing <hr/>
with images) w/out hairy stuff with exslt,
and requires yet additional parameter to point doctype native xslt styles.
Somewhat ugly way.

2. transform plugin output into xhtml before it get into pipeline.
This transform should be performed in plugin_foo->getContentById()
using xsltransformer with doctype specific stylesheet.
Ever better is to use sitemap pipeline for more tweakfullness,
but i dunno if it is possible and clean to call it from php
w/out creating yet another popoon instance.

3. put custom transform in popoon pipelines
in standard pipeline before "constant(BX_THEMES_DIR)/{config://theme}/{xslt}"
Or, i can force to use custom pipeline, with help of getPipelineById()
and insert my transform before standartOutput transformations.
This seems the best way, since themes stuff could not care of doctypes at all
(just to take plugin[@name='xmldoc'] content in addition to [@name='xhtml'])
And it allows additional freedom to tweak in this pipeline, w/out coding php.

Are there additional considerations about this ?
Or maybe i miss something behind this stuff ?

-- 
 qMax

-- 
bitflux-cms mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bitflux-cms
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.