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]

Reply via email to