cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Williams <>
Subject Re: XSP (minus Cocoon plus SAX) success story
Date Fri, 28 Jan 2000 13:28:35 GMT
  Mike> I'd have to HTML-quote stuff ... Existing XHTML Formatters already
  Mike> do a nice job of this.

  Stefano> Sure, there are also tools like ECS ...

Okay, but the SAX event-stream model is more scalable.

On my last project, I built and used an HTML-object library very similar to
ECS. You basically build up a tree representation of the page, and then ask
it to spit itself out.  But it's a very memory-hungry approach, as you're
creating all those objects. Similar to creating a DOM, really.

In addition, the application ends up *seeming* slower (from a user point of
view), as no output is sent to the browser until you've finished building
the document-tree.

  Stefano> Simply put: what you do could be done with carefully written JSP or with
  Stefano> a special XML DTD translated into JSP.

Well, sort of.  My use of XSP is unlike JSP, in that it produces
"executable XML templates", rather than servlets, so it's not web-specific.
It's actually quite general: I'm also using it to create "templates" that
generate XML for server-to-server data exchange, where there's no HTTP

I see it more as a XSLT replacement.  That is, rather than

    {input} --producer--> {Java data} --encode--> {XML} --XSLT--> {XHTML}

I'm doing

    {XSP} --XSLT--> {template}
    {input} --producer--> {Java data} --template--> {XHTML}

It's very un-XML, I guess, as there's never any XML representation of the
raw output data.  As somebody said, it's primarily a performance detail,
but I still think it's a useful one.

  Stefano> XSP were designed to fill the holes that you are avoiding
  Stefano> yourself, so not much point to use them unless you like XSP
  Stefano> syntax more [than JSP].

I like it a lot :-)

  Stefano> Just wanted to point out that the 10-times peformance increase
  Stefano> was not due to the XSP model, but to the more general compiled
  Stefano> server pages model.

Yup ... sorry I didn't make that clear.  Still, it took Ricardo's XSP
implementation to see how easy it could be to generate Java code from XML,
using XSLT.  

And let's not limit it to server-pages ... your XSP concept is more useful
than that :-)  That is, the compile-to-Java concept is also useful for
generating dynamic XML (see above), compiled XSLT stylesheets (ala Saxon),

Mike Williams

View raw message