You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Gil Winkelman <gi...@excite.com> on 2001/01/29 16:25:08 UTC

FOP, javabean, db query not working


Hello All,

I appreciate your patience with a semi-newbie. I've been having a problem
getting FOP to work with an XML page that performs an eSQL query. (This is a
repeat question but I thought I'd ask again and post to both groups because
I still not received a response.) 

Here's the problem:

My XSP uses a bean to create a query from commandline arguments. I use esql
to perform the query and retrieve the data. If I use an html based XSL page
everything works fine so I DO NOT believe this is an esql problem. If I use
the same page with a fo-based XSL page, my bean's function is called a
second time and because there is no data the second time I get a blank page.
If I copy and paste the same query directly in my page I do not have the
problem and the PDF display in the browser just fine. 

The only thing I can think of is that I have something in my fop file that
makes an additional query back to the original page for some reason. I
thought that it would only read everything from the XML page. 

THIS IS NOT AN IE PROBLEM!!! It displays just fine if I do not use my java
bean to build the query! I really want to keep the bean because there is a
lot of reusable logic within that bean that I would rather not have to
recreate in another form!

Any ideas of either how to fix or work around this? Any advice would be
greatly appreciated!

Thanks for any help.

Gil

Here's the snippets.

Query.xml
<xsp:logic>
		labdip.CreateQueryBean queryBean = new labdip.CreateQueryBean();
</xsp:logic>
...
..
..
   <esql:query>
    
   <xsp:expr>queryString</xsp:expr>
   
   </esql:query>


====================
fo.xsl Top only

<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:fo="http://www.w3.org/1999/XSL/Format"
  xmlns:labdip="http://www.columbia.com/labdip">

  <xsl:template match="page">
    <xsl:processing-instruction
name="cocoon-format">type="text/xslfo"</xsl:processing-instruction>
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">





_______________________________________________________
Send a cool gift with your E-Card
http://www.bluemountain.com/giftcenter/