You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "keith d. zimmerman" <li...@kdz13.net> on 2004/05/11 22:31:58 UTC

source writer transformer

Ok, as has been suggested, simple questions, single question per e-mail.

Can I do this?

Http Generator
Transformer to basically aquire a particular <img> tag within the doc.
something or the other to go "get" the image
source writing transformer to store the image on disk
<img> tag with src= pointing to the cached copy in the resulting xhtml doc.

thanks,
-kz

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


Re: source writer transformer

Posted by "keith d. zimmerman" <li...@kdz13.net>.
Joerg Heinicke wrote:

>>> It does not sound undoable. You want to rewrite the original document 
>>> and replace the original image references with references to your 
>>> stored images? And using Cocoon as proxy only (for xhtml *and* 
>>> images) and letting the rest be done by caching does not help? The 
>>> latter sounds easier to implement.
>>>
>>
>> Eh, it'd work fine if i knew where cocoon stores the images.  I want 
>> to archive them, then....
> 
> 
> So you need more than a simple caching of the images or what does 
> "archive" mean? You should not assume to have access to the cache, you 
> would need another approach then.
> 
> But Cocoon is not for handling images/binary data, so it's for example 
> not possible to use the source writer transformer. Something that 
> *might* work is the usage of PipelineUtil.processToStream() in 
> flowscript, with a pipeline containing a reader reading the remote 
> image, and handling the storage on disc by the flowscript.
> 

well, it's for comic strips.  I have an existing "solution" in perl, but 
it's slow/ugly/hard to modify, thought it would be fun to move.  The 
sites only give a month of history; i sometimes like to look back, ya know?

Anyway, I was afraid of this.  Probably the thing to do is to use cocoon 
to write the main stuff, but make an action in java to actually fetch 
the image.  Thanks, though for your help.

-kz

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


Re: source writer transformer

Posted by Joerg Heinicke <jo...@gmx.de>.
On 13.05.2004 15:05, keith d. zimmerman wrote:

>>> Ok, as has been suggested, simple questions, single question per e-mail.
>>>
>>> Can I do this?
>>>
>>> Http Generator
>>> Transformer to basically aquire a particular <img> tag within the doc.
>>> something or the other to go "get" the image
>>> source writing transformer to store the image on disk
>>> <img> tag with src= pointing to the cached copy in the resulting 
>>> xhtml doc.
>>
>> It does not sound undoable. You want to rewrite the original document 
>> and replace the original image references with references to your 
>> stored images? And using Cocoon as proxy only (for xhtml *and* images) 
>> and letting the rest be done by caching does not help? The latter 
>> sounds easier to implement.
>>
> 
> Eh, it'd work fine if i knew where cocoon stores the images.  I want to 
> archive them, then....

So you need more than a simple caching of the images or what does 
"archive" mean? You should not assume to have access to the cache, you 
would need another approach then.

But Cocoon is not for handling images/binary data, so it's for example 
not possible to use the source writer transformer. Something that 
*might* work is the usage of PipelineUtil.processToStream() in 
flowscript, with a pipeline containing a reader reading the remote 
image, and handling the storage on disc by the flowscript.

Joerg

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


Re: source writer transformer

Posted by "keith d. zimmerman" <li...@kdz13.net>.
Joerg Heinicke wrote:
> On 11.05.2004 22:31, keith d. zimmerman wrote:
> 
>> Ok, as has been suggested, simple questions, single question per e-mail.
>>
>> Can I do this?
>>
>> Http Generator
>> Transformer to basically aquire a particular <img> tag within the doc.
>> something or the other to go "get" the image
>> source writing transformer to store the image on disk
>> <img> tag with src= pointing to the cached copy in the resulting xhtml 
>> doc.
> 
> 
> It does not sound undoable. You want to rewrite the original document 
> and replace the original image references with references to your stored 
> images? And using Cocoon as proxy only (for xhtml *and* images) and 
> letting the rest be done by caching does not help? The latter sounds 
> easier to implement.
> 

Eh, it'd work fine if i knew where cocoon stores the images.  I want to 
archive them, then....

-kz

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


Re: source writer transformer

Posted by Joerg Heinicke <jo...@gmx.de>.
On 11.05.2004 22:31, keith d. zimmerman wrote:

> Ok, as has been suggested, simple questions, single question per e-mail.
> 
> Can I do this?
> 
> Http Generator
> Transformer to basically aquire a particular <img> tag within the doc.
> something or the other to go "get" the image
> source writing transformer to store the image on disk
> <img> tag with src= pointing to the cached copy in the resulting xhtml doc.

It does not sound undoable. You want to rewrite the original document 
and replace the original image references with references to your stored 
images? And using Cocoon as proxy only (for xhtml *and* images) and 
letting the rest be done by caching does not help? The latter sounds 
easier to implement.

Joerg

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