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

Re: xslt and the filesystem

Subject: Re: xslt and the filesystem
From: Daniel Bibbens <dbibbens@xxxxxxxxxx>
Date: Tue, 22 Feb 2005 07:36:46 -0800
xsl filesystem
tom.kirkpatrick@xxxxxxxxxxxx writes:

> Is it possible for xsl/xpath, via the document() function, to read in all 
> files in a particular directory...
>
> It would be really neet If I could just get the XSL template to look at 
> everyfile in the directory, and apply appropriate processing:
>

I've written an Apache (1.3.x) module, mod_rssindex, to handle this
problem. It creates an RSS 2.0 (XML) document of the files and
directories in a directory. Use 

    <xsl:variable 
        name="path" 
        select="document('http://yourhost.com/path/to/index.rss')/rss/channel"/>

    <xsl:for-each select="$path/item[description = 'file']">
      <xsl:variable name="file" select="document(link)"/>
       <!-- do work with '$file' here -->
    </xsl:for-each>

You can get download and installation information at:
    http://xobjex.com/projects/mod_rssindex/

-- 
Daniel Bibbens 				 http://xobjex.com/
Apache modules and other open-source projects for XSL & RSS

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.