cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Engelhart <mengelh...@earthtrip.com>
Subject Re: Happy to be wrong!
Date Fri, 28 Jan 2000 17:27:30 GMT
Stefano Mazzocchi wrote:

> (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();
> }
> }
> 
> or
> 
> <?xml version="1.0"?>
> <p>Good [Morning|Afternoon]</p>
> 
> depending on what "mode" of operation we choosed: interpretation or
> compilation.
> 
> 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.

I'm not sure how you can skip over XSLT transformation by creating a
producer.  The XSP generated code I've looked at just adds a PI to tell the
output what xsl sheet to use for transformation, right??  Isn't this exactly
how XSP works today?

Mike


Mime
View raw message