cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Painter-Wakefield <paint...@mc.duke.edu>
Subject Re: <xsl-when>-problem (?)
Date Mon, 03 Nov 2003 14:16:06 GMT




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      |
|         |           <list40@o2.pl>   |
|         |                            |
|         |           11/02/2003 02:19 |
|         |           PM               |
|         |           Please respond to|
|         |           users            |
|         |                            |
|---------+---------------------------->
  >--------------------------------------------------------------------------------------------------------------|
  |                                                                                      
                       |
  |       To:       users@cocoon.apache.org                                              
                       |
  |       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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message