This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: multiple output files within a recursive template


> 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]