xsl-list
[Top] [All Lists]

Re: [xsl] Transforming multiple XML files into one file

2006-07-03 12:29:03
David,
How does the XSLT know the exact location of the files that you are listing. Do they need to be located in the same directory?


<chad/>

Chad Chelius
AGI Training
cchelius(_at_)agitraining(_dot_)com


On Jul 3, 2006, at 9:12 AM, David Carlisle wrote:

<xsl:copy-of select="(document('file1.xml')|document('file2.xml')| document('file3.xml'))/story"/>

or if it's more convenient have a list.xml that looks like
<files>
 <file>file1.xml</file>
 <file>file2.xml</file>
 <file>file3.xml</file>
</files>

then you can co

<xsl:copy-of select="document(document('list.xml')/files/file)/ story"/>

in xslt2 you can use the collection() function which essentially
automates (and hides) the generation of the list.xml file, but in XSLT1 you need to have this file list to hand either by making it manually or
9for example) modifying a directory listing. Some web service setups
have an option of supplying a listing in XMl format so sometimes you
don't need to make an actual file list xml file, just use an http URI
pointing at the directory.

David


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--