cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amelie Cordier" <acord...@insa-rouen.fr>
Subject Re: Generating dynamic attributes in xsp [OK]
Date Mon, 10 Mar 2003 08:12:31 GMT
>> 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


Mime
View raw message