cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Horsfield, Peter A." <peter.horsfi...@ngc.com>
Subject RE: implementing blobserializer
Date Fri, 26 Sep 2003 16:38:15 GMT
Warning: Random musings contained herein

> Surely cocoon does not send anything to the browser before the whole 
> pipeline is finished anyway..
No no! That is exactly what Cocoon does! 

What if something like this could be done:

<map:pipeline internal-only="true">
	<map:match type="getdata">
		<map:generate type="binarydatagenerator" />
		<map:transform />
		<map:serialize type="my-raw-serializer" />
	</map:match>
</map:pipeline>

<map:pipeline>
	<map:match type="dynamicmime">
		<map:read src="cocoon:/getdata" type="my-custom-reader" />
	</map:match>
</map:pipeline>

Here you would be responsible in your custom reader to perform the reading
from the internal pipeline - but perhaps you could then prebuffer from the
getMimeType() method. 

You'd be stuck buffering the whole document, but at least you'll
only be dealing with a couple of streams.

Well, I reiterate: the above is just a thought.

Good luck,

Peter

-----Original Message-----
From: Jorg Heymans [mailto:jh@domek.be]
Sent: Friday, September 26, 2003 11:39 AM
To: users@cocoon.apache.org
Subject: Re: implementing blobserializer


I see :) , or rather :(

ok, imagine you're using the cocoon generate-transform-serializer 
paradigm to generate and transform *binary* content, that's right not 
XML but binary, using the XML as some sort of control-language to steer 
how the different binary transformations are done. Then it would make 
perfect sense only to be able to determine the mimetype all the way at 
the end of the pipeline  (think image transformations for example).. 
hence my question.. 
So I can't setup a pipeline with flow, selectors or matchers if i don't 
know until the very last moment in the pipeline which type of content 
i've been handed by the last step in the pipeline

Surely cocoon does not send anything to the browser before the whole 
pipeline is finished anyway.. Is this patcheable then? Has anyone 
thought about this apart from 
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=105820669312803&w=2

Jorg
Geoff Howard wrote:

> Jorg Heymans wrote:
>
>> Hi,
>>
>> I have seen various threads slightly related to this but didn't find 
>> a conclusive answer (yes or no to the following question will do tnx)
>>
>> Using cocoon 2.0.4 :
>> Can one set the mimetype of a custom serializer dynamically ? My 
>> research indicates that the getMimeType() of a class extending 
>> AbstractSerializer is called sometime during pipeline setup, so 
>> setting the mimetype during processing of the SAX events in the 
>> serializer does not help.
>>
>> (if not, is it possible in 2.1?)
>
>
> I think you're exactly right, and is the same in 2.1 and likely to be 
> always this way.  You can influence it at pipeline setup time by 
> selecting different serializers with matchers, selectors, actions and 
> in 2.1 flow.
>
> Geoff
>
>
> ---------------------------------------------------------------------
> 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