cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremy Aston" <>
Subject Transformed Includes - Best practice?
Date Fri, 09 Nov 2001 11:22:00 GMT
Sorry about the cross post - I'm not sure which list this is most applicable
to as it could involve enhancements to C2.

I am used to using XML for providing application level config information.
What I am wondering is what the concensus is for best practice when handling
these with C2 - particuarly when wanted to transform these files to extra
key data.

For example:

Take a basic content management app.  Users enter data into forms which
store this in a db.  There are then multiple ways of rendering the data.  To
save hassle with a db I use an XML file to provide the config for each of
the renderers.

I then want to do something like provide a list of renderers to the user so
they can pick what one they want to render their data.  I have an XML file
that has the page data in, which I need to merge the a list of the renderers
(extracted from the config file) into.  I could do an XInclude but that
would give me at best specfic config elements in a form that does not match
the dtd/schema of the page.  This could be resolved by multi step
transforming of this in the pipeline.  Sounds OK to me but....

Do I not *really* want to transform the config file and include the results
of that transformation?  Even more I might really want to have multiple
transformations going on - e.g. on to build an optomised tree and then
another to transform to my page dtd/schema.

I can write a logicsheet that does this.  Perhaps make it generic as well.

To me it is almost like an extended XInclude where you can apply
transformations before the include.   Another thought is that the sitemap
provides the basic functionality for this (multi part transformations,
xinclude etc) but only (I think) in request/response scenario, not where
this type of function is called within page logic.  Tis a similar thing to
included xsps inside one another...

The whole point of this tome is:
- am I missing something - are there other (better) ways of doing this?
- if not is my suggestion OK?
- I can write and submit a solution but I just want to make sure it solves
the problem in the best way possible.



Do You Yahoo!?
Get your free address at

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message