cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject Re: Defining Source Interfaces
Date Wed, 08 Jan 2003 13:13:19 GMT
Nicola Ken Barozzi wrote:

<snip/>

> I really don't understand much of the heat in this discussion because 
> I'm not so into it, but I'm happy you guys are and are making progress :-)


Thanks. Actually, the discussions is about many points, one after the 
other ;-)

> I just wanted to ask for a second (please excluse my ignorance), if 
> this means that a Generator can query a source if a certain "file" in 
> the same dir exists.
>
> The reason (Forrest need): on the filesystem I have
>
>    mydir/myfile.pdf
>    mydir/thefile.xml
>    mydir/mydile.xml
>
> If I get a request for "mydir/myfile", I would like to get a Source 
> for ""mydir/" and ask what "files" it contains that have "myfile" as a 
> name.


Thats it. We're discussing about the definition of a Source that can 
give you its parent ("mydir/") and its children.

> Basically it could make us do a more generic version of ResourceExists.
>
> Do I understand what can be done or am I on track? Sorry if I cannot 
> dwelve further myself into it now, and thanks for the answers :-)


You're totally on track. If you need this action right now, I would 
suggest to mimic what's in the DirectoryGenerator, that makes the 
assumption that the Source is a file. You can then use all the 
facilities given by File.

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message