cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From HGENTO <h-gen...@freenet.de>
Subject Re: unpack/unizp a complete zip file?
Date Tue, 29 May 2007 20:23:53 GMT
Hi Geert Jorsten,

thank you for your detailed explanation. But now I'm a little but 
confused ;-) I'll try to set up an action but at the moment struggling 
with some .tmp files issues. So therefore I would also like to try your 
why as it sound very good but on the other way a little bit confusing. 
Hopefully I can ask you few questions to this to fully understand. I 
know how transformer work ad at the end i only need and xml file 
containing the information in the way the transformer needs for writing. 
So far so good _but: how can I receive the directory and files as well 
as all subdirectory and subfiles within the zip file I want to extract?_ 
And the second question will be, how I have to set this instruction in 
the xml file, that contains the save information. cocoon wiki only tells me

<save:file
        src="mySourceUrl"
        target="myTargetFileName"
        xmlns:save="http://daidalos.nl/cocoon/save/1.0" />

I_n what kind of why I have to set the src attribute, as at the end it has to read the files
and folder within the zip file?_
Perhaps you can give me another hint ;-) Hopefully, H.

Geert Josten wrote:
> Hi,
>
> It was a rather short and quick answer, but yes, depending on the
> component that extracts the files and writes them, it is in principle
> possible to extract all types of files. SourceWriting component however
> uses XML/DOM as intermediate, so that component is unuseable as it is.
> (At least how it was around versions 2.1.4 - 2.1.6..)
>
> The SaveFiles transformer however is exactly written for this task. It
> doesn't cache anything, it redirect an inputstream to an outputstream
> internally and is therefore capable of handling binary. Only the outcome
> (fail or success) is passed to cocoon as xml. More about it on wiki:
> http://wiki.apache.org/cocoon/SaveFilesTransformer
>
> My zipsource produces on long xml with the full contents. One xsl pass
> converts this to savefiles instruction sheet, just a long list of
> save:file elements with a src and a target attribute. These can be
> processed in a single pass with the transformer. The end result of this
> transform can be used to produce a fail/success report.
>
> One final note on Cocoon Actions, the alternative on which Joerg
> Heinicke responded:
> be aware of the moment on which actions are executed. Regardless of
> where they are called within a request-chain, they are always executed
> _before_ the actual processing in a pipeline. This is only important if
> you intend to process the files with the same request that also extracts
> the files. It might be very useful, but can be a bottle-neck just as
> easily.
>
> Kind regards,
> Geert
>
>   
>> -----Original Message-----
>> From: HGENTO [mailto:h-gent-o@freenet.de] 
>> Sent: vrijdag 25 mei 2007 15:59
>> To: users@cocoon.apache.org
>> Subject: Re: unpack/unizp a complete zip file?
>>
>> Thank you for your answer ,
>>
>> but I'm a little bit confused, would this methode also work, 
>> if the zip file contains not only xml-files but also 
>> pictures. For example ein Open Document Writer file. I would 
>> like to have a methode where I can unpack the full odt files.
>>
>> Best regards,
>> H.
>>
>> Geert Josten wrote:
>>     
>>> Hi,
>>>
>>> I extended the ZipSource component to accept zip-protocol patterns 
>>> without the addition of special files. But the Source is 
>>>       
>> supposed to 
>>     
>>> produce content and you cannot produce the literal zip 
>>>       
>> contents, so I 
>>     
>>> chose to produce a dir-listing of the zip. I use that to 
>>>       
>> generate new 
>>     
>>> zip-url's that exhaustingly point to all files inside zip. 
>>>       
>> Processing 
>>     
>>> that list with a component like savefiles or writesource 
>>>       
>> should result 
>>     
>>> in extraction of a complete zip.
>>>
>>> HTH,
>>> Geert
>>>
>>>   
>>>    
>>>  
>>> 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
>>> KvK 27164984
>>>
>>>
>>> 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.
>>     
>>>  
>>>
>>>   
>>>       
>>>> From: HGENTO [mailto:h-gent-o@freenet.de]
>>>> Sent: vrijdag 25 mei 2007 13:52
>>>> To: users@cocoon.apache.org
>>>> Subject: unpack/unizp a complete zip file?
>>>>
>>>> Hi,
>>>>
>>>> how can I unzip a zip file with an sitemap instruction. I 
>>>>         
>> have access 
>>     
>>>> to a special file with zip:/file.zip!/file.xml but I would like to 
>>>> have an instruction to unzip the complete file.zip. Is 
>>>>         
>> there a easy 
>>     
>>>> way to do so in Cocoon 2.1.? I did't found a answer on 
>>>>         
>> wiki as well 
>>     
>>>> as apache cocoon homepage.
>>>>
>>>> Regards,
>>>> Holger
>>>>
>>>>
>>>>         
>> ---------------------------------------------------------------------
>>     
>>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>>>
>>>>
>>>>     
>>>>         
>>>       
>> ---------------------------------------------------------------------
>>     
>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>>
>>>
>>>
>>>   
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>   


Mime
View raw message