cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Wielgus <lis...@o2.pl>
Subject <xsl-when>-problem (?)
Date Sun, 02 Nov 2003 19:19:48 GMT
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


Mime
View raw message