[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: multiple output files within a recursive template


Subject: RE: multiple output files within a recursive template
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Mon, 27 Nov 2000 12:21:51 -0000

> The task of this template is it to divide the source document into 2
> parts/files, the first 1500 characters and the rest. 
> Basically it works quite
> fine. The only problem is that Saxon 5.5.1 overwrites 
> existing files instead of
> appending the output to the existing file, so that only the 
> output of the last
> temaple match is written to the file(s).
> 
The best way of thinking about <saxon:output> is to regard it as putting a
node on the result tree, which the serializer then treats as an instruction
to serialize that subtree to a particular file.

For multiple output files you need to follow the same discipline as with any
other node on the result tree: you need to define a template that produces
out output file, and think about how to write this template to read the
input it needs to produce it. Just as with any other transformation, the
template rules need to be structured to match the required output, not to
match the input structure.

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread