cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dr. Hans M. Rupp" <hans-michael.r...@danet.de>
Subject Re: i18n transformer problem II
Date Fri, 23 Aug 2002 15:44:56 GMT
<map:resources>
  <map:resource name="viewpage">
   <map:act type="PathConfiguratorAction">
    <map:parameter name="nextxsp" value="{nextxsp}"/>
    <map:parameter name="nextxsl" value="{nextxsl}"/>
    <map:generate type="serverpages"
src="../../../common/weather/xsp/{nextxsp}.xsp"/>
    <map:transform src="../xsl/{nextxsl}.xsl">
     <map:parameter name="imagepath" value="{imagepath}"/>
     <map:parameter name="wwwpath" value="{wwwpath}"/>
    </map:transform>
    <map:transform type="i18n"/>
    <map:serialize type="html">
     <encoding>UTF-8</encoding>
    </map:serialize>
   </map:act>
  </map:resource>


<map:pipeline>
   <map:match pattern="wa2*">
    <map:act type="SessionValidatorAction"/>
    <!--<map:act type="PathConfiguratorAction">-->
    <map:act type="CommandAction">
     <map:parameter name="classname"
value="net.starmobility.mcp.command.weather.GetCurrentCityWeatherDATCHCommand"/>

    </map:act>
    <map:call resource="viewpage">
     <map:parameter name="nextxsl" value="wa2"/>
     <map:parameter name="nextxsp" value="CurrentCityWeather"/>
    </map:call>
   </map:match>
   <map:handle-errors>
    <map:transform src="error2html.xsl"/>
    <map:serialize status-code="500"/>
   </map:handle-errors>
  </map:pipeline>

And the i18n tags in the main stylesheet are all processed correctly, only
those coming from the included stylesheet with the named template are
ignored.

Many thanks,

Hans

Piroumian Konstantin wrote:

> > From: Dr. Hans M. Rupp [mailto:hans-michael.rupp@danet.de]
> >
> > Hallo!
> >
> > When have the following problem.
> > i18n tags which are included in xsl templates which produce the main
> > body of the html output are processed correctly.
> > However at some times I want to call a named template which is
> > physically located in a different xsl file to produce the
> > right i18n tag
> > like:
> >
> > <xsl:template name="MapWeatherCriterionEnum">
> >  <xsl:param name="constant" />
> >  <xsl:variable name="enumType" select="'WeatherCriterionEnum'" />
> >  <xsl:choose>
> >   <xsl:when test="$constant='WEATHER'"><i18n:text
> > i18n:key="WeatherCriterionEnum.WEATHER">WEATHER</i18n:text></xsl:when>
> >   <xsl:when test="$constant='TEMPERATURE_CURRENT'"><i18n:text
> > i18n:key="WeatherCriterionEnum.TEMPERATURE_CURRENT">TEMPERATUR
> > E_CURRENT</i18n:text></xsl:when>
> >
> > .......
> >
> > The i18n tags produced by named templates are never touched
> > by the i18n
> > Transformer!
>
> This can mean only that i18n transformer is not present in your pipeline.
> You should run i18n transformer after the XSLT transformation. Check your
> sitemap.
>
> Konstantin
>
> >
> > The output before i18n:
> >
> > <td class="Text"><i18n:text
> > i18n:key="WeatherCriterionEnum.TEMPERATURE_CURRENT">TEMPERATUR
> > E_CURRENT</i18n:text></td>
> >
> > output after i18n:
> >
> > <td class="Text">
> > <i18n:text
> > i18n:key="WeatherCriterionEnum.TEMPERATURE_CURRENT">TEMPERATUR
> > E_CURRENT</i18n:text>
> >
> > </td>
> >
> > We use Cocoon 2.03
> >
> > I would be gratefull for any ideas.
> >
> > Many thanks,
> >
> > Hans
> >
> >
> > --------------------------------------------
> > Dr. Hans M. Rupp
> > danet Internet Solutions GmbH
> > Waldburgstr. 17-19
> > 70563 Stuttgart
> > Germany
> >
> > Fon +49 711 133 53 50
> > Fax +49 711 133 53 53
> >
> > ------------------------------------------
> >
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question  has not already been answered in the
> > FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> >
> > To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> > For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
> >
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>

--
--------------------------------------------
Dr. Hans M. Rupp
danet Internet Solutions GmbH
Waldburgstr. 17-19
70563 Stuttgart
Germany

Fon +49 711 133 53 50
Fax +49 711 133 53 53

------------------------------------------



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.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