Subject: RE: multiple input files to one output file From: Linda van den Brink <lvdbrink@xxxxxxx> Date: Wed, 2 Feb 2000 16:14:51 +0100 |
I should somehow find the time and means to teach myself Java some day... I feel I'm the only one on this list who's not a Java developer! <snif/> Seriously, thanks for giving me another reason to learn a bit of Java programming! -----Original Message----- From: Steve Tinney [mailto:stinney@xxxxxxxxxxxxx] Sent: Wednesday, February 02, 2000 2:41 PM To: xsl-list@xxxxxxxxxxxxxxxx Subject: Re: multiple input files to one output file If you can use Saxon for your application, take a good long look at the docs for both the extension facilities and the API. For a large set of data like this it will probably be worth writing a Java program which caches the stylesheet and applies it to the list of files. You could either use Java's directory walking routines to generate the file list, or have two stylesheets in your Java app. The first could process the XML files to extract the filenames/URLs; you could capture the output of that internally, and then use it to drive the iteration of the second sheet. Steve Eric van der Vlist wrote: > 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 ? > > 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? > > > > <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>

current file: </xsl:text> > > <xsl:value-of select="."/> > > <xsl:text>
# of elements: </xsl:text> > > <xsl:value-of select="count($current_file_root//*)"/> > > </xsl:for-each> > > -- ---------------------------------------------------------------------- Steve Tinney Babylonian Section * University of Pennsylvania Museum stinney@xxxxxxxxxxxxx Phila, PA. 215-898-4047 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: multiple input files to one out, Linda van den Brink | Thread | RE: multiple input files to one out, sara . mitchell |
RE: multiple input files to one out, Linda van den Brink | Date | RE: parse using DOM, Paul Beer |
Month |