You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jan Wielgus <li...@o2.pl> on 2003/11/02 20:19:48 UTC
-problem (?)
Hello,
I have a problem when using the <xsl:when> tag.
Here the code sniplet:
<xsl:template match="category-delete">
<xsp:logic>
<xsl:choose>
<xsl:when test="dokument-name = 'keine'">
<center>
<xsl:apply-templates select="deleted" />
</center>
</xsl:when>
<xsl:otherwise>
<center>
<p>Die Kategorie enthaelt Dokumente und kann nicht
geloescht werden.</p>
<a href="main.xsp?site=kategorien.xsp">Zurueck</a>
</center>
</xsl:otherwise>
</xsl:choose>
</xsp:logic>
</xsl:template>
<xsl:template match="deleted">
<esql:connection>
<esql:pool>letterman</esql:pool>
<esql:execute-query>
<esql:query>delete * from kategorien where benutzer_id=
<xsp-session:get-attribute name="bid" />
and id=
<xsp-request:get-parameter name="katid" />
</esql:query>
</esql:execute-query>
</esql:connection>
<p>Die Kategorie wurde geloescht</p>
<a href="main.xsp?site=kategorien.xsp">Zurueck</a>
</xsl:template>
The problem is, that the sql-query from the template "deleted" is
not executed as if the esql-tags were ignored - in the output i see
only "letterman select * from...". Is it so, because I'm using it
quasi within the <xsl:when>-block? If yes, what were the solution?
My goal is to delete a selected row from db-table when the condition
is fulfilled (also when the attribute "dokument-name" equals "keine").
Any help will be appreciated.
Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: -problem (?)
Posted by Joerg Heinicke <jh...@virbus.de>.
Are you mixing XSLT and XSP?
Joerg
On 02.11.2003 20:19, Jan Wielgus wrote:
> Hello,
>
> I have a problem when using the <xsl:when> tag.
>
> Here the code sniplet:
>
> <xsl:template match="category-delete">
> <xsp:logic>
> <xsl:choose>
> <xsl:when test="dokument-name = 'keine'">
> <center>
> <xsl:apply-templates select="deleted" />
> </center>
> </xsl:when>
> <xsl:otherwise>
> <center>
> <p>Die Kategorie enthaelt Dokumente und kann nicht
> geloescht werden.</p>
> <a href="main.xsp?site=kategorien.xsp">Zurueck</a>
> </center>
> </xsl:otherwise>
> </xsl:choose>
> </xsp:logic>
> </xsl:template>
> <xsl:template match="deleted">
> <esql:connection>
> <esql:pool>letterman</esql:pool>
> <esql:execute-query>
> <esql:query>delete * from kategorien where benutzer_id=
> <xsp-session:get-attribute name="bid" />
> and id=
> <xsp-request:get-parameter name="katid" />
> </esql:query>
> </esql:execute-query>
> </esql:connection>
> <p>Die Kategorie wurde geloescht</p>
> <a href="main.xsp?site=kategorien.xsp">Zurueck</a>
> </xsl:template>
>
> The problem is, that the sql-query from the template "deleted" is
> not executed as if the esql-tags were ignored - in the output i see
> only "letterman select * from...". Is it so, because I'm using it
> quasi within the <xsl:when>-block? If yes, what were the solution?
> My goal is to delete a selected row from db-table when the condition
> is fulfilled (also when the attribute "dokument-name" equals "keine").
>
> Any help will be appreciated.
>
> Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org