commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Poulard <>
Subject [VFS] have the RefleX ! apply XPath expressions on your file system
Date Wed, 07 Dec 2005 16:07:12 GMT

I have been released RefleX, an application that uses intensively VFS :
RefleX is available for download here :

RefleX is a Java tool that allow to design programs entirely in XML.
XML programs -called also Active Tags programs- are using intensively 
XPath to cross objects other than XML objects.

for example : a file object

a file object exposes its properties as XML content and attributes, so 
it is easy to select a set of files, for example :

-consider that one creates a property named myDir which value is given 
by the XPath function :
io:file( 'file:///path/to/repository ')

-then you can apply other XPath expressions on it :
name( $myDir )
   to select the files and directories in the entire subtree
   to select the files in the entire subtree
   to select the XML files in the entire subtree
   to select the parent directory, if any


to use single files and a set of files, the following active sheet (that 
is to say an Active Tags program) shows how to transform all XML files 
from a repository to HTML :

         <!-- the same stylesheet for all XML files -->
         <xcl:parse-stylesheet name="xslt" 
         <xcl:set name="myXMLFiles"
  value="{io:file( '/path/to/my/xml/docs' 
         <xcl:for-each name="file" select="{$myXMLFiles}">
             <xcl:parse name="xml" source="{$file}"/>
             <xcl:transform name="html" output="{substring-before( 
$file/@io:path, '.xml' )}.html"
  source="{$xml}" stylesheet="{$xslt}"/>

as the files are handled by VFS, all the file systems supported are also 
available in RefleX ; for its own functioning, RefleX also provides some 
add-ons :

the xmldb scheme to access to files that are stored within XML native 
databases :
the ldap scheme
the web scheme, which allows to access to files within a servlet :

Have fun !


           (. .)
|   Philippe Poulard    |

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message