cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@sundn.de>
Subject C2: Bug in sitemap generation for map:mount
Date Thu, 12 Oct 2000 11:03:10 GMT
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 
================================================================


Mime
View raw message