You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Amelie Cordier <ac...@insa-rouen.fr> on 2003/03/10 09:12:31 UTC

Re: Generating dynamic attributes in xsp [OK]

>> Amelie Cordier wrote:
>>> Hi again.
>>>
>>> To sum up,  I'm trying to use request parameters in a logicsheet that
>>> I've made on my own.
>>>
>>> According to Marco's suggestions (thanks a lot Marco!), I've tried
>>> this :
>>>
>>> In the .xsp :
>>>
>>> <mytag:year>
>>> <year><xsp-request:get-parameter name="yearparam"/></year>
>>> </mytag:year>
>>>
>>> In the logicsheet :
>>>
>>> <xsl:template match="mytag:year[year or @year]">
>>>   <xsl:variable name="mavar">
>>>         <xsl:call-template name="get-string-parameter">
>>>              <xsl:with-param name="name">year</xsl:with-param>
>>>         </xsl:call-template>
>>>   </xsl:variable>
>>> ...
>>> </xsl:template>
>>>
>>>
>>> My problem is the following : as soon as I use my logicsheet tags,
>>> the value of <xsp-request:get-parameter name="year"> is lost.
>>>
>>> -----------------------
>>> Example :
>>>
>>>  <xsp-request:get-parameter name="year"/> => returns the value of the
>>> parameter year
>>>
>>>  <mytag:year>
>>>    <year><xsp-request:get-parameter name="year"/> </year>
>>>  </mytag:year>
>>>
>>>  => returns nothing !!! or better, something like that :
>>>  (XSPRequestHelper.getParameter(objectModel, "year", null, null,
>>> null))
>>> -----------------------
>>>
>>> Is there something to do in the sitemap level?
>>> Just to know : is there anybody who tried this once? Am I trying to
>>> do something impossible?
>>
>> Try to use "get-parameter" instead of "get-string-parameter". That
>> should return the node as well. But you need to insert the variable
>> with copy-of, not value-of and in a place where it can safely expand
>> to a <xsp:expr/>.
>>
>> HTH
>>
>> 	Chris.

Ok, now it works perfectly with get-nested-content instead of get-parameter.

I found this in a quite old mail in this mailing list.

Thanks a lot to everybody

Best regards

Am...



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org