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 Wed, 26 Jul 2000 02:50:39 GMT
On Tue, 25 Jul 2000, Marcelo F. Ochoa 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>

actually, i think you'll need to do this:

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

that being said, i think the cookie logicsheet could really use some help
- it seems that many of the methods operate not on any particular input
cookie, but rather a specially named variable - 'cookie'. for instance:

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

    <xsp:logic>
      cookie.setComment(
        String.valueOf(
          <xsl:copy-of select="$purpose"/>
        )
      );
    </xsp:logic>
  </xsl:template>

Ricardo, could you perhaps explain your reasoning here? Maybe something
more subtle is going on, but I don't think so...

- donald


Mime
View raw message