cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Milvich <>
Subject Accessing the language locale value from xsp
Date Sun, 12 Jun 2005 10:44:43 GMT
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

        LocaleAction ll = new LocaleAction();
        String s = LocaleAction.LOCALE_ATTR;
//there is no function like ll.getLocale_Attr;

<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"



      <map:act type="locale">

<map:match pattern="*.html">
            <map:generate src="xsp/{1}.xsp" type="serverpages">
                 <map:parameter name="locale" value="{../locale}"/>    
            <map:transform src="xsl/{1}_template.xsl" type="xslt">
                 <map:parameter name="locale" value="{../locale}"/>    
            <map:transform type="session"/>       
            <map:transform  type="jx" />
            <map:serialize type="html"/>

I hope that somebody can help me.

Thank you in advance


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

View raw message