cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <>
Subject Re: Values between Taglibs
Date Fri, 09 Feb 2001 18:59:46 GMT
On Fri, 9 Feb 2001, Andreas Neuenschwander wrote:

> Is it possible to transfer values between different taglibs?

yes. that is _key_. that's what makes logicsheets powerful.

> <esql:row-results>
>     <my_xmlns:id>
>         <esql:getString column="id"/>
>     </my_xmlns:id>
>     <my_xmlns:name>
>         <my_taglib:stringConversion>
>             <esql:getString column="firstname"/>
>         </my_taglib:stringConversion>
>     </my_xmlns:name>
> </esql:row-results>
> ...
> This won't work. Because the 'get-nested-content' template in the logicsheet
> traverses the xml-tree.
> This way I get the value from the <esql:getString column="firstname"/> tag.

i don't think you quite understand. your logicsheet should use the
get-nested-content method when getting its configuration parameters.
something like this:

<xsl:template match="my_xmlns:root">
  <xsl:variable name="id">
    <xsl:call-template name="get-nested-content">
      <xsl:with-param name="content" select="my_xmlns:id"/>

the id variable should now contain a java expression which will resolve to
the value you desire. note that if your configuration parameters are
composed of mixed static strings and string expressions, you'll want to
use get-nested-string instead.

> If I insert a value in the esql:getString tag i.e:
> <esql:getString column="firstname">value</esql:getString column="firstname">
> I receive the string 'value'.

that's nonsensical. esql:get-string is strictly a singleton element.

- donald

View raw message