[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: multiple input files to one output file

Subject: Re: multiple input files to one output file
From: Eric van der Vlist <vdv@xxxxxxxxxxxx>
Date: Wed, 02 Feb 2000 10:51:20 +0100
someuris file file1.xml file
Hi,

Linda is mentioning "thousands of files"... 
It may be worthwhile to check that the files are closed and the
resources released for each iteration of the for-each loop.
Do you know if it's the case ?

My 0,02 euros.

Eric

Mike Brown wrote:
> 
> > I do have XML files that specify the filenames and paths of all the
> > documents in a specific subdirectory. Could I somehow read such a
> > filenames-file and call the document function for each of the
> > files listed, and then extract the information I want from each
> > document?
> 
> Wow, you are 90% of the way there just with your description of what you
> want. You even used the words "for each" :-)
> 
> In filenames_file.xml you could have:
> 
> <someURIs>
>   <file>file1.xml</file>
>   <file>file2.xml</file>
>   <file>http://foo/file3.xml</file>
>   <file>file://D|/dev/src/file4.xml</file>
>   <file>../../file5.xml</file>
> </someURIs>
> 
> Then in a template in your XSL you could have:
> 
> <xsl:for-each select="document('filenames_file.xml')/someURIs/file/text()">
>   <xsl:variable name="current_file_root" select="document(string(.))"/>
>   <!-- the next lines are just for example -->
>   <xsl:text>&#xA;&#xA;current file: </xsl:text>
>   <xsl:value-of select="."/>
>   <xsl:text>&#xA;# of elements: </xsl:text>
>   <xsl:value-of select="count($current_file_root//*)"/>
> </xsl:for-each>
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

-- 
------------------------------------------------------------------------
Eric van der Vlist                                              Dyomedea

http://www.dyomedea.com                          http://www.ducotede.com
------------------------------------------------------------------------


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.