cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yeb Havinga <yeb.havi...@ddnh.nl>
Subject Re: accessing parameter values
Date Tue, 22 Aug 2000 15:38:40 GMT
Hello

I was not aware of a request tag library, so when I needed parameter
values in my xsl I just used:

<xsl:template match="showparam">
<xsp:expr>request.getParameter("<xsl:value-of
select="@name"/>")</xsp:expr>    </xsl:template>

So what happens when you try:

<xsl:attribute name="someatt">
<xsp:expr>request.getParameter("parametername")</xsp:expr>
</xsl:attribute>

Obviously, if a request library exists, this is a hint in the wrong
direction.

-- Yeb

Mac Schwarz wrote:
> 
> Hi,
> 
> I'm sticking to a problem for two weeks now. I just can't figure out how
> to use the parameter values of a form in a conditional expression or an
> attribut of an tag.
> 
> I'm getting the parameter value with <request:get-parameter-values
> name="parametername"/>. But I can' assign as an attribute or use it in a
> <xsl:if expression.
> 
> <xsl:attribute name="someattribute"><request:get-parameter-values
> name="parametername"/></xsl:attribute>
> 
> won't work.
> 
> <xsl:if test="<request:get-parameter-values name="parametername"/> =
> 'somevalue'">
> 
> is obviously completely wrong.
> 
> But
> <xsl:variable name="myvalue"><request:get-parameter-values
> name="parametername"/><xsl:variable>
> <xsl:attribute name="someattribute"><xsl:copy-of
> select="$myvalue"></xsl:attribute>
> or
> <xsl:if test="$myvalue = 'somevalue'>
> 
> won't work either.
> 
> So how can I get this parameter value to use it as an attribute or a
> testcondition?
> 
>         mac
> 
> --
> Mac Schwarz / AERIA Projekt / Inst. f. Klassische Archaeologie
> e-mail: mac@aeria.phil.uni-erlangen.de  / Tel.: 09131-85-24791
>  FAU Erlangen-Nuernberg   /   Kochstr.4   /   91054 Erlangen
>   <http://www.phil.uni-erlangen.de/~p1altar/aeriahome.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