Subject: RE: multiple input files to one output file From: Linda van den Brink <lvdbrink@xxxxxxx> Date: Wed, 2 Feb 2000 16:04:12 +0100 |
Thanks for the missing 10%, for some reason I'd never have thought this was possible!! -----Original Message----- From: Mike Brown [mailto:mbrown@xxxxxxxxxxxxx] Sent: Wednesday, February 02, 2000 10:12 AM To: 'xsl-list@xxxxxxxxxxxxxxxx' Subject: RE: multiple input files to one output file > 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>

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> 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: Use of document() and an Engli, Steve Tinney | Thread | RE: multiple input files to one out, Linda van den Brink |
Use of document() and an English d, Dan Vint | Date | RE: multiple input files to one out, Linda van den Brink |
Month |