cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Getting i18n by action in an sitemap aggregation
Date Sat, 26 Jul 2003 19:26:39 GMT

This is how I've done things, maybe it'll help:

      <map:action name="locale"


      <map:act type="locale">
        <map:match pattern="index">
          <map:select type="browser">
            <map:when test="java">
              <map:aggregate element="aggregated">
                <!-- whatever -->
              <map:transform type="i18n">
                <map:parameter name="locale" value="{../locale}" />
              <map:transform src="xslt/browser/x-smiles/index.xslt">
                <map:parameter name="locale" value="{../locale}" />

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


> Hi,
> I have a pipelines which elements are all surrounded by an
> At the first step in the first matcher I'm aggregating two xml
> <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"
>                     </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:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message