cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Per Kreipke" <...@onclave.com>
Subject RE: AW: assigning variable to select attribute
Date Wed, 25 Oct 2000 14:14:20 GMT
Couple of things:
- shouldn't <xsl:content> be <xsp:content>?
- I guess what you're trying to do is dynamically determine the domain child
to select.
  I'm not sure you can in one pass of the XSP file, but you could try the
following.

Use <xsp:attribute>.

I haven't done this myself, but I think what you might be looking for:

 <fp:write to="external-item">
   <xsp:attribute
name="select">domain[child::<xsp:expr>domainName</xsp:expr></xsp:attribute>
   <xsp:expr>act</xsp:expr>
 </fp:write>

> thanks for reply, but i didn't understand the answer. please read the
> below peace of source code in order to understand my problem. what may i
> assign in the select attribute instead of the variable domainName.
>
> <xsp:logic>
>   Enumeration    e = request.getParameterNames();
>
>    if ((e != null) &amp;&amp; (e.hasMoreElements())) {
>    <xsl:content>
>           <xsp:logic>
>            while (e.hasMoreElements())

>                String domainName = (String) e.nextElement();
>                String act = request.getParameter(domainName);
>
>                if(domainName.indexOf('.')!= -1 ){
>                   <item>
>                      <fp:write
> select="domain[child::name=domainName]/action" to="external-item">
>                      <xsp:expr>act</xsp:expr>
>                      </fp:write>
>                    </item>
>               }
>             }
>             </xsp:logic>
>             </xsl:content>
>     }
> </xsp:logic>


Mime
View raw message