From balld@phoenix.webslingerZ.com Thu Feb 3 07:49:07 2000 Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 88192 invoked from network); 3 Feb 2000 07:49:07 -0000 Received: from phoenix.webslingerz.com (balld@206.66.49.24) by 63.211.145.10 with SMTP; 3 Feb 2000 07:49:07 -0000 Received: from localhost (balld@localhost) by phoenix.webslingerZ.com (8.8.7/8.8.7) with ESMTP id CAA26148 for ; Thu, 3 Feb 2000 02:44:45 -0500 Date: Thu, 3 Feb 2000 02:44:45 -0500 (EST) From: Donald Ball To: cocoon-dev@xml.apache.org Subject: Re: flaws in XSP implementation PLUS sql taglib features discussion In-Reply-To: <005401bf6d4e$a65db920$23222cd5@cdgco.fr.dhl.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 1 Feb 2000, Luis Arias wrote: > ----- Original Message ----- > From: Donald Ball > To: Cocoon > Sent: Monday, January 31, 2000 10:20 PM > Subject: flaws in XSP implementation PLUS sql taglib features discussion > > > > > > article > > > > select id,name,subject_id from article_table > > > > > > select name as subject_name from subject_table where id = > > > > > > > > > > > > > > Hi, > > I was just wondering why you were thinking of using an "all-xslt" approach > to this ... Wouldn't it be better for this type of problem to have another > separate mechanism in your taglib that allows you to keep the current row in > the outer result set around for this type of purpose ? That way if you > could refer to previous result set columns by automagically having them > bound to some name. > > For instance, taking up on your example : > > > article > > select id,name,subject_id from article_table > > > select name as subject_name from subject_table where id = > > > > > > > (Here "first.id" refers to the id column in the result set "of query > "first", of course, and not the "id" attribute in the xml tag.) > > Am I missing something big here ? I'm not exactly sure - I'm not relying on XSLT in any way here except in my choice of element names. The only real difference between your syntax and my own is my is replaced by (and of course the id attributes in the query elements) sql:value-of isn't an element in the XSLT namespace, but an element in the SQL namespace. I deliberately chose the element's name to be similar to the XSLT element, but I was under the impression that I'd have to write my own code to do the value-of lookup routine as I don't see how I could rely on XSLT (or more generally speaking, an XPath, uh, resolver) to do it for me. Mind you, if I could, I'd be inclined to do so, but I really can't visualize a clean way to do so. Assuming that's correct, I think I like your syntax better. Thanks. If I can tackle the namespace prefix problem, we'll see how well it works in practice. - donald