cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <gree...@hotmail.com>
Subject Re: <xsp:expr> and layered taglibs
Date Thu, 16 Nov 2000 21:11:27 GMT
James Scott <jscott@hnt.com> wrote:
>I have a logicsheet (mine.xsl) that uses the sql logicsheet to perform a
>database query. I'm attempting to pass in an attribute value defined by an
><xsp:expr> tag but the value seems to get consumed somewhere.

No, the attribute doesn't get added until AFTER your taglib is called. 
Taglibs are called first. The xsp tags are themselves implemented by a 
taglib (mostly). Then the generated Java code runs. So xsp:attribute can't 
be used to provide an attribute to a taglib, because the attribute is only 
added at the Java stage, after all the taglibs have been applied.

>In mine.xsl, I define a tag as follows (I've marked the problematic line 
>with
>-->):
>
><xsl:template match="mine:do-query">
>   <sql:execute-query>
>     <sql:use-connection>foo</sql:use-connection>
>     <sql:doc-element>SQLRESULT</sql:doc-element>
>     <sql:column-format>
>       <sql:name>date</sql:name>
>       <sql:class>java.text.SimpleDateFormat</sql:class>
>       <sql:parameter><xsl:value-of select="@date-format"/></sql:parameter>
>     </sql:column-format>
>     <sql:query>
>	select *
>         from seminar
>--> 	where sem_id = <xsl:value-of select="@id"/>

just change that to select="id" and use an element instead of an attribute.




_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


Mime
View raw message