Andreas Hartmann wrote: 
> 
> Hi Cocoon developers,
> 
> I just updated to 2.2-dev and got the following error:
> 
> The current URI
> (lenya-document-view/authoring/homepage/index/index_en.xml) 
> doesn't start with given prefix (lenya-document-/)
> 
> 
> Pipeline:
> 
> <map:match pattern="lenya-document-*/*/*/**.xml">
>    <map:mount uri-prefix="lenya-document-"
>               src="{fallback:doctypes.xmap}"
>               .../>
> </map:match>
> 
> 
> The trace led me to EnvironmentHelper.changeContext():
> 
> // check for a slash at the beginning to avoid problems with 
> subsitemaps if ( buffer.charAt(buffer.length()-1) != '/') {
>      buffer.append('/');
>      this.lastPrefix = this.lastPrefix + '/'; }
> 
> I guess this is the code which adds the trailing slash (?)
> 
Yes.

> 
> Is it generally not possible to use a URI prefix for mounting 
> which does not end with a slash?
> 
No, it is not possible. The prefix has to end with a slash. If the
user forgets the slash, Cocoon adds it. This is documented here:

http://cocoon.apache.org/2.1/userdocs/concepts/sitemap.html#Mounting+sitemap
s

Carsten

Reply via email to