You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Frank Daly <fd...@cit.ie> on 2003/03/21 15:57:58 UTC

transform xsp generated xml to pdf

Hi

I have worked through Leigh Dodds, IBM Developer Works, excellent
tutorial
showing how to use cocoon to query databases.  I am able to generate the
xml data and output this in IE6.  My problem starts when I try to
transform this data to xsl:fo and then pdf.

My xml file contains child nodes.  The xml outputted to IE6 contains
minus
signs, -, to allow a user to close the parent node and hide the child
nodes.
Could it be these minus signs that prevents the pdf file being
generated? I
just get a blank screen.  I'm using tomcat 4.1.18 and cocoon 2.

If there is an example on the web, I'd appreciate a link.

TIA

Frank



-------------------Legal  Disclaimer---------------------------------------

The above electronic mail transmission is confidential and intended only for the person to whom it is addressed. Its contents may be protected by legal and/or professional privilege. Should it be received by you in error please contact the sender at the above quoted email address. Any unauthorised form of reproduction of this message is strictly prohibited. The Institute does not guarantee the security of any information electronically transmitted and is not liable if the information contained in this communication is not a proper and complete record of the message as transmitted by the sender nor for any delay in its receipt.

----------------------------------------------------------------------------------------


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


RE: transform xsp generated xml to pdf

Posted by Frank Daly <fd...@cit.ie>.
Thanks a million Joerg, 

That worked.

Enjoy your weekend,

Frank

-----Original Message-----
From: Joerg Heinicke [mailto:joerg.heinicke@gmx.de] 
Sent: 21 March 2003 16:40
To: cocoon-users@xml.apache.org
Subject: Re: transform xsp generated xml to pdf

Hello Frank,

it's good to hear, that at least the static XML works. So there are not
more 
so many possibilities. If 'test2.pdf' works (returns a PDF), something
must 
be wrong with the other pipeline. Did you really request 'result.xml'?
If 
you get XML with this request, there must be another matching pipeline,
i.e. 
not the one below is used.

Can you temporarily clean up your sitemap (remove all pipelines) and add

some test pipelines:

<map:match pattern="result.xml">
     <map:generate type="xsp" src="xsp/result.xsp"/>
     <map:serialize type="xml"/>
</map:match>

This one should return the XML you already have as static file.

<map:match pattern="result_fo.xml">
     <map:generate type="xsp" src="xsp/result.xsp"/>
     <map:transform src = "fo/tablepic66.xsl"/>
     <map:serialize type="xml"/>
</map:match>

This one should return the XSL FO representation of the latter PDF.

<map:match pattern="result.pdf">
     <map:generate type="xsp" src="xsp/result.xsp"/>
     <map:transform src = "fo/tablepic66.xsl"/>
     <map:serialize type="fo2pdf"/>
</map:match>

And this one should return the PDF itself.

Try to request 'result.xml', 'result_fo.xml' and 'result.pdf' in the
browser 
and see what you get.

Regards,

Joerg

Frank Daly wrote:
> Thanks for your post Joerg
> 
> My pipeline is 
> 
>        <map:match pattern="result.xml">
>          <map:generate type="xsp" src="xsp/result.xsp"/>
>           <map:transform src = "fo/tablepic66.xsl"/>
>          <map:serialize type="fo2pdf"/>
>       </map:match>
> 
> The funny thing is I copied the XML from IE6 into a text file,
deleteted
> the minus signs, set up a new pipeline as below and this works.
> 
>      <map:match pattern="test2.pdf">
>          <map:generate src="fo/tradenew.xml"/>
>           <map:transform src = "fo/tablepic66.xsl"/>
>          <map:serialize type="fo2pdf"/>
>       </map:match>
> 
> Frank
> 
> 
> -----Original Message-----
> From: Joerg Heinicke [mailto:joerg.heinicke@gmx.de] 
> Sent: 21 March 2003 15:45
> To: cocoon-users@xml.apache.org
> Subject: Re: transform xsp generated xml to pdf
> 
> Hello Frank,
> 
> Frank Daly wrote:
> 
>>Hi
>>
>>I have worked through Leigh Dodds, IBM Developer Works, excellent
>>tutorial
>>showing how to use cocoon to query databases.  I am able to generate
> 
> the
> 
>>xml data and output this in IE6.  My problem starts when I try to
>>transform this data to xsl:fo and then pdf.
>>
>>My xml file contains child nodes.  The xml outputted to IE6 contains
>>minus
>>signs, -, to allow a user to close the parent node and hide the child
>>nodes.
>>Could it be these minus signs that prevents the pdf file being
>>generated?
> 
> 
> Uh? What has the presentation in IE6 to do with the XML itself? IE
only 
> transforms the XML it gets to the HTML with the minus signs you see
when
> 
> viewing XML in IE. If you see such a page without any error message
from
> IE, 
> it's correct XML.
> 
> In which way did you try to get PDF? You must transform your XML into
> XSL 
> FO, which can then be serialized to PDF. How does your pipeline look
> like?
> 
> 
>>I just get a blank screen.  I'm using tomcat 4.1.18 and cocoon 2.
>>
>>If there is an example on the web, I'd appreciate a link.
>>
>>TIA
>>
>>Frank
> 
> 
> Regards,
> 
> Joerg
> 

-- 

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de


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


-------------------Legal
Disclaimer---------------------------------------

The above electronic mail transmission is confidential and intended only
for the person to whom it is addressed. Its contents may be protected by
legal and/or professional privilege. Should it be received by you in
error please contact the sender at the above quoted email address. Any
unauthorised form of reproduction of this message is strictly
prohibited. The Institute does not guarantee the security of any
information electronically transmitted and is not liable if the
information contained in this communication is not a proper and complete
record of the message as transmitted by the sender nor for any delay in
its receipt.

------------------------------------------------------------------------
----------------


-------------------Legal  Disclaimer---------------------------------------

The above electronic mail transmission is confidential and intended only for the person to whom it is addressed. Its contents may be protected by legal and/or professional privilege. Should it be received by you in error please contact the sender at the above quoted email address. Any unauthorised form of reproduction of this message is strictly prohibited. The Institute does not guarantee the security of any information electronically transmitted and is not liable if the information contained in this communication is not a proper and complete record of the message as transmitted by the sender nor for any delay in its receipt.

----------------------------------------------------------------------------------------


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


Re: transform xsp generated xml to pdf

Posted by Joerg Heinicke <jo...@gmx.de>.
Hello Frank,

it's good to hear, that at least the static XML works. So there are not more 
so many possibilities. If 'test2.pdf' works (returns a PDF), something must 
be wrong with the other pipeline. Did you really request 'result.xml'? If 
you get XML with this request, there must be another matching pipeline, i.e. 
not the one below is used.

Can you temporarily clean up your sitemap (remove all pipelines) and add 
some test pipelines:

<map:match pattern="result.xml">
     <map:generate type="xsp" src="xsp/result.xsp"/>
     <map:serialize type="xml"/>
</map:match>

This one should return the XML you already have as static file.

<map:match pattern="result_fo.xml">
     <map:generate type="xsp" src="xsp/result.xsp"/>
     <map:transform src = "fo/tablepic66.xsl"/>
     <map:serialize type="xml"/>
</map:match>

This one should return the XSL FO representation of the latter PDF.

<map:match pattern="result.pdf">
     <map:generate type="xsp" src="xsp/result.xsp"/>
     <map:transform src = "fo/tablepic66.xsl"/>
     <map:serialize type="fo2pdf"/>
</map:match>

And this one should return the PDF itself.

Try to request 'result.xml', 'result_fo.xml' and 'result.pdf' in the browser 
and see what you get.

Regards,

Joerg

Frank Daly wrote:
> Thanks for your post Joerg
> 
> My pipeline is 
> 
>        <map:match pattern="result.xml">
>          <map:generate type="xsp" src="xsp/result.xsp"/>
>           <map:transform src = "fo/tablepic66.xsl"/>
>          <map:serialize type="fo2pdf"/>
>       </map:match>
> 
> The funny thing is I copied the XML from IE6 into a text file, deleteted
> the minus signs, set up a new pipeline as below and this works.
> 
>      <map:match pattern="test2.pdf">
>          <map:generate src="fo/tradenew.xml"/>
>           <map:transform src = "fo/tablepic66.xsl"/>
>          <map:serialize type="fo2pdf"/>
>       </map:match>
> 
> Frank
> 
> 
> -----Original Message-----
> From: Joerg Heinicke [mailto:joerg.heinicke@gmx.de] 
> Sent: 21 March 2003 15:45
> To: cocoon-users@xml.apache.org
> Subject: Re: transform xsp generated xml to pdf
> 
> Hello Frank,
> 
> Frank Daly wrote:
> 
>>Hi
>>
>>I have worked through Leigh Dodds, IBM Developer Works, excellent
>>tutorial
>>showing how to use cocoon to query databases.  I am able to generate
> 
> the
> 
>>xml data and output this in IE6.  My problem starts when I try to
>>transform this data to xsl:fo and then pdf.
>>
>>My xml file contains child nodes.  The xml outputted to IE6 contains
>>minus
>>signs, -, to allow a user to close the parent node and hide the child
>>nodes.
>>Could it be these minus signs that prevents the pdf file being
>>generated?
> 
> 
> Uh? What has the presentation in IE6 to do with the XML itself? IE only 
> transforms the XML it gets to the HTML with the minus signs you see when
> 
> viewing XML in IE. If you see such a page without any error message from
> IE, 
> it's correct XML.
> 
> In which way did you try to get PDF? You must transform your XML into
> XSL 
> FO, which can then be serialized to PDF. How does your pipeline look
> like?
> 
> 
>>I just get a blank screen.  I'm using tomcat 4.1.18 and cocoon 2.
>>
>>If there is an example on the web, I'd appreciate a link.
>>
>>TIA
>>
>>Frank
> 
> 
> Regards,
> 
> Joerg
> 

-- 

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de


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


RE: transform xsp generated xml to pdf

Posted by Frank Daly <fd...@cit.ie>.
Thanks for your post Joerg

My pipeline is 

       <map:match pattern="result.xml">
         <map:generate type="xsp" src="xsp/result.xsp"/>
          <map:transform src = "fo/tablepic66.xsl"/>
         <map:serialize type="fo2pdf"/>
      </map:match>

The funny thing is I copied the XML from IE6 into a text file, deleteted
the minus signs, set up a new pipeline as below and this works.

     <map:match pattern="test2.pdf">
         <map:generate src="fo/tradenew.xml"/>
          <map:transform src = "fo/tablepic66.xsl"/>
         <map:serialize type="fo2pdf"/>
      </map:match>

Frank


-----Original Message-----
From: Joerg Heinicke [mailto:joerg.heinicke@gmx.de] 
Sent: 21 March 2003 15:45
To: cocoon-users@xml.apache.org
Subject: Re: transform xsp generated xml to pdf

Hello Frank,

Frank Daly wrote:
> Hi
> 
> I have worked through Leigh Dodds, IBM Developer Works, excellent
> tutorial
> showing how to use cocoon to query databases.  I am able to generate
the
> xml data and output this in IE6.  My problem starts when I try to
> transform this data to xsl:fo and then pdf.
> 
> My xml file contains child nodes.  The xml outputted to IE6 contains
> minus
> signs, -, to allow a user to close the parent node and hide the child
> nodes.
> Could it be these minus signs that prevents the pdf file being
> generated?

Uh? What has the presentation in IE6 to do with the XML itself? IE only 
transforms the XML it gets to the HTML with the minus signs you see when

viewing XML in IE. If you see such a page without any error message from
IE, 
it's correct XML.

In which way did you try to get PDF? You must transform your XML into
XSL 
FO, which can then be serialized to PDF. How does your pipeline look
like?

> I just get a blank screen.  I'm using tomcat 4.1.18 and cocoon 2.
> 
> If there is an example on the web, I'd appreciate a link.
> 
> TIA
> 
> Frank

Regards,

Joerg

-- 

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de


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


-------------------Legal
Disclaimer---------------------------------------

The above electronic mail transmission is confidential and intended only
for the person to whom it is addressed. Its contents may be protected by
legal and/or professional privilege. Should it be received by you in
error please contact the sender at the above quoted email address. Any
unauthorised form of reproduction of this message is strictly
prohibited. The Institute does not guarantee the security of any
information electronically transmitted and is not liable if the
information contained in this communication is not a proper and complete
record of the message as transmitted by the sender nor for any delay in
its receipt.

------------------------------------------------------------------------
----------------


-------------------Legal  Disclaimer---------------------------------------

The above electronic mail transmission is confidential and intended only for the person to whom it is addressed. Its contents may be protected by legal and/or professional privilege. Should it be received by you in error please contact the sender at the above quoted email address. Any unauthorised form of reproduction of this message is strictly prohibited. The Institute does not guarantee the security of any information electronically transmitted and is not liable if the information contained in this communication is not a proper and complete record of the message as transmitted by the sender nor for any delay in its receipt.

----------------------------------------------------------------------------------------


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


Re: transform xsp generated xml to pdf

Posted by Joerg Heinicke <jo...@gmx.de>.
Hello Frank,

Frank Daly wrote:
> Hi
> 
> I have worked through Leigh Dodds, IBM Developer Works, excellent
> tutorial
> showing how to use cocoon to query databases.  I am able to generate the
> xml data and output this in IE6.  My problem starts when I try to
> transform this data to xsl:fo and then pdf.
> 
> My xml file contains child nodes.  The xml outputted to IE6 contains
> minus
> signs, -, to allow a user to close the parent node and hide the child
> nodes.
> Could it be these minus signs that prevents the pdf file being
> generated?

Uh? What has the presentation in IE6 to do with the XML itself? IE only 
transforms the XML it gets to the HTML with the minus signs you see when 
viewing XML in IE. If you see such a page without any error message from IE, 
it's correct XML.

In which way did you try to get PDF? You must transform your XML into XSL 
FO, which can then be serialized to PDF. How does your pipeline look like?

> I just get a blank screen.  I'm using tomcat 4.1.18 and cocoon 2.
> 
> If there is an example on the web, I'd appreciate a link.
> 
> TIA
> 
> Frank

Regards,

Joerg

-- 

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de


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