cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edwin Glaser <>
Subject Re: cocoon performance
Date Sat, 08 Apr 2000 17:20:17 GMT

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. But porting will
be hard until we get a standard for extention elements.

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.

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"/>

 <xsl:apply-templates select="$content" mode="render-content"/>


At first, this template looks strange. 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. I have no idea how to merge this
kind of producers with the sitemap approach. But I think as soon as we
find a solution, we will get the next generation of XML tools but one.

Edwin Glaser --

View raw message