cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <h...@dvs1.informatik.tu-darmstadt.de>
Subject Re: Resources and parameter scopes
Date Fri, 01 Mar 2002 15:05:42 GMT
On 28.Feb.2002 -- 05:17 PM, Lai, Harry wrote:
> Hi all,
>  
> I've observed an odd behavior with resources and parameter scope, and I
> wanted to know if this is at least a consistent behavior.  Just FYI, I'm
> using Cocoon 2.0.1 (official release), Sun JDK 1.3.1, JBoss-2.4.1 (with
> Tomcat 3.2.3 embedded), on Win2K.
>  
> Anyway, it looks like if you use a parameter reference in a map:call's
> resource attribute, it gets resolved AFTER the call has pushed a new map
> (for the call itself) on to the end of the list.  For example, say you have
> the following resources:
>  
> <map:resource name="step1">
>     <map:call resource="step2">
>         <map:parameter name="foo" value="3"/>
>     </map:call>
> </map:resource>
>  
> <map:resource name="step2">
>     <map:call resource="step{../foo}"/>
> </map:resource>
>  
> Notice that step2 is basically a redirect to a resource named step3 (in this
> case).  However, notice that I have to use {../foo} instead of just {foo}.
> If you look at the sitemap_xmap.java file, you'll find that the code for
> resource_step2 adds the new map on before resolving the "step{../foo}"
> resource name.
>  
> Anyway, this is easy enough to work around (now that I know it works this
> way), but I wanted to make sure this is how resource calls are always
> resolved (or if this is considered a bug and is going to be changed later).
> Basically, I just want to know if I should expect my {../foo} to possibly
> break if I later upgrade to a new version of Cocoon or if I alter my
> sitemap.  =)  Thanks!

I'd consider it as a bug and will change that ASAP.

	Chris.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message