Hello all,

I am currently working on an application that will pull data values from a 
database and place these into an XML file.  The resulting XML file is then to 
be merged with an FO template file and the result would be used to generate a 
PDF

The reason for the mail, is that I wanted to get opinions on the best way to go 
about doing this.  In my minds eye I have the following idea :

XML File (containing data values) :
<merge_test_report>
<field_values>
<value id="@value1">abc</value>
<value id="@value2">def</value>
</field_values>
<repeat_values>
<repeater id="1">
<values>
<value id="@mvalue1">rep 1a</value>
<value id="@mvalue2">rep 1b</value>
</values>
</repeater>
<values>
<value id="@mvalue1">rep 2a</value>
<value id="@mvalue2">rep 2b</value>
</values>
</repeater>
<repeat_values>
<merge_test_report>

FO File (containing the base layout for the pdf) :
<fo:table table-layout="fixed">
<fo:table-column column-width="10cm"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block text-align="left">@value1 / @value2</fo:block>
</fo:table-cell>
</fo:table-row>
<!-- STARTREPEATMERGE id="1" -->
<fo:table-row>
<fo:table-cell><fo:block>@mvalue1 / @mvalue2</fo:block></fo:table-cell>
</fo:table-row>
<!-- ENDREPEATMERGE id="1" -->
</fo:table-body>

I would then create an application to read through the XML file and place its 
values into the FO template, which would create another FO file which would be 
processed by FOP.

This would generate a PDF with something similar to this format :

abc / def
rep1a / rep 1b
rep2a / rep 2b

Considering I currently have about 4 hours experience of FOP and XSL-FO I am 
insure on whether this is the best way to proceed, or if FOP has any 
functionality that will make my life easier - bearing in mind the ability to 
create repeated tables is a must.

I noticed from looking at the command line parameters for fop that there is an 
option for : 

Fop -xsl foo.xsl -xml foo.xml -pdf foo.pdf

Which leads me to believe that fop may already have what I need; unfortunately 
I can seem to pin down the documentation/samples covering that functionality.

Regards
�
Manuel Reyes

PS. The XML/XSL above may not be 100% correct, as it was just typed quickly 
into the message.


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

Reply via email to