cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mario Muja" <>
Subject Re: how to implement a dynamic sitemap?
Date Thu, 25 Oct 2001 11:06:45 GMT
You can write your own actions, which return a value to the sitemap. This value can be used
within the sitemap to decide, which XSL to use. In C2 you do not have to change your XML files
to assign a stylesheet. This is handled dynamically by the stylesheet. From this point of
view, I would say that the C1 approach is more static than the C2 sitemap. To get data from
a database, I would use the ESQL logicsheet within an XSP.

Hint: I am not a C2 nor a Java expert. The above is, what I got from the documentation and
from my own first C2 samples.

Regards, Mario

  ----- Original Message ----- 
  From: Christer Lindh 
  Sent: Thursday, October 25, 2001 12:03 AM
  Subject: how to implement a dynamic sitemap?

  As far as I've understood C2, there is now a quite static sitemap which tells what request
gets what XSL. This is too static for my needs, I would like to do a bunch of calculations
and then decide on what XSL to use. Is there any way I can accomplish this with C2?

  I have my own producer today with Cocoon 1 which creates Documents from data in my database,
and these are then assigned an XSL depending on a bunch of parameters (from the database and
user environment as well), ie I add PI:s to the Document DOM dynamically.

  So - is it possible to use "classic" cocoon1.8 processing instructions with cocoon2, instead
of specifying processing stages in the sitemap?

  If not, can I do my own implement of the Sitemap interfaces and get C2 to use those instead?
 My classes would act just like a sitemap (as the interfaces are the same) but get it's daata
from database instead of a XML file in the filesystem.

View raw message