cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: Cookie TagLib?
Date Tue, 25 Jul 2000 19:29:15 GMT
On Tue, 25 Jul 2000, Kevin Sonney wrote:

> Gang -
> 
> Does anyone have any pointers or docs on using the XSP Cookie taglib? I've
> read the source, but that's not helping too much for waht I want to do. 
> 
> Here's what I'd *LIKE* to do :
> 
> <cookie:create name="User"><request:get-remote-user/></cookie:create>

i this you need to do this:

<cookie:create name="User">
 <value><request:get-remote-user/></value>
</cookie:create>

from the cookie logicsheet:

  <xsl:template match="cookie:create">
    <xsl:variable name="name">
      <xsl:call-template name="value-for-name"/>
    </xsl:variable>

    <xsl:variable name="value">
      <xsl:choose>
        <xsl:when test="@value">"<xsl:value-of
select="@value"/>"</xsl:when>
        <xsl:when test="value">
          <xsl:call-template name="get-nested-content">
            <xsl:with-param name="content" select="value"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:variable>

    <xsp:expr>
      new Cookie(
        String.valueOf(<xsl:copy-of select="$name"/>),
        String.valueOf(<xsl:copy-of select="$value"/>)
      )
    </xsp:expr>
  </xsl:template>

- donald


Mime
View raw message