I have an XML file with parent tag <CLAIMCONTACT>that can appear n number of times. For each <CLAIMCONTACT> I need to generate a PDF file.
I'm using xslt and FO commands within my xml_pdf.fo file that reads the XML file. My final outcome from this xml_pdf.fo file is to always generate one PDF file. Then, for each occurrence of the <CLAIMCONTACT> tag, generate another copy of the same PDF along with a cover sheet in front.
Is this at all possible? Call xml_pdf.fo from within xml_pdf.fo to generate multiple copies of the PDF.
For example, if my XML file contains two <CLAIMCONTACT> tags, the output from xml_pdf.fo will be one PDF file with no cover sheet, then two of the same PDF file with the cover sheet as the first page.
Another idea I had was to print multiple copies of the PDF within the XSLT code, depending on the occurrences of <CLAIMCONTACT>.
Is there code available to do this?
I Googled it but could not find anything.
I current have the cover sheets printing correctly - one per <CLAIMCONTACT>.
Now I just need to get the PDF file that's generated from all the XML code for each cover sheet created.
Something else I'm trying to figure out is how to call/execute another fo file from within xml_pdf.fo.
Then within my <CLAIMCONTACT> <xsl:for-each ...> loop, I'll process the other fo file.
Here's my looping code:
<fo:simple-page-master master-name="disclaimer" page-height="27.94cm" page-width="21.59cm" margin-top="0.5cm" margin-bottom="1cm" margin- left="1cm" margin-right="1cm">
<!-- DEFINE PAGE SEQUENCE - (Attorney Cover Page(s)) -->
<xsl:if test="/doc/EOB/CLAIMCONTACT/NUMBER[.!=''] and $varInfo='Y'">
<fo:page-sequence master-reference="disclaimer" force-page-count="no-force">
<fo:block padding="0pt" font-size="1pt">
I'm thinking this will be my best solution if possible!
Any suggestions will be greatly appreciated!