I think I have finally cracked it ;o) I needed to surround the cocoon replace part with '(' ')' and the other area that gave me a problem was not escaping the '{' part of the regexp. The final map:mount I came up with was as follows:-
<map:match type="regexp" pattern="(.\{6}).+"> <map:mount uri-prefix="" src="xmap/{1}.xmap" check-reload="no"/> </map:match> Which was basically as Con suggested. Thanks again Con for the point in the right direction. This has saved me a very large headache when it comes to deploying the modules of my web application ;o) All I need to do now is standardise the request call's > -----Original Message----- > From: Rob Gregory [mailto:[EMAIL PROTECTED] > Sent: 08 May 2004 11:34 > To: [EMAIL PROTECTED] > Subject: RE: Sitemap Auto-Mount challenge > > > Thanks for the guidence Con ;o) > > I tried it and it doesn't seem to work so my next question > (as my regexp > skills are less than yours) is how does cocoon know which part of the > regexp to replace in the {1} part of the mount? > > Also is there anyway to debug the matching process i.e. see > what cocoon > is trying to mount after a request being parsed by the regexp? > > Cheers > > Rob > > > > -----Original Message----- > > From: Conal Tuohy [mailto:[EMAIL PROTECTED] > > Sent: 08 May 2004 7:45 > > To: [EMAIL PROTECTED] > > Subject: RE: Sitemap Auto-Mount challenge > > > > > > Hi Rob > > > > Your problem is simple, you'll be pleased to know. You should > > use a more > > powerful matcher to match your request URI. Check out the > > regexp matcher. My > > regexp skills are very poor, but I think you want something like: > > > > <map:match type="regexp" pattern=".{6}.+"> > > <map:mount uri-prefix="" src="xmap/{1}.xmap" > > check-reload="no"/> > > </map:match> > > > > The Regular Expression language is documented at: > > http://jakarta.apache.org/regexp/apidocs/org/apache/regexp/RE.html > > > > Good luck > > > > Con > > > > > > > -----Original Message----- > > > From: Rob Gregory [mailto:[EMAIL PROTECTED] > > > Sent: Friday, 7 May 2004 07:18 > > > To: [EMAIL PROTECTED] > > > Subject: Sitemap Auto-Mount challenge > > > > > > > > > Hi People > > > > > > I have a requirement to automount sub sitemaps but don't want > > > sub sites! > > > > > > > > > To explain a little I have a single application that is > growing very > > > large day by day and the sitemap has been divided into multiple > > > sub-sitemaps currently using the <map:mount> approach as > follows:- > > > > > > <!-- map an external sitemap for ROB100 --> > > > <map:match pattern="rob100**"> > > > <map:mount uri-prefix="" src="xmap/rob100.xmap" > > > check-reload="no"/> > > > </map:match> > > > > > > <!-- map an external sitemap for ROB300 --> > > > <map:match pattern="rob300**"> > > > <map:mount uri-prefix="" src="xmap/rob300.xmap" > > > check-reload="no"/> > > > </map:match> > > > > > > etc, etc... > > > > > > > > > While the files (xsp's, xslt, etc) all share a common directory > > > structure and are referenced from the sub-sitemaps. This is > > > working fine > > > but I would like to remove the requirement to keep > editing the main > > > sitemap to add these <map:mount>'s. I have investigated the > > automount > > > feature of Cocoon but this requires the files to be deployed > > > as separate > > > entities each with a sitemap.xmap which I can't do as the > > > application is > > > one main app with multiple modules. > > > > > > Is there anyway to direct all request to rob100.xsp, > > rob100_logon.xsp, > > > rob100_search.xsp etc to the rob100.xmap while directing > > all requests > > > for rob200.xsp, rob200_* to the rob200.xmap? > > > > > > I'm running Cocoon 2.1.3, Tomcat 5.0.18, JDK1.4 and would really > > > appreciate any guidence on this problem or any pointers > on how this > > > could possibly be achieved (i.e. using an xpath expression or > > > an action > > > etc) > > > > > > Thanks in advance for any input - hope I have explained the > > > problem ok? > > > > > > Kind Regards > > > Rob > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]