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: WriteableSource to write anywhere
Date Mon, 25 Feb 2002 13:55:09 GMT
Gianugo Rabellino wrote:

> Sylvain Wallez wrote:
>
>> Considering the discussions about the FileWritingTransformer, Cocoon
>> symetry and Stefano's source/drain RT, I added in
>> org.apache.cocoon.environment a new interface I already talked about :
>> WriteableSource. It adds writing methods to Source's reading abilities.
>
> Cool stuff Sylvain!

Thanks.

>> The door is now open to other implementations that will allow us to
>> write anything anywhere just as Source already allows to read anything
>> anywhere. Some possible implementations include xmldb (Gianugo ?), SQL
>> blobs, http/ftp upload, etc.
>
> I will take a look at it ASAP, I promise :-) Still, I'm a bit confused 
> about the idea of writable URLs... how can you tell, given just a URL, 
> when it's supposed to be a writable object or just a readable one? 

This cannot be known with the URL alone, but with the Source object :
  Source src = resolver.resolve(uri);
  if (src instanceof WriteableSource) {
     ContentHandler ch = ((WriteableSouce)src).getContentHandler();
      ...
  }

Sylvain

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com




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


Mime
View raw message