cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <jheini...@virbus.de>
Subject Re: simple esql-xsl problem
Date Sun, 09 Nov 2003 23:02:20 GMT
On 09.11.2003 21:50, Ashish Kumar wrote:

> hi all,
>        i m generating pdf by querying database using esql. here for a
> particular value got from database table, i have to display some 
> particular information. the xsp code contains:
> -----------  
> <perosn>
> <esql:execute-query>
> <esql:query>select * from person</esql:query>
> <esql:results>
> <esql:row-results>
> 
> 
> <!--other codes-->
> 
> <para>
>   <esql:get-string column="branch"/>
> </para>
> 
> <!--other codes-->
> 
> </person>
> -----------
> 
> while the xsl-fo file contains:
> ------------
> 
> <xsl:template match="person">
> 
> <!--other codes-->
> 
>   <xsl:choose>
>    <xsl:when test="self::node()[para='CSE']">

Can be simplified to test="para = 'CSE'".

> 	<fo:block font-size="13pt" font-family="serif">Computer Science
> 	</fo:block>
>    </xsl:when>
>   </xsl:choose>
> 
> </xsl:template>
> ----------------
> 
> In other words, i have to simply display "Computer Science" when the
> value under 'para' node (queried from "branch" field in the database
> table) equals "CSE".
> 
> But the output displays nothing....
> This is a simple task, i suppose, & may be various methods to do this, but
> this one is not working.
> plz help me how can i do it.

Are you sure that the output from the database is as you expect it above 
in the stylesheet? Try to remove the xsl:choose/xsl:when and simply add

<fo:block><xsl:value-of select="para"/></fo:block>

Joerg



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


Mime
View raw message