Return-Path: Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 76407 invoked from network); 29 Feb 2000 19:54:33 -0000 Received: from stanley.thebunker.net (193.115.128.4) by locus.apache.org with SMTP; 29 Feb 2000 19:54:33 -0000 Received: (qmail 21532 invoked from network); 29 Feb 2000 20:24:19 -0000 Received: from unknown (HELO aldigital.co.uk) (172.16.1.3) by 172.16.254.254 with SMTP; 29 Feb 2000 20:24:19 -0000 Message-ID: <38BC22D8.36278C78@aldigital.co.uk> Date: Tue, 29 Feb 2000 19:49:44 +0000 From: Phil Lanch Organization: A L Digital X-Mailer: Mozilla 4.61 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: cocoon-users@xml.apache.org Subject: Re: Best approach to display calendar References: <91E0EC9A2996D311A59C0050DA2E0A1C03CFC8@BARILOCHE> <38BB222E.7A9BAE04@synctank.com> <008601bf82da$673b8aa0$397bf8d0@velos.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Steve Belt wrote: > > I am trying to use Cocoon to display a calendar using an XML provided by my > database. I would like to display the events, in HTML, formatted as you see > in most scheduling applications (Table listing all hours of the day, then > showing events, if any, in the adjoining cell). I can create an XSL which > will create a table row for each event, however, I do not know how I can > display hours and cells which have no events to them. The XSL examples I can > find, in a manner of speaking, are "triggered" by elements in the XML; I, on > the other hand, need to display tags > > As I read through the documentation on Cocoon, I see several possible > choices: > > I could manipulate my XML to match my calendar - ie, include nodes for > hours that do not have events. However, this makes my XML less generic. just so. > I could use XSP to manipulate the original XML to insert the empty nodes, > but I am not fluent in XSP, and am having trouble seeing how to do this. me too - but i don't know much about XSP. > Finally, perhaps this can all be handled by the XSL. However, as you can no > doubt tell, I still have much to learn, and I cannot find any examples which > show me how to accomplish this. Also, I want to be able to change my time > intervals - ie 1-cell/hour, or 1-cell/half-hour, etc i'd do it this way. to "iterate" over 0 to 23 hrs (or 9 to 17 ...) when not all those numbers are in the source doc, XSL has to use a tail-recursive named template. when the s are children of the current node, you can say- -to call something like this template- hrs -and that calls an when an event with the right time is found - assuming s contain