W3C home > Mailing lists > Public > www-xsl-fo@w3.org > March 2004

Re: Multiple XMLs to One PDF.

From: David Carlisle <davidc@nag.co.uk>
Date: Fri, 12 Mar 2004 14:36:23 GMT
Message-Id: <200403121436.OAA28537@penguin.nag.co.uk>
To: viral.patel@countryfinancial.com
Cc: www-xsl-fo@w3.org

the document() function allows your xsl stylesheet to use any number of
xml source documents.
if for example your top level file was elements such as

 <chapter href="a.xml"/>
 <chapter href="b.xml"/>
 <chapter href="c.xml"/>

where the files a.xml, b.xml ... contained the source of the chapters then
a template like

<xsl:template match="chapter">
 <xsl:apply-templates match="document(@href)"/>

will cause the referenced files to be loaded and transformed.
So you end uo with one FO file representing the combined document, which
you then process as usual.

> then re-using it and appending the rest of the XML files to that 1 PDF but
> it didnt work either. 

You can of course make all the pdf files separately and combine later
but that's harder as you need to use specific pdf-aware libraries to do
that, you can't just concatenate pdf files together: they have a rather
delicate internal structure. Also, if pages or other structures are
numbered, then simply joining the pdfs together isn't what you want to


This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
Received on Friday, 12 March 2004 09:37:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:10:00 UTC