cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierpaolo Fumagalli <p...@apache.org>
Subject Re: Happy to be wrong!
Date Fri, 28 Jan 2000 22:08:32 GMT
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 :)

Thanks :) (moron!)

> > 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.startDocument();
>        handler.createElement("p");
>        handler.content("Good ");
>        handler.content((hour <= 12) ? "morning" : "afternoon");
>        handler.closeElement("p");
>        handler.endDocument();
>    }
>  }

That's what I was thinking... Exactly that...

> or
> 
>  <?xml version="1.0"?>
>  <p>Good [Morning|Afternoon]</p>
> 
> depending on what "mode" of operation we choosed: interpretation or
> compilation.

Exactly... Yes... that's what I meant when i said "apply the
transformation"... I should have said "transform it into a java source",
sorry :)(

> 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.

Yep yep... That's what I was saying...

> 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.

Agreed....

> 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 :)

:) you lazy boy :)

> > 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 :)

(just to let you all know) I AM NOT AN XSLT FOLK :)

	Pier

-- 
--------------------------------------------------------------------
-          P              I              E              R          -
stable structure erected over water to allow the docking of seacraft
<mailto:pier@betaversion.org>    <http://www.betaversion.org/~pier/>
--------------------------------------------------------------------
- ApacheCON Y2K: Come to the official Apache developers conference -
-------------------- <http://www.apachecon.com> --------------------

Mime
View raw message