cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kalén <>
Subject [newbie] UrlExistsSelector
Date Fri, 10 Oct 2003 10:06:18 GMT
Greetings developers,

  as a newbie to the wonderful world of Cocoon sitemaps I was struggling 
with the problem of using a selector to determine if an external HTTP 
URL was available.

* Problem description:

A pipeline matcher with the following steps is triggered:
1. XSP generation
2. cinclude transformation
3. XSLT transformation
4. HTML serialization

The cinclude in step 2 triggers another cocoon pipeline. XSP snippet:
<ci:include src="cocoon:/(name of pipeline #2)" 

Pipeline #2:
1. (what I wanted) map:select and generation based on status of external 
2. XSLT transformation
3. XML serialization

* My soloution:

I was first trying the map:select with the 
org.apache.cocoon.selection.ResourceExistsSelector until I found out 
that this was only for content within the current servlet context.

I then wrote the attached (trivial) UrlExistsSelector and used this one 
for step 1 in pipeline #2.

This works, but might have som implications in security/performance (no 
timeout handling) etc. etc. that I just don't see because I'm new to Cocoon.

Any comments? Other soloutions?

Martin Kalén
Curalia AB              Web:
Orrspelsvägen 2B        Mail:
SE-182 79  Stocksund    Tel:  +46-8-410 064 40

View raw message