cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastien Arbogast <sebastien.arbog...@gmail.com>
Subject Something I don't understand in i18n sample
Date Wed, 13 Apr 2005 03:02:25 GMT
Hi,

In the i18n sample sitemap there is a resource declaration like this :

<map:resource name="composite">
      <map:aggregate element="root">
        <map:part src="cocoon:/menu/{../0}"/>
        <map:part src="cocoon:/content/{../0}" label="content"/>
      </map:aggregate>
      <map:transform src="simple2page.xsl">
        <map:parameter name="page" value="{../0}"/>
        <map:parameter name="locale" value="{../../locale}"/>
      </map:transform>
      <map:transform
src="context://samples/common/style/xsl/html/complex-page2html.xsl">
        <map:parameter name="contextPath" value="{request:contextPath}"/>
      </map:transform>
      <map:serialize type="html"/>
    </map:resource>

I don't understand the references to {../0}. What does this mean exactly ?
I don't understand the notation {../../locale} for the locale
parameter either. BTW there is a similar think in a pattern matching
further in the file :

<map:match pattern="content/*.xml">
          <map:generate src="{1}.xml"/>
          <map:transform type="i18n">
            <map:parameter name="locale" value="{../locale}"/>
          </map:transform>
          <map:serialize/>
        </map:match>

And I don't understand why the value for the locale parameter is
{../locale} and not {locale} as it's said in javadoc that LocaleAction
provides with a {locale} variable.
Any ideas of explanation ?

Thank you in advance.

-- 
Sebastien ARBOGAST

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


Mime
View raw message