Re: Multiple XMLs to One PDF.

> 2. I have 3 different XSLs that I want to use for each XML: 
ah that makes it more interesting.

You can't really do that in xslt 1, but you can achieve the effect so
long as the three stylesheets are written to use  modes on all templates
and uses of apply-templates, a different mode in each stylesheet.

then

you can have a top level stylesheet that imports all three stylesheets,
and if it wants to transform a document with the stylesheet using mode
one (say) you'd do

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

when this is executed, even though all your stylesheets have been
imported, only the templates from the stylesheet using mode one will
fire.


there are of course alternative strategies.

While joining pdf files together requires specialist software (or a very
very careful reading of the pdf spec) it isn't so hard to merge FO files
together.

You may prefer to do all your transformations separately, using
different stylesheets then use a final "merging" xslt stylesheet that
use the document() function to pull in all the individual stylesheets,
and pull them all under one fo:root. That way you don't need to worry
about combining the transform and the merge. For each FO document you
just need to navigate down to teh part you want and then copy the whole
subtree using xsl:copy-of into your combined FO file.

David


________________________________________________________________________
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:
http://www.star.net.uk
________________________________________________________________________

Received on Friday, 12 March 2004 10:14:03 UTC