cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <>
Subject Re: Is there an "url wildcard" selector (equivalent)
Date Thu, 06 Mar 2008 01:54:23 GMT
Rainer Pruy pisze:
> Thanks,
> yes, I am aware of nesting.
> To get closer to my question, just assume (may not have been stated clearly by me with
initial post):
> - the condition "does not contain C" is not stated easily in terms of wildcard
>   (just consider: what is the "not" of pattern "**/special treatment_area/**"
>    and keep in mind, that I do not have control over the undelying namespace
>    as I then could move the normal processing to "**/normal/**" e.g.)

I'm still not sure if I get your requirements correctly but I think that you could use just
matchers to achieve "not" pattern functionality.

I presume you need something like that:
if (here some specific pattern) { .... } else { ... }

then you can use:
<map:match pattern="some specific pattern">

<map:match pattern="some general pattern like **">

The second one will match only if the first one doesn't.

> - the condition does only affect generators (in my case usually aggregators),
>   the rest of the pipeline will be the same
>   Thus, using the "return" character of "serialize" would also require multiplying the
same pipeline

Solprovider suggested to use resources but I would go with several different internal pipelines
would work as generators. I mean you create one general pipeline containing set of components
to all flows and call specialized pipelines:
<map:match pattern="/*/**">
  <map:generate src="cocoon:/specialized/{1}/{2}"/> <!-- if you use Cocoon 2.2 I
suggest to use
servlet source instead -->

  [here goes the rest of the pipeline]

<map:match pattern="specialized/A/**">
  <map:generate .../>
  <map:serialize type="xml"/>

<map:match pattern="specialized/B/**">
  <map:generate .../>
  <map:serialize type="xml"/>

<map:match pattern="specialized/*/**">
<!-- called only if above does not match -->
  <map:generate .../>
  <map:serialize type="xml"/>

I hope that fits your use-case.

Best regards,
Grzegorz Kossakowski

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message