Hi
This is how I've done things, maybe it'll help:
<map:action name="locale"
src="org.apache.cocoon.acting.LocaleAction"
logger="sitemap.action.locale">
<store-in-session>false</store-in-session>
<create-session>false</create-session>
<store-in-request>true</store-in-request>
<store-in-cookie>false</store-in-cookie>
<locale-attribute>locale</locale-attribute>
<language-attribute>language</language-attribute>
<country-attribute>country</country-attribute>
<variant-attribute>variant</variant-attribute>
</map:action>
:
<map:act type="locale">
<map:match pattern="index">
<map:select type="browser">
<map:when test="java">
<map:aggregate element="aggregated">
<!-- whatever -->
</map:aggregate>
<map:transform type="i18n">
<map:parameter name="locale" value="{../locale}" />
</map:transform>
<map:transform src="xslt/browser/x-smiles/index.xslt">
<map:parameter name="locale" value="{../locale}" />
</map:transform>
In the Cocoon Developer's Handbook (p216) it documents how each
<map:match> and <map:act> tag generates a new Map object which
exists until the tag is closed. It's this persistence which
determines how many ../'s or not to prefix which is where I'm
assuming the problem lies.
Hope this helps
gef
> Hi,
> I have a pipelines which elements are all surrounded by an
"locale"-action".
> At the first step in the first matcher I'm aggregating two xml
files:
> <map:aggregate element="site">
> <map:part src="cocoon:/book/index.xml"/>
> <map:part src="cocoon:/body/index.xml"/>
> </map:aggregate>
>
> Now, I want to have access to locale to choose the language in
which the two
> pipelines result. I know that I somehow need to give the locale
as paramter
> (???????) but how? I tried {locale}, {../locale}, {/locale} but
nothing was
> successful... :(
> One of the matchers as example:
> <map:match pattern="body/index.xml">
> <map:generate src="cocoon:/index.xml"/>
> <map:transform src="style/blog2content.xsl">
> <map:parameter name="locale"
value="??????????"/>
> </map:transform>
> <map:serialize/>
> </map:match>
>
> Thanks in advance!!
> Mat
> P.S.: After the Aggregation, the i18n transformer is working
fine without
> any parameters...
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]