On 19/06/2013 20:46, gelo1234 wrote:
Hi all,
I wonder if C3 still supports:
As you have already done, take [1] as general reference of what it is
possible in C3 sitemaps.
1. matchers in sitemap.xmap ?
e.g.
<map:matchers default="wildcard">
<map:matcher logger="sitemap.matcher.wildcard" name="wildcard"
src="org.apache.cocoon.matching.WildcardURIMatcher"/>
<map:matcher logger="sitemap.matcher.regexp" name="regexp"
src="org.apache.cocoon.matching.RegexpURIMatcher"/>
C3 is actually full of matchers: wildcard, equals, regexp, starts-with,
ends-with, contains
<map:match equals="...">
matches exactly its argument
<map:match pattern="...">
is working the "old" way
<map:match regexp="...">
provides full regexp support
...and so on
Moreover, you can chain matchers (see "named matcher" and "deep relative
matcher" samples from [1]).
2. selectors in sitemap.xmap ?
No.
e.g.
<map:selectors default="browser">
<map:selector logger="sitemap.selector.browser" name="browser"
src="org.apache.cocoon.selection.BrowserSelector">
3. Is it possible to define cutom matchers/selectors ? Any examples ?
Hum, nice question (only about matchers. of course); never tried, but I
don't think it would be easy. Basically, AFAIU the handling is delegated
to MatchNode [2] that does not seem to be managing any kind of
customization.
4. actions in sitemap.xmap ?
e.g.
<map:actions>
<map:action logger="sitemap.action.request"
name="request" src="org.apache.cocoon.acting.RequestParamAction"/>
No.
5. <map:mount uri-prefix="" src="..." check-reload="yes"/> ?
You should have already found the answer to this: basically, you need
more blocks.
I've got Cocoon site that hosts multiple www domains, all based on the
same sitemap.xmap with <map:mount uri-prefix="" src="domain_X"
check-reload="yes"/>
so the configuration is as follows:
<map:pipeline>
<map:select type="cutomDomainSelector">
<map:when test="domainA">
<map:mount uri-prefix="" src="./domaina"
check-reload="yes"/>
</map:when>
<map:when test="domainB">
<map:mount uri-prefix="" src="./domainb"
check-reload="yes"/>
</map:when>
</map:select>
</map:pipeline>
Is it still possible with C3 ? Or should I use some separate blocks
config ?
The problem with separate blocks config is that I want to use empty
URI (not different) for each site
So
site1: http://www.domainA.org/
site2: http://www.domainB.org/
NOT
http://www.some.org/domainA/
http://www.some.org/domainB/
under one C3 war (sitemap.xmap config).
I'd suggest to empower some reverse proxy in order to make things easier
here.
And I would like to have a common block accessible from each site.
This is what blocks are meant for, in terms of modularity.
HTH
Regards.
[1]
https://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/cocoon-sample/src/main/resources/COB-INF/sitemap.xmap
[2]
https://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/cocoon-sitemap/src/main/java/org/apache/cocoon/sitemap/node/MatchNode.java
--
Francesco Chicchiriccò
ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org