On Monday, Dec 2, 2002, at 19:15 Europe/London, Conal Tuohy wrote:

Hi Peter

Peter wrote:
Hmm, I guess I've been exploring this long enough that I
thought it
was somewhat intuitively obvious, sorry...  (Someone has
also remarked
that this sounded somewhat like a capability that was in C1.)

Stefano(?) wrote:
yeah, you could implement what you want using dynamically added PI
(processing instructions) for the C1 reactor, but it would
end up being
very messy anyway.
When it was described to me it didn't really sound like what
I wanted...
I think Stefano is on the right track with this dynamic PI pattern ... but
since I never used C1 I've only got a theoretical notion of the C1
"reactor". But I've used a similar pattern in C2, I think. You can use a
pipeline (or a small number of pipelines) containing an XSLT transformer
followed by an include transformer. The XSLT transform can make your
decision, and insert elements like this:
<xi:include href="cocoon://{$result-of-some-complex-functional-logic}"/>
Then the include transformer resolves the url and recursively calls the
sitemap. The URL could resolve to a database query result, or an error 500
page. This gives you quite a functional "style" where you need it. One issue
I'm aware of here is the "cacheability" of the include transformer, but this
may not be an issue which your search results anyway.
I had to stop working like this, when I found it made my site 10 times slower, though Vadim kindly pointed out to me that this was because not all of the caching code in Cocoon 2.1-dev is complete.

Hopefully when it is, we can take advantage of this way of working ..... it is very powerful!

regards Jeremy


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to