W3C home > Mailing lists > Public > xsl-editors@w3.org > July to September 2007

Re: For-each file

From: Alexey Beshenov <al@beshenov.ru>
Date: Fri, 14 Sep 2007 18:09:13 +0400
To: axdmoraes <alexmoraes@gmail.com>
Cc: xsl-editors@w3.org
Message-Id: <200709141809.14587.al@beshenov.ru>

On Friday 14 September 2007 14:42, you wrote:

> Is there a way to make some action for each file in a directory in the file
> system? Like <xsl:for-each select="/myfolder/directory/" or something like
> this?

Of course, no. Firstly, XSL works with more abstract items than a file system. 
Secondly, HTTP server with XML and XSL files should not provide file listings 
for client side.

You can do such things with some extensions for XSLT processor (if you are 
working on local machine). Get file list and then do the xsl:for-each with 
document() function. Alternatively (if you are working with user through the 
HTTP), you can get and save file listing using some tool separated from the 
processor on server side (e.g. Perl script).

-- 
Alexey Beshenov <al@beshenov.ru>
http://beshenov.ru/
Received on Friday, 14 September 2007 14:09:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:58 GMT