You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Carsten Ziegeler <cz...@sundn.de> on 2000/10/12 13:03:10 UTC
C2: Bug in sitemap generation for map:mount
The generation of the java code for a sitemap map:mount produces for the following example of the sitemap draft:
<map:match pattern="dist/*">
<map:mount uri-prefix="dist/{1}" check-reload="false" src="./dist/{1}"/>
</map:match>
this java fragment:
if ((list = matcher_dist__ ("dist/*", objectModel)) != null) {
listOfLists.add (list);
String uri_prefix1 = substitute(listOfLists, "dist/{1}");
if (uri_prefix1.charAt(uri_prefix1.length() - 1) == '/') {
return sitemapManager.invoke (environment, uri_prefix1,
substitute(listOfLists, "./dist/{1}"), false);
} else {
return sitemapManager.invoke (environment, uri_prefix1 + "/",
substitute(listOfLists, "./dist/{1}"), false);
}
listOfLists.remove (list);
}
The last statement (listOfLists.remove(list)) is never reached and thus the compilation fails.
Perhaps changing the generation according to other templates to the following might solve the problem:
String uri_prefix1 = substitute(listOfLists, "dist/{1}");
if (uri_prefix1.charAt(uri_prefix1.length() - 1) == '/') {
if (true)
return sitemapManager.invoke (environment, uri_prefix1,
substitute(listOfLists, "./dist/{1}"), false);
} else {
if (true)
return sitemapManager.invoke (environment, uri_prefix1 + "/",
substitute(listOfLists, "./dist/{1}"), false);
}
Regards
Carsten Ziegeler
Open Source Group sunShine - Lighting up e:Business
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de mailto:cziegeler@sundn.de
================================================================