Altova Mailing List Archives>Archive Index >xsl-list Archive Home >Recent entries >Thread Prev - RE: [xsl] Transforming multiple XML files into one file [Thread Next] Re: [xsl] Transforming multiple XML files into one fileTo: Date: 7/3/2006 12:46:00 PM David,
Sorry for not being clearer about this in the beginning. What I have
is several separate XML files. We'll call them file1.xml, file2.xml,
and file3.xml. What I want to do is take the <story> element from
each one of those files and generate one big xml file on output that
combines those elements. How would I do something like that?
chad
On Jun 21, 2006, at 5:27 AM, David Carlisle wrote:
not sure what you mean but if you have a file
<files>
<z>one.xml</z>
<z>two.xml</z>
<z>three.xml</z>
</files>
and go
<xsl:variable name="files" select="document(document('files.xml')/
files/z)"/>
then $files is a node set of three document nodes representing one.xml
two.xml and three.xml and you can apply
templates to all three at once with
<xsl:apply-templates select="$files"/>
or extract elements from all three documents with
xsl:for-each select="$files/some/path/to/here"
David | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
