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 12414 invoked from network); 25 Aug 2000 15:21:35 -0000 Received: from balld-0.dsl.speakeasy.net (HELO localhost.localdomain) (@216.254.77.75) by locus.apache.org with SMTP; 25 Aug 2000 15:21:35 -0000 Received: by localhost.localdomain (Postfix, from userid 501) id 597704810; Fri, 25 Aug 2000 11:24:26 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by localhost.localdomain (Postfix) with ESMTP id 56D2A6081 for ; Fri, 25 Aug 2000 11:24:26 -0400 (EDT) Date: Fri, 25 Aug 2000 11:24:25 -0400 (EDT) From: Donald Ball X-Sender: balld@localhost.localdomain To: cocoon-dev@xml.apache.org Subject: Re: sql xsp logicsheet design issue -Reply In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N On Fri, 25 Aug 2000, John Morrison wrote: > Donald - as far as I can tell this is a design flaw. I attempted to do > something similar last year (before you put the conversion stuff in the > sqltag lib for dates) and never managed it. Gave up completely in the > end and wrote my own taglib which queried the database. Shame. well, of _course_ it's a design flaw, i'm just trying to determine in which layer the flaw is and the best way to fix it. what do you think about the solution i outline below? - donald > >>> Donald Ball 25/August/2000 05:33am >>> > i have a design question about xsp logicsheets. i have two logicsheets, > sql and calendar. sql retrieves results from a database, and calendar > generates a calendar view. calendar's generate method can take an > argument > indicating the date around which the view should be created. i'd like for > that argument to be one of the values in the database resultset. i cannot > think of an easy way to do this using merely xsp logicsheets, but i think > it's something i ought to be able to do. > > my first avenue of attack was to insert a logicsheet between the two > that > would create the call to the calendar logicsheet from the results of the > sql logicsheet invokation. unfortunately, you can't match on the elements > created by the sql logicsheet - they're part of the result document. the > only way i can think of that'd you be able to do it would be to add > another XSLT and XSP process, which i'm loathe to do. > > is this a design flaw in the sql logicsheet, the calendar logicsheet or a > problem in general with having logicsheets that invoke other logicsheets > with arguments chosen at runtime? > > ... playing ... > > i'm leaning towards a design flaw in the sql logicsheet. rather than > approach the logicsheet itself by tossing everything into a java library, > a judicious use of xslt in the logicsheet might clear everything > up. supposing we modified the sql namespace so that you could write > things > like this: > > > ... > > > column="occurance_date"/> > > > > > that might solve the problem, and conceivable a slew of other ones. how > would we modify the logicsheet to support that? > > ... coding ... > > > > { > ... > ResultSet rs = st.executeQuery(""); > while (rs.next()) { > > > > rs.close(); > ... > } > > > > > rs.getString("") > > > would this be a good way to tackle it? > > if this is the best way to go about doing it, i can foresee one problem > right away - it's almost certainly going to bang people up against the 64k > java method limitation if it's written basically as i've laid it > out. how could we avoid that? > > - donald > > > >