cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicola Ken Barozzi" <nicola...@supereva.it>
Subject Re: Forms proposal
Date Sun, 09 Jul 2000 08:57:48 GMT
----- Original Message ----- 
From: "Stefano Mazzocchi" <stefano@apache.org>

> Mark Washeim wrote:
> > 
> > on 7/7/00 8:45 pm, Stefano Mazzocchi at stefano@apache.org wrote:
> > 
> > > Mark Washeim wrote:
> > >>
> > >> on 7/7/00 12:42 pm, Stefano Mazzocchi at stefano@apache.org wrote:
> > >>
> > >>> Giacomo Pati wrote:
> > >>>>
> > >>>> --- Jeremy Quinn <jeremy@media.demon.co.uk> wrote:
> > >>>>> At 20:18 +0200 05/07/00, Giacomo Pati wrote:
> > >>>>>>> Will such TagLibs work in C2?
> > >>>>>>>
> > >>>>>>> Or will they all have to be re-coded for SAX?
> > >>>>>>
> > >>>>>> If you use XSP internal stuff like
> > >>>>>>
> > >>>>>> xspParentNode = xspCurrentNode;
> > >>>>>> xspNodeStack.push(xspParentNode);
> > >>>>>> xspCurrentNode = document.createElement("tr");
> > >>>>>> xspParentNode.appendChild(xspCurrentNode);
> > >>>>>>
> > >>>>>> then I think yes it must be recoded.
> > >>>>>
> > >>>>> Oh dear! :)
> > >>>>> Jeez, it's taken me long enough to get my head around doing
this in DOM :)
> > >>>>
> > >>>> I don't know if you must use DOM. With SAX I feel it's like doing
> > >>>>
> > >>>> this.contentHandler.startElement("", "title", "title", xspAttr);
> > >>>> xspAttr.clear();
> > >>>> this.characters("A Simple XSP Page");
> > >>>> this.contentHandler.endElement("", "title", "title");
> > >>>
> > >>> How many times to I have to tell you people? If you are coding something
> > >>> about SAX or DOM _by_hand_ you'll have troubles.
> > >>>
> > >>> Gee, XSP was created to allow you guys to _avoid_ learning SAX or DOM.
> > >>> Tell me: why is it so hard to use?
> > >>
> > >> Well, I agree in principle. However, there are cases where, though I NEVER
> > >> use the nodestack directly, I DO need to create elements (that is, use
the
> > >> document as a factory to create child elements, etc). In fact, it's an
> > >> obvious requirement for many things the tag-lib author needs to do all
the
> > >> time (ie, consistant reporting of errors, for which I use a util class
to
> > >> append a child node with an explicit, content derived, error message....)
.
> > >> . .
> > >
> > > Give me an example of this.
> > >
> > > If the XSP is limited, we have a design bug, otherwise, we just have to
> > > write more documents.
> > >
> > 
> > XSPCookieLibrary.java
> > 
> > is an example of this. :)
> > 
> > I simply meant to say that, though the pages themselves (xsp or tag-lib
> > xlt)may not require direct manipulation, I certainly do want to be able to
> > do somethings (for instance, iterate through the nodes of a
> > util:include-file included document) and be able to treat those nodes (ie,
> > append values). To do so, I need to manipulate the DOM (eventually sax event
> > stream), directly. Or? I mean, I'm attempting to isolate end-users by
> > writing tag-libs (for instance, producing filterd views of the file system)
> > but often need to manipulate the results . . .
> 
> Hmmm, I wonder if SiLLy can simplify all this... going to talk to
> Ricardo about this soon anyway.. he'll be in Italy next week :)
> 

Imo, it seems as if something is missing in Cocoon...
We have (C1) producers, processors and formatters, which are java classes.
Then we have equivalent elements that have the same functions, only easier to
use: XSP, XSLT, XSL(?).
Basically there are three types of "interfaces": input, "pass it on" and output.
--producers: input-"pass it on"
--processors: "pass it on"-"pass it on"
--formatters: "pass it on"-output

Now, if someone wants to manipulate nodes programmatically in XSP, he
is creating a producer that functions like a processor !

Then what about XSStylesheets?
I would love to be able to write "XSP style" stylesheets.

I read that you can't do everything with XSLT; this isn't yet true for what
I am doing, but certainly XSLT is not allways as fast as you could get
with custom code.

And Xalan extensions?

Ken

Nicola Ken Barozzi - AISA Industries S.p.A
http://www.aisaindustries.it/
Via Leonardo da Vinci,2 Ticengo (CR) Italy
Personal homepage at Java Guru:
http://www.jguru.com/jguru/guru/viewchannel.jsp?EID=39153
Personal FAQ at Java Guru:
http://www.jguru.com/jguru/guru/viewfaqs.jsp?EID=39153
Research Activity:
Politecnico di Milano - Dipartimento di Meccanica
Piazza Leonardo da Vinci, n.32 - 20133 Milano (Italy)



Mime
View raw message