cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geert Josten <Geert.Jos...@daidalos.nl>
Subject Re: zip and jar source
Date Thu, 29 Sep 2005 12:48:21 GMT
I was uncertain that it is in the 'main' block, so looked things up. And you know what? You
can find 
ZipSource and ZipSourceFactory in scratchpad block (2.1.6 at least).

:-P

Look in package dir org/apache/cocoon/components/source/impl/

There is also a DirectoryZipArchiver (a reader), but haven't had a change to look at it yet...

Grtz,
Geert

Michael Wechner wrote:

> Geert Josten wrote:
> 
>> Hi,
>>
>> Done a few things with reading zip files and I haven't included a 
>> specific block for that. Just use the zip: pseudo protocol when 
>> specifying a source for map:generate or map:read. It should follow 
>> this uri format: zip://[file]@[archive]
> 
> 
> 
> that's what I actually try, but I receive the following error:
> 
> java.io.FileNotFoundException: /sitemap/sitemap.xmap@sitemap.zip (No 
> such file or directory)
>    at java.io.FileInputStream.open(Native Method)
>    at java.io.FileInputStream.<init>(FileInputStream.java:106)
>    at 
> org.apache.excalibur.source.impl.FileSource.getInputStream(FileSource.java:146) 
> 
>    at 
> org.apache.cocoon.components.source.SourceUtil.getInputSource(SourceUtil.java:521) 
> 
>    at 
> org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:325)
>    at
> 
> 
> It seems to me that the FileSource is being taken, because no "zip" source
> is being defined within cocoon.xconf, or is the FileSource able to handle
> zip files?
> 
> Thanks for your help
> 
> Michi
> 
>>
>> Though, you have to know the name and path of the file you want from 
>> the zip in advance. It doesn't implement the Traversable interface (or 
>> how was it called). Unless someone has added that after 2.1.7 orso..
>>
>> HTH,
>> Geert
>>
>> Michael Wechner wrote:
>>
>>> Hi
>>>
>>> I would like to use the zip (or jar) source to view ODTs (OpenDocument).
>>>
>>> I have found a very nice description at:
>>>
>>> http://137.207.120.195:8080/cocoon/wampum/repo/OpenOfficeRocks.odt
>>>
>>> but somehow I have trouble to do this myself, because it seems
>>> to me that the zip (and jar) source are or not part of the default 
>>> cocoon.xconf
>>> declaration and I can't figure out what packages I have to include to 
>>> enable them.
>>>
>>> Any pointers are very welcome.
>>>
>>> Thanks
>>>
>>> Michi
>>>
>>
> 
> 

-- 
Drs. G.P.H. Josten
Consultant



Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl


De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is

uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen,
verzoeken 
wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.

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


Mime
View raw message