cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <>
Subject [C2]: Understanding mount
Date Thu, 22 Mar 2001 08:17:19 GMT

I am currently playing a little bit with mounting subsitemaps.
After a while I got it working now, but I am still wondering
what the exact purpose of the attributes uri-prefix and src is.

I used the following mount-example from the sitemap draft:

	<map:match pattern="dist/*"> 
    		<map:mount uri-prefix="dist/" src="dist/{1}"/> 

This generates the following source:

      return sitemapManager.invoke (environment,
                         substitute(listOfLists, "dist/"),
                         substitute(listOfLists, "dist/{1}"), true);

The third argument ("substitute(listOfLists, "dist/{1}")") is the 
source argument for the sitemap handler to load the new sitemap. 
So if I try to load the resource "dist/hello" the sitemap 
"dist/hello/sitemap.xmap" is tried to loaded. When I try to load 
"dist/welcome" the sitemap "dist/welcome/sitemap.xmap" is tried 
to loaded. And so on.

So I assume from this, that the "src" attribute indicates the location of the subsitemap.
This would lead to:

	<map:match pattern="dist/*"> 
    		<map:mount uri-prefix="dist/" src="dist/subsitemap.xmap"/> 

The "uri-prefix" seems to be the part which has to be removed from the uri,
this means sending the request "dist/welcome" will remove "dist/" from the
uri and only "welcome" is passed to the subsitemap. 
So I could use
			<map:match pattern="hallo">
				<map:generate src="test.xml"/>
				<map:serialize type="xml"/>
in the "dist/subsitemap.xmap" to match the request.

This example above works fine. Am I using the attributes correcly?


Open Source Group                        sunShine - b:Integrated
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn                          mailto: 

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

View raw message