If you are okay driving it all with just one stylesheet you can pull
the various XML docs together using an xinclude pass and then treat the
XML as one big file.
To do the include in XML I use:
and define the xi namespace as
so this is a w3c standard approach, which is nice.
I use ant for processing it and define a task like this:
(you can google xcluder and pull down the jar file, or pull it from an
ivy repository like ivyroundup)
I use the xcluder task like this:
<xcluder in="infile.xml" out="outfile.xml" indent="yes" />
(there are other options, but this suits my needs)
On 25/06/10 12:41, twfurst wrote:
I have a question regarding how to combine multiple files into a single
publication, or book.
To start with, I will have five different XSL-FO styles sheets (right now
three are complete) for these XML files (of varying numbers), depending on
which schema validates them. Now, these files when combined will comprise a
document. They are referenced in what is a "publication module". This is
just another XML file that gives the identifying information (not including
file extension) for each of the XML files that make up that publication.
Also, there will be publication modules that refer to other publication
modules that are referring to the individual XML files containing the
I am not sure how I should go about using this "publication module" to
assemble a book. As it is now, each stylesheet for each different schema
type has it's own headers and footers, which need to remain as is, but
further information will need to be added, such as the publication number
and so on.
I have done some reading regarding the use of the document() function, but
am not sure if this the correct route to take. Should I create a stylesheet
that includes the other stylesheets and uses this function?
If anyone has any ideas, or has come into a similar situation, the help will
be very appreciated.