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/5/2006 3:25:00 PM O.K. guys, I have an XML file that looks like this: <files> <file>file1.xml</file> <file>file2.xml</file> <file>file3.xml</file> </files> and an XSLT that looks like this: <xsl:template match="movie"> <xsl:copy-of select="document(document('list.xml')/files/file)/ story"/> </xsl:template> In the past I have been applying an XSLT to an existing XML file using Oxygen. So I'd open up the file that I want to transform and then the XSLT would apply the transformation to that document and give me the resulting output. In this situation, there isn't an XML file to start with. Should I just open a blank XML file and do a transformation on it? Forgive my ignorance here. If you are matching "movie" then I'd expect that your main document would be whichever file had the movie elemet in it, so perhaps im confused. If you don't have any other "main" document, use list.xml as your main document, then you don't need to pull it in with the document() function so you'd have <xsl:template match="files"> <xsl:copy-of select="document(file)/story"/> story"/> </xsl:template> David | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
