You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Martin Kalén <ma...@curalia.se> on 2003/10/10 12:06:18 UTC
[newbie] UrlExistsSelector
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)"
xmlns:ci="http://apache.org/cocoon/include/1.0"/>
Pipeline #2:
1. (what I wanted) map:select and generation based on status of external
HTTP URL
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?
TIA,
Martin
--
Martin Kalén
Curalia AB Web: http://www.curalia.se
Orrspelsvägen 2B Mail: info@curalia.se
SE-182 79 Stocksund Tel: +46-8-410 064 40
Re: [newbie] UrlExistsSelector
Posted by Martin Kalén <ma...@curalia.se>.
Greetings,
I was under the impression that the selectors included in the standard
Cocoon distro was somewhat dev-related, but after reading up a bit on
the lists I guess this is 100% users@cocoon material. Sorry for the
incorrect post, I'd be happy if someone could give me some feeback there
instead.
--
Martin Kalén
Curalia AB Web: http://www.curalia.se
Orrspelsvägen 2B Mail: info@curalia.se
SE-182 79 Stocksund Tel: +46-8-410 064 40