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/24 17:50:49 UTC

RE: Esql and FOP

Hello All,


I appreciate your patience as I ask this question again about FOP. I do not
believe this to be an Esql problem but wanted to keep the thread.  I really
need some assistance with this as it is driving me crazy and I have a
deadline looming in the near future....

The problem I am having is that my xsl page is not displaying any data when
I try to use my PDF stylesheet. The interesting thing here is that my java
bean method to build the query string is called twice when using this
stylesheet. if this is not a Cocoon issue I'll ask elsewhere but I believe
that it is because I do not have this problem with my other stylesheet, nor
do I have this problem if I embed the query in the XML page. I can't do that
because I need to get query variables off of the request to create the WHERE
clause. Here's code snippets....

=================XSL page=====================

<xsl:stylesheet
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
     xmlns:fo="http://www.w3.org/1999/XSL/Format"
>
 <xsl:template match="page">
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:processing-instruction
name="cocoon-format">type="text/xslfo"</xsl:processing-instruction>
<fo:layout-master-set>
      <fo:simple-page-master
       master-name="only"
         page-width="11in"  page-height="8.5in"
	      margin-top="0.25in"  margin-bottom="0.25in" 
      	      margin-left="0.5in" margin-right="0.5in">  
      	    <fo:region-before extent="1.0cm"/>
  			<fo:region-body margin-top="1.0cm" margin-bottom="1.0cm"/>
      		<fo:region-after extent="1.5cm"/>          
      </fo:simple-page-master>
</fo:layout-master-set>
	<fo:page-sequence initial-page-number="1" master-name="only">

    <fo:static-content flow-name="xsl-region-before">
		<fo:block text-align="center" font-size="20pt">
			Nothing
		</fo:block>
	</fo:static-content>

        <fo:static-content flow-name="xsl-region-after">
          <fo:block text-align-last="center" font-size="10pt">p.
		<fo:page-number/></fo:block>
        </fo:static-content>

        <fo:flow flow-name="xsl-region-body">
        	<xsl:apply-templates select="heading"/>
			<xsl:for-each select="requests">
 				<fo:table text-align="center">
    			<fo:table-column column-width="60mm"/>
    			<fo:table-column column-width="30mm"/>  
    			<fo:table-column column-width="30mm"/>   
    			<fo:table-column column-width="40mm"/>
    			<fo:table-column column-width="60mm"/> 
    			<fo:table-column column-width="40mm"/>   
			<fo:table-body>
			<fo:table-row>

 	<fo:table-cell>
       <fo:block><xsl:value-of select="supplier"/></fo:block>
      </fo:table-cell>
      
	<fo:table-cell>
       <fo:block><xsl:value-of select="initDate"/></fo:block>
      </fo:table-cell>

      <fo:table-cell>
       <fo:block><xsl:value-of select="admNum"/></fo:block>
      </fo:table-cell>
      
      <fo:table-cell>
       <fo:block><xsl:value-of select="fabric"/></fo:block>
      </fo:table-cell>
      
      <fo:table-cell>
       <fo:block><xsl:value-of select="supplierName"/></fo:block>
      </fo:table-cell>
      
      <fo:table-cell>
       <fo:block><xsl:value-of select="colorName"/></fo:block>
      </fo:table-cell>
      
</fo:table-row>

    </fo:table-body>
   </fo:table>
</xsl:for-each>
        </fo:flow>
     </fo:page-sequence>

 </fo:root>
  </xsl:template>
...
...

</xsl:stylesheet>


=============XML Snippet====================
<xsp:logic>
	labdip.CreateQueryBean queryBean = new labdip.CreateQueryBean();
        String queryString = queryBean.buildQueryString(request, response);
</xsp:logic>
<heading/>
<esql:connection>
<esql:pool>default</esql:pool>
  <esql:execute-query>
    <esql:query>
   <xsp:expr>queryString</xsp:expr>
   </esql:query>
    <esql:results>
      <header>Requests LabDip Report</header>
      <esql:row-results>
        <requests>
          <supplier><esql:get-string column="sup_nm"/></supplier>
          <initDate><esql:get-date column="init_rqst_dte"/></initDate>
          <admNum><esql:get-string column="adm_num"/></admNum>
          <fabric><esql:get-string column="itm_name"/></fabric>
          <supplierName><esql:get-string
column="supp_ip_num"/></supplierName>
          <colorName><esql:get-string column="clr_full_name"/></colorName>
          <rowNumber><esql:get-row-position/></rowNumber>
        </requests>
      </esql:row-results>
      <footer></footer>
    </esql:results> 
    <esql:error-results>
  <message><esql:get-message/></message>
  <stacktrace><esql:get-stacktrace/></stacktrace>
</esql:error-results>
  </esql:execute-query>
</esql:connection>
</page>

=================
Thank you for your assistance. 





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



Re: Esql and FOP

Posted by Ulrich Mayring <ul...@denic.de>.
Gil Winkelman wrote:
> 
> Hello All,
> 
> I appreciate your patience as I ask this question again about FOP.

Have you read the FAQ with the IE-bug and PDFs generated by fop? Or are
you using Netscape?

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung