cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Uli Mayring <>
Subject Re: extending ProducerFromFile functionality
Date Thu, 26 Oct 2000 19:31:08 GMT
On Thu, 26 Oct 2000, Chris Meyer wrote:

> The HARD part is the style sheet for this content -- to handle this 
> bit of 'content' one has to have a SINGLE style sheet that handles 
> TWO DIFFERENT web pages (one for the cart, one for the additional 
> information). Add additional conditions and that same style sheet 
> handles even more pages. It would be nice to have a single style 
> sheet (View) transforming each content sheet (Model), all dictated by 
> a (Controller). The missing piece right now is the controller...

Heh, I have a stylesheet that handles all pages of our entire web site.
Can't see what's wrong with that. Your point about the controller is
correct, but you're not going to solve it with a producer or any other
technique available in cocoon1 - you have to turn to cocoon2 and the

> We can certainly do without the controller by embedding some of the 
> controller logic into the content pages (see your example above) and 
> some into the style sheet transforming to HTML -- but this 
> decentralizes the controller and makes it hard to maintain...

Not necessarily. You centralize the logic in a taglib and the layout in a

> What I'm proposing is some way of putting the logic in the page above 
> BEFORE the production of the template XML file so that its easy to 
> have a one-to-one relationship between web pages and XML files.

The power of XML is that a single XML file can do the job of many HTML
files through parameterization :)

> Am I missing something here? My style sheets tend to be complicated 
> when I use constructs like the one in the XML code at the top of this 
> message. Does anyone else have the same issue?

We all have it, there are several techniques available in cocoon1 to solve
it. It takes some effort to get behind it, but it can be done. In our site
up to five XML/XSL/XSP files may join forces to produce a single HTML
page. For example:

XML --> xincludes another XML --> XSP --> reads or writes data with fp -->
SQL processor reads or writes from db --> XSL --> xsl:includes another
XSL, which xsl:includes yet another XSL --> produces PDF

It sounds complicated and took me many months to understand for a large 
site. But it is ultra-efficient to manage. Of course cocoon2 might be much
easier, but personally I predict the sitemap will become just as 
complicated for large sites. Managing a large site ain't easy no matter 
what tools you use :-)


Ulrich Mayring
DENIC eG, Softwareentwicklung

View raw message