Hallo,
I hope that someone can help me. I am having a small problem with xsp
because I would like to integrate some internationalization into my project.
I would like to read out the value of the LOCALE variable from an xsp
document but it doesn't work.
I tried out the following 3 possibilities
......
<xsp:include>
org.apache.cocoon.acting.*
</xsp:include>
</xsp:structure>
<xsp:logic>
LocaleAction ll = new LocaleAction();
String s = LocaleAction.LOCALE_ATTR;
//there is no function like ll.getLocale_Attr;
</xsp:logic>
<lang>request.getAttribute("locale")</lang>
<lang1><xsp-request:get-parameter name="locale" default=""/>;
Each of this upper possibilities gives an empty string.
Generally I think that the internationalization is working because it is
possible to read the locale value from my xsl doc with
<xsl:value-of select="$locale"/>
but I am not able to get this value a step further from the xsp site
which was generated and not transformed (s. sitemap).
My sitemap contains the needed action for internationalization. Here is
the important part of it.
For testing I give my generator the locale variable (see pipeline), but
there is no reaction
.......
<map:action name="locale"
logger="sitemap.action.locale"
src="org.apache.cocoon.acting.LocaleAction">
<store-in-session>true</store-in-session>
<create-session>true</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:components>
<map:pipelines>
<map:pipeline>
<map:act type="locale">
<map:match pattern="*.html">
<map:generate src="xsp/{1}.xsp" type="serverpages">
<map:parameter name="locale" value="{../locale}"/>
</map:generate>
<map:transform src="xsl/{1}_template.xsl" type="xslt">
<map:parameter name="locale" value="{../locale}"/>
</map:transform>
<map:transform type="session"/>
<map:transform type="jx" />
<map:serialize type="html"/>
</map:match>
I hope that somebody can help me.
Thank you in advance
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]