cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <>
Subject Re: cocoon performance
Date Sat, 08 Apr 2000 23:37:50 GMT
Edwin Glaser wrote:
> Hello,
> Stefano Mazzocchi wrote:
> >> Will it be possible, with Cocoon 2, to begin to send data to the client before
> >> "processing" (XSP, XSLT, XSL ...) is finished ? (with SAX, if I've understood)
> >in theory, yes.
> > in practice, you need an incremental XSLT and none are available, but
> > this is not something I can control :(
> Hmmm, it can be done with an ordinary XSLT processor.

I can't see how.

> But porting will be hard until we get a standard for extention elements.

This will happen soon, for what I've heard from the people inside the
> If you put a producer into an extention element or an extention function,
> that returns a node-set, you can do it in one pass. If this node-set
> uses a lazy-evaluation strategy, you will be able to render the output,
> while the producer is still working. Arkin suggested to implement such
> a thing on top of the castor package.

Careful. You are talking about a producer... we are talking about XSLT
processors. Big difference.
> Your stylesheet may include templates like this one:
> <xsl:include "render-content.xsl"/>
> <xsl:template match="content[@id]">
>   <xsl:variable name="content">
>     <cocoon:generator type="sql" connection="foo_connection">
>       select * from foo_table where id = <xsl:value-of select="@id"/>
>     </cocoon:generator>
>   </xsl:variable>
>  <xsl:apply-templates select="$content" mode="render-content"/>
> <xsl:template>
> At first, this template looks strange. 

well, it is very close to pattern that XSP use with taglibs. (some say
it's the exact same thing and should be combined)

> But as soon as you get used to it,
> the combination of extention elements with the apply-templates builtin
> becomes a very powerful design pattern. 

Totally, the only problem is that unless used very carefully, XSLT
extentions tend to be interpreted at run-time... instead of being
compiled inside the page as a generator.

> I have no idea how to merge this
> kind of producers with the sitemap approach. 

you mean xslt extentions? I see no difference from a normal stylesheet.

> But I think as soon as we
> find a solution, we will get the next generation of XML tools but one.

Still I don't understand how you can do just-in-time xslt
transformations without writing a carefully designed processor for doing
that. But I'm probably missing your point.

Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<>                             Friedrich Nietzsche
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------

View raw message