Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 39917 invoked by uid 500); 31 Aug 2001 14:42:55 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 39847 invoked from network); 31 Aug 2001 14:42:54 -0000 From: Stefan Koehler To: cocoon-dev@xml.apache.org Subject: Re: [C2 proposal] Alternative to XSP Date: Fri, 31 Aug 2001 16:42:51 +0200 X-Mailer: KMail [version 1.1.99] Content-Type: text/plain; charset="us-ascii" References: <20010829103945.87261.qmail@web12801.mail.yahoo.com> <01083011480102.00795@pitti> <3B8E7BA5.91720C43@levigo.de> In-Reply-To: <3B8E7BA5.91720C43@levigo.de> MIME-Version: 1.0 Message-Id: <01083116425104.00795@pitti> Content-Transfer-Encoding: 8bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Joerg, > True, the exception handling is currently sub-par. It's currently high on > my to-do list :-) At least you could simply pass exceptions from SAXLet methods to the logger as second parameter. > > > > What they (currently) can't do: > > > > > > - they can't be nested within one another because the SAXLet processor > > > doesn't know anything about the semantics of a SAXLet element. Thus > > > contained SAXLet elements would simply be passed to the containing > > > SAXLet element's method. > > > > This is a serious restriction. Perhaps nesting could be realized by not > > passing Configuration objects directly but a subclass which calls the > > SAXLet processor for childs that reference SAXLet methods (only a > > thought). > > I like the idea. It's similar to what JSP does and the need to pass this > object can be determined by looking at the method's signature. However, I > think the DefaultConfiguration has the restriction that it does not support > element content and children at the same time. Therefore we'd need > something else. Do you mean something like this: Some content as argument Whatever else. had to be substituded with something like that: Some content as argument Whatever else. ? > Do you have any ideas on the semantics of this approach? Doing thinks like > mixing random XML with field data from an SQL query in a loop would be > fairly straight forward (just making this up): > > > > > > > > > > But this could also be solved with simple XSLT operations. What more could > there be? You're right, this can be done with XSLT. I currently have no relevant example for loops like this in mind. But can you take the result from one query to build another one? Imagine a SAXLet which renders a person by name (for example from database) as XML. You could want to nest SAXLets like this: So the inner SAXLet has to be processed first and the result it is passed to the outer one. Maybe conditionals could be realized this way: Value xy is not allowed. You've chosen but this won't work because you cannot mix content and elements :-( > > An optional mapping could be cool because the build-in mapping is not > > always optimal. I think of simple methods returning a scalar or an array > > where you don't want tag names like > > 1 > > 2 > > 3 > > to be generated. But one could also call element("element", value) in a > > loop easily so maybe that's not really a problem. > > The scalar results may be useful (and I agree with your second email: the > enclosing elements for scalar results should probably done away with), > regarding the arrays I'm not so sure. The reason I implemented the array > style is that one can access standard bean getters which return arrays this > way. I agree that in order to make this feature really useful, a > configurable mapping would be ideal. That's what I wanted to say. Castor does actualy something similar http://castor.exolab.org/xml-mapping.html. > Joerg Henne > > --------------------------------------------------------------------- > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org > For additional commands, email: cocoon-dev-help@xml.apache.org -- Stefan K�hler mailto:stefan.koehler@interface-projects.de --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org