cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hunsberger, Peter" <Peter.Hunsber...@stjude.org>
Subject RE: [C2.1-CVS] About XSP
Date Wed, 25 Sep 2002 21:24:36 GMT
> I know that XSP is not only attached to Java, there are implementation of
XSP 
> using perl, for example AxKit. And into Cocoon there are impletations in 
> Java, Javascript and Python.
> 
> The 2 question is hw about performance? What of both makes it faster?

Sorry, can't help you there.  I should have probably stated the issue more
like "the procedural languages currently implemented for XSP are not
specialized for handling XML"...

>> Putting point two differently: XSLT is designed specifically for
>> manipulating XML. Java is a general programming language not at all
>> specialized for handling XML, XSP only partly bridges the gap.
>
> Maybe yes, but into the apache website there is writen they recomend the
use 
> of XSP to create and update data in a database while the use XSLT to
retrieve 
> it.

That sounds like a good division of labor.  The alternative is to either use
XSLT extensions (again somewhat proprietary) or do everything in an action
handler, which necessitates Java in any case and has it's own
maintainability issues. In our case, all data is managed through EJBs and a
proxy layer already exists.  As such, doing database manipulation from an
action handler is relatively straight forward and transparent.  We do use
XML and XSLT to run validation rules on the data before forwarding it on to
the EJBs.  This is managed by the action handler running a transform under
the covers.  This is one area in which I consider Cocoon to be a little
weak: you really need to be able to run a transform as an action handler
directly from the pipeline.  I've been starting to look at what it would
take to make this happen; in general I keep coming back to making the whole
pipeline a transform that includes other transforms; the pipeline transform
being passed the current context as an XML nodeset. 

A third possibility exists which is the Castor transformer approach.
Haven't had time to explore it but it has some appeal from a theoretical
point of view.

> My approach is use the 2 techologies. I am not against XSLT since I use it

> after the XSP generator give to the pipeline the data. Mainly to make some

> changes with custom a XSL to prepare the aoutput before the serializer
makes 
> the endwork.

Again, that seems like a good way to separate concerns.  In particular you
might want to see if you can make your XSP/XSLT pipeline such that the XSLT
could, in theory, work with the same XML generated some other way (than the
XSP).


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message