hi amelie (nice name ;-),
instead of passing the 'name' parameter as an attribute of <mytag:user> you
could use an element with the same name. the logicsheet-util logicsheet that
comes with cocoon has templates that you can call to get a parameter. it
checks for an attribute and an element with the name you specify.
example markup:
<mytag:user>
<name><xsp-request:get-parameter name="user"/></name>
</mytag:user>
and your modified logicsheet would look something like this:
...
<xsl:include href="logicsheet-util.xsl"/>
<xsl:param name="namespace-uri">http://your/namespace/uri</xsl:param> <!--
you know -->
<xsl:template match="mytag:[EMAIL PROTECTED] or name]">
<xsl:variable name="name">
<xsl:call-template name="get-string-parameter">
<xsl:with-param name="name">name</xsl:with-param>
<xsl:with-param name="required">true</xsl:with-param>
</xsl:call-template>
</xsl:variable>
...
</xsl:template>
...
and in your template you now accees the parameter via the variable.
> -----Urspr�ngliche Nachricht-----
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Auftrag von Amelie Cordier
> Gesendet: Sonntag, 2. M�rz 2003 14:27
> An: [EMAIL PROTECTED]
> Betreff: Generating dynamic attributes in xsp
>
>
> Hello,
>
> I have an xsp page and a logicsheet where I have defined my own tags.
>
> In my logicsheet I use thinks like that : <xsl:template
> match="mytag:[EMAIL PROTECTED]"> in order to perform specifics resquests on a
> database.
>
> This work perfectly if I use a tag like <mytag:user name="foo"/>
> in the xsp.
>
> But my problem is that I want the attribute "name" to be dynamically
> generated by using resquest-parameter.
>
> I mean, in my xsp page, I don't want to write "foo" but something like
> <xsp-request:get-parameter name="user"/> and I really don't know how to do
> it.
>
> Thanks for help
>
> Amelie.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]