cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <>
Subject Re: Happy to be wrong!
Date Fri, 28 Jan 2000 11:43:53 GMT
Pierpaolo Fumagalli wrote:
> This is the "real" answer...
> Stefano Mazzocchi wrote:
> >
> > Have you ever been happy to be wrong?
> Nope... :) It makes me feel like a dork :)

You _are_ a dork, that's why :)
 > [...]
> > The only concern I had, was still performance: how can EXSLT work faster
> > than a compiled server page? simple, it can't.
> That's the point...


> > A smart E-XSLT engine should _not_ perform stylesheet compilation (which
> > may be helpful but no that much), but do _page_ compilation. Let's look
> > again:
> >
> >  XML -EXSLT-> Java -javac-> producer -execution-> XML
> >
> > so, if we evaluate the two with what Cocoon does today we get
> >
> >  -EXSLT-> := -XSLT-taglibs-> XSP -XSLT->
> >
> > which makes XSP totally useless since it's just a step between XSLT
> > transformations.
> You basically apply the transformation and THEN compile the resulting
> XML... Did I get it right????

No. That way you come up with a compiled static page.

Ok, suppose you have a page like this

 <p>Good <time:time-of-day/></p>

where time: is your taglib and gets executed as

 (hour <= 12) ? "morning" : "afternoon"

(don't look at the logic that sucks)

the EXSLT output could be either

 public class Producer {

   int hour = new Date().getHour();

   void producer (request, response, handler) {
       handler.content("Good ");
       handler.content((hour <= 12) ? "morning" : "afternoon");


 <?xml version="1.0"?>
 <p>Good [Morning|Afternoon]</p>

depending on what "mode" of operation we choosed: interpretation or

See how, in the first case, execution of that class alone, once compiled
into bytecode, totally skips xml parsing and xslt transformation,
resulting in a much faster execution.

Note that "compilaton mode" is exactly what XSP is today, and
"interpretation mode" is what EXSLT should be. But it's an
implementation detail (even if a big one) to trigger one behavior or the
other, not a design decision.

That is the point where I was wrong.

Still, the implementation details are a nightmare, but since we already
have a working XSP implementation, it could not be that bad... but I
this point, I can't really tell and I'm happy to have others taking care
of this :)

> I still have to figure out HOW it's possible (from the implementation
> point of view) but I believe it's possible...

It's time for the "XSLT" folks to come up with something about this :)

Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<>                             Friedrich Nietzsche
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------

View raw message