You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Michael Wechner <mi...@wyona.com> on 2005/09/29 12:19:24 UTC
zip and jar source
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
--
Michael Wechner
Wyona - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
michael.wechner@wyona.com michi@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: zip and jar source
Posted by Bertrand Delacretaz <bd...@apache.org>.
Le 29 sept. 05, à 12:19, Michael Wechner a écrit :
> ...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...
I *think* the jar protocol is not provided by Cocoon, but by the JVM:
http://docs.sun.com/source/819-0913/author/jar.html says "The JavaTM 2
SDK implements a protocol for referring explicitly to files within JAR
files...."
So, maybe some VMs have the zip protocol and some others don't?
I'm only guessing, though ;-)
-Bertrand
Re: zip and jar source
Posted by Michael Wechner <mi...@wyona.com>.
Geert Josten wrote:
> 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
you are right, indeed.
I put them into Lenya directly and it compiles very fine and now it
also works very fine. I will start another thread about putting these
two classes back into Cocoon, because it seems to me they are very useful
and I guess a lot of people would like to render OpenDocument(s) through
Cocoon.
Thanks again for your help
Michi
>
> 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
>>>>
>>>
>>
>>
>
--
Michael Wechner
Wyona - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
michael.wechner@wyona.com michi@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: zip and jar source
Posted by Geert Josten <Ge...@daidalos.nl>.
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
Re: zip and jar source
Posted by Michael Wechner <mi...@wyona.com>.
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
>>
>
--
Michael Wechner
Wyona - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
michael.wechner@wyona.com michi@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: zip and jar source
Posted by Geert Josten <Ge...@daidalos.nl>.
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]
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