RE: [xsl] newbie: merging XML files using XSLT

Subject: RE: [xsl] newbie: merging XML files using XSLT
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Tue, 29 Apr 2003 14:05:29 -0400
[ Holk, David A]
> I have five simple(flat) XML files that I need to aggregate 
> into a single,
> more complex xml file.
> 
> I am trying to avoid using DOM for performance reasons.
> 
> Is there a way to use and existing xml file as output for a XSL
> transformation(essentially appending elements to an existing file)? 
> 

Read it in using document(), copy it to the output using copy-of(), then
proceed with the rest of your transformation.

If you do it literally this way, you will need to supply an overall
wrapper element so that the output xml file will have a single document
element.  If you want the output file to have the same document element
as the input file, you will probably want to use copy-of on the child
elements of the document element, rather than on its root.

Cheers,

Tom P

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


Current Thread