commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: [latka][jelly] commons-vfs?
Date Wed, 17 Jul 2002 14:52:33 GMT
From: "Jeff Turner" <>
> Hi,
> Just a random thought,
> Imagine if we had, as a Commons project, a Virtual Filesystem (VFS)
> abstraction layer.
> Then we could have a HTTP backend to the VFS, providing a concrete API
> for navigating a URI space. One could traverse a website just like a
> filesystem, and each 'node' would be a HTTP resource, with properties
> like 'Content-Type' (ie HTTP headers). Exactly how to explore a URI
> space to build up a VFS is an open question, but imagine lazily
> evaluating spidering engines, or exploiting Cocoon's "link view" system,
> where if '?cocoon-view=links' is appended to a URL, a list of page links
> is returned.
> That would be a nifty little project on it's own, and would provide a
> nice intuitive interface to HTTPClient.
> I'd then like to layer on top of this, engines like Myrmidon (Ant2
> proposal) and Jelly. So one could traverse a VFS with XPath-like tags,
> <forEach> expressions, create <v-fileset>s of URIs, etc.
> Then this would provide a marvellous base for functional testing tools
> like Latka and Anteater:
>  - It would no longer matter if what's being validated is from a local
>    filesystem, or retrieved via HTTP, HTTPS, FTP, LDAP, database, etc.
>  - We could write 'spidering' tests, like "validate that all files in
>    this website conform to the HTML 4.0 DTD", or "ensure no links are
>    broken". This type of test could massively increase the value-add
>    of functional testing tools.

OK so now we've got the first cut of VFS as a commons component, how would
you see this working inside Ant/Jelly/Latka/Anteater?

The way the iteration works in Jelly is to define a <fileset> then iterate
over it. e.g.

<j:jelly xmlns:j="jelly:core" xmlns="jelly:ant">

    <!-- create a scanner -->
    <fileScanner var="scanner">
        <!-- define some regular Ant style filesets -->
        <fileset dir="src/test" includes="**/*.jelly"/>

    <!-- now iterate through the files -->
    <j:forEach var="file" items="${scanner.iterator()}">
        <!-- process the file in some way-->
        Found ${file.absolutePath}


So maybe we need some way to define a VFS fileSet and work in a similar way?
Then we can iterate over the set, do set unions, manipulations etc. The
XPath-like language you mention, I guess we could use that to define
include/exclude patterns as an alternative to the Ant ones.



Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts

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

View raw message