cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <pati_giac...@yahoo.com>
Subject Re: C2: Bug in sitemap generation for map:mount
Date Thu, 12 Oct 2000 12:19:29 GMT

--- Carsten Ziegeler <cziegeler@sundn.de> wrote:
> 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.

Thanks for pointing me to it. Will correct it this evening (uh, my list
of this evening is getting bigger and bigger :)

> Perhaps changing the generation according to other templates to the
> following might solve the problem:

This I think is very hard to do (but am I'pen to any suggestions how
this can be done). This is why I usually use a
"if(true)listOfLists.remove(list);" to prevent the compiler from
issuing an error.

Giacomo

=====
--
PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1 856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1 856 2201
Hintereichenstrasse 7                     Mailto:Giacomo.Pati@pwr.ch
CH-8166 Niederweningen                    Web:   http://www.pwr.ch

__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

Mime
View raw message