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: Dynamic parameter for logicsheet
Date Mon, 10 Nov 2003 16:02:58 GMT




Remember, your logicsheet is an xslt stylesheet transforming one XSP file
into another.  When you do <xsl:value-of ...> you are getting the text
value of the node, which in this case is "sectionId".  What you should be
doing in your logicsheet is <xsl:copy-of select="section:id"/>.

-Christopher



|---------+---------------------------->
|         |           Otmar Vobejda    |
|         |           <otmar@hcwerk.cz>|
|         |                            |
|         |           11/09/2003 08:11 |
|         |           PM               |
|         |           Please respond to|
|         |           users            |
|         |                            |
|---------+---------------------------->
  >--------------------------------------------------------------------------------------------------------------|
  |                                                                                      
                       |
  |       To:       users@cocoon.apache.org                                              
                       |
  |       cc:                                                                            
                       |
  |       Subject:  Dynamic parameter for logicsheet                                     
                       |
  >--------------------------------------------------------------------------------------------------------------|




Hi people, I don't understand one thing:

in XSP file I have this piece of code:

<xsp:logic>
    String sectionId = 5;

    <section:edit>
        <section:id><xsp:expr>sectionId</xsp:expr></section:id>
    </section:edit>

</xsp:logic>

this "calls" template "section:edit" in logicsheet, which is defined:

    <xsl:template match="section:edit">
...
                    <esql:query>select * from section where
id=<xsl:value-of select="section:id"/></esql:query>
...
    </xsl:template>

It should send to SQL server query 'select * from section where id=5',
But to ESQL it sends query 'select * from section where id=sectionId'.

WHY??? And why to do it correctly?

Thanx!

osup


---------------------------------------------------------------------
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