Hi folks-

I was wondering if anyone has experienced an FP taglib symptom similar to
this:

I have a file that using XSP takes some form data, does some calculations,
and then returns HTML or PDF using the <xsp:pi
target="xml-stylesheet">href="<xsp:expr>stylesheet</xsp:expr>"
type="text/xsl"</xsp:pi> method of stylesheet selection.  That all works
fine.

The issue is that I've now added the FP Taglib into the mix to log the form
data to a file.  This works fine when the data is redisplayed as HTML, but
it writes the data three (3) times when displayed as PDF.  Any thoughts?

There are no generic <apply-templates/> in the stylesheet

I'm using Cocoon 1.8.3-dev20010712 + FOP 0.19.0 + Xerces 1.2.3 + Xalan 1.2.2
I've included some code snippets below:  Any help would be greatly
appreciated


========================= 
Kevin D'Allaird 
[EMAIL PROTECTED]

http://www.vitria.com
http://www.xmls.com 
http://www.xedi.org 
http://www.xmltimes.com 


=========== XML ==================
<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>

<xsp:page
  language="java"
  xmlns:xsp="http://www.apache.org/1999/XSP/Core";
  xmlns:request="http://www.apache.org/1999/XSP/Request";
  xmlns:util="http://www.apache.org/1999/XSP/Util";
 xmlns:fp="http://apache.org/cocoon/XSP/FP/1.0";
>
  
<page>  

  <xsp:logic>

    ... get parameters and calculate some values
    
  </xsp:logic>

  <xsp:pi target="xml-stylesheet">href="<xsp:expr>stylesheet</xsp:expr>"
type="text/xsl"</xsp:pi> 

  <fp:resource id="external-item">
   <fp:resource-file>mydatafile.xml</fp:resource-file>
   <fp:resource-node>/users/user[1]</fp:resource-node>
   <fp:default-mode>insert-before</fp:default-mode>
  </fp:resource>

  <fp:write to="external-item" select="data1"><request:get-parameter
name="data1"/></fp:write>
  <fp:write to="external-item" select="data2"><request:get-parameter
name="data2"/></fp:write>
  <fp:write to="external-item" select="data3"><request:get-parameter
name="data3"/></fp:write>
  <fp:write to="external-item" select="data4"><request:get-parameter
name="data4"/></fp:write>
  <fp:write to="external-item" select="data5"><request:get-parameter
name="data5"/></fp:write>
  <fp:write to="external-item" select="date"><util:time format="MM/dd/yyyy
hh:mm:ss"/></fp:write>
 

  <content>

  ... 
   
  </content>

</page>

</xsp:page>



=========== FO Stylesheet ===========

<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  xmlns:fo="http://www.w3.org/1999/XSL/Format";
  xmlns:svg="http://www.w3.org/2000/svg";>

  <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";
xmlns:svg="http://www.w3.org/2000/svg";>

    <fo:layout-master-set>
        ...
  
    </fo:layout-master-set>
  
  
    <fo:page-sequence>    

      ....  

        <fo:flow flow-name="xsl-region-body">

          <xsl:apply-templates select="content"/>

        </fo:flow>

    </fo:page-sequence>

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


  <xsl:template match="/page/content">

  ...
  
  </xsl:template>
</xsl:stylesheet>



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to