You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Mirek Rewak <ca...@daminet.pl> on 2003/04/10 15:46:11 UTC

InputModule and sitemap parameter

Hello,
How can I pass sitemap variable to a module? I need something like this:
<map:match pattern="button/*">
 <map:generate type="ImageButtonGenerator>
   <map:parameter name="button-text" value="{button-map:{1}}"/>
 </map:generate>
 ....
</map:match>

And it doesn't work. If it can't be possible with current (I'm using 2.1 
dev) functionality, how can I solve it?

Thanks in advance.

Mirek Rewak


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


Re[2]: InputModule and sitemap parameter

Posted by Mirek Rewak <ca...@daminet.pl>.
Hello,

CH> If you need to pass a value other than a sitemap variable to the
CH> module (i.e. another module exists that can return this value) then
CH> writing a a custom "meta" module is probably the way to go. The
CH> SimpleMappingMetaModule might be a starting point.
I'll look on this.

CH> However, if you need this for I18N, please have a look at the
CH> I18NTransformer.
Yes, I forgot about I18NTransformer it can make sense to use it my
situation.

Thanx.

-- 
Pozdrowienia,
 Mirek Rewak


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


Re: InputModule and sitemap parameter

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 10.Apr.2003 -- 03:46 PM, Mirek Rewak wrote:
> Hello,
> How can I pass sitemap variable to a module? I need something like this:
> <map:match pattern="button/*">
> <map:generate type="ImageButtonGenerator>
>   <map:parameter name="button-text" value="{button-map:{1}}"/>
> </map:generate>
> ....
> </map:match>
> 
> And it doesn't work. If it can't be possible with current (I'm using 2.1 
> dev) functionality, how can I solve it?

Everything between ":" and "}" is passed as is to the module, hence no
sitemap parameter substitution occurs.

If you need to pass a value other than a sitemap variable to the
module (i.e. another module exists that can return this value) then
writing a a custom "meta" module is probably the way to go. The
SimpleMappingMetaModule might be a starting point.

However, if you need this for I18N, please have a look at the
I18NTransformer.

	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

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