You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by MORĂVEK Peter <mo...@pobox.sk> on 2001/01/12 19:21:08 UTC
response taglib bug
Hello,
I'm using Cocoon 1.8 and I have found this bug:
if I write this to my xsp page:
<response:set-header name="Cache-Control" value="no-cache"/>
it is converted to this java source code:
response.setIntHeader(
String.valueOf("Cache-Control"),
Integer.parseInt(
String.valueOf("no-cache")
)
);
The solution (I think) is to remove this template from response.xsl:
<xsl:template match="response:add-header">
<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:logic>
response.addIntHeader(
String.valueOf(<xsl:copy-of select="$name"/>),
Integer.parseInt(
String.valueOf(<xsl:copy-of select="$value"/>)
)
);
</xsp:logic>
</xsl:template>
Please do the change in cvs...
Thanks in advance
Peter