I'm assuming this must be a logicsheet, because you can't run ESQL code
outside XSP.  So, what does your XSP code look like?

-Christopher



|---------+---------------------------->
|         |           Jan Wielgus      |
|         |           <[EMAIL PROTECTED]>   |
|         |                            |
|         |           11/02/2003 02:19 |
|         |           PM               |
|         |           Please respond to|
|         |           users            |
|         |                            |
|---------+---------------------------->
  
>--------------------------------------------------------------------------------------------------------------|
  |                                                                                    
                          |
  |       To:       [EMAIL PROTECTED]                                                  
                    |
  |       cc:                                                                          
                          |
  |       Subject:  <xsl-when>-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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to