cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hunsberger, Peter" <Peter.Hunsber...@stjude.org>
Subject RE: Multiple output streams best practices (was XMLForm & JSF)
Date Tue, 08 Apr 2003 22:27:05 GMT
Upayavira <uv@upaya.co.uk> wrote:

<snip/>

> I don't whether it would work for you (or how much work it 
> would be to follow a similar 
> approach) but the FragmentExtractorTransformer/Generator do 
> something like this.
> 
> The Transformer stores a fragment from within the stream as 
> an object in a transient 
> store (whatever that is...) and passes an ID to the next 
> stage. Then that ID is used by 
> the browser to make another request to the server, which 
> calls a pipeline beginning 
> with the Generator, which simply gets the content from this 
> transient store using the 
> ID provided. So you can generate once, but serve two 
> requests. The purpose of it 
> was for serving HTML and SVG generated in one pipeline but 
> consisting of two 
> requests, but maybe you could use it, or something inspired 
> by it. It is in the Batik 
> block.
> 
> Regards, Upayavira
> 
> now how much work you're prepared to do, but the 
> FragmentExtractingTransformer(?) does this for inline SVG 
> images. You use a 
> transformer that writes part of its stream into an entry in 
> the object model, 

Looking at this briefly it appears it would work as a base for what we need
to do.  We'd need to change the code from creating xlinks to creating
iframes but that's more or less trivial.  More difficult would be that our
extracted segments are based on hierarchy (form in form) but that also looks
doable. I'll have to think about how cache validity would be handled in our
case, it's slightly complicated, but again I believe doable. Better might be
handling from the flow, but then again I'm pondering if longer term caching
might be helpful (I think it would work ok in our case).

I had looked at this code in the past and forgotten about it, thanks for the
pointer.




Mime
View raw message