If you want to convert a number of separate xml documents into one then you need to create a new master document and have each old document as a child. The easiest way I can think of is to create a config file such as this with a list of all the documents you need merging:
Code:
<mergeData newRoot="newRoot">
<fileList>
<fileItem>myFile1.xml</fileItem>
<fileItem>myFile2.xml</fileItem>
<fileItem>myFile3.xml</fileItem>
</fileList>
</mergeData>
With msxml you can use a path relative to the stylesheet but with some processors you may need the full url, file:///c:/myFolder/myFile.xml for example.
Your stylesheet looks like:
Code:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:element name="{mergeData/@newRoot}">
<xsl:apply-templates select="mergeData/fileList/fileItem"/>
</xsl:element>
</xsl:template>
<xsl:template match="fileItem">
<xsl:copy-of select="document(.)"/>
</xsl:template>
</xsl:stylesheet>
Replace the newRoot attribute value with your choice of new document element.
This simple merger won't work with source xml files that have embedded DTDs but given that you created these files from flat files this seems unlikely.
Joe (MVP - xml)