Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 25718 invoked from network); 27 Apr 2005 01:39:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 Apr 2005 01:39:18 -0000 Received: (qmail 3452 invoked by uid 500); 27 Apr 2005 01:39:56 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 3298 invoked by uid 500); 27 Apr 2005 01:39:55 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 3283 invoked by uid 99); 27 Apr 2005 01:39:55 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from sccrmhc13.comcast.net (HELO sccrmhc13.comcast.net) (204.127.202.64) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 26 Apr 2005 18:39:54 -0700 Received: from [192.168.0.10] (pcp01790620pcs.anaprd01.md.comcast.net[68.48.143.78]) by comcast.net (sccrmhc13) with ESMTP id <20050427013904016002slc0e>; Wed, 27 Apr 2005 01:39:04 +0000 Message-ID: <426EED31.60407@chrismaloney.com> Date: Tue, 26 Apr 2005 21:38:57 -0400 From: Chris Maloney User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Re: Getting current date in Cocoon References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hey, I just figured out how to do this yesterday! In your sitemap, put in a transformer in your pipeline like this: Then, in your XSLT, declare the parameter: . . . . . . You might find that you want to change the format that the date appears in. To do that, edit your cocoon.xconf file (which, if you're like me, and running the installed web-app, is in $COCOON_HOME/build/webapp/WEB-INF). Search for "DateInputModule". Inside the "component-instance" element, uncomment the "format" element child, and change the format string, the syntax of which is defined here: http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html. Now, what I'd like to know is, is there any way to use this module to get different peices of the date (say, month and day, as separate parameters). That seems to me that that would be easier than trying to parse the date within XSLT. Cheers! Schultz, Gary - COMM wrote: >Thanks for the link. Unfortunately the documentation and examples on >DateInputModule are weak. I will experiment and write a wiki page if I get >something that works. > >-----Original Message----- >From: Tony Collen [mailto:colle006@umn.edu] >Sent: Tuesday, April 26, 2005 1:21 PM >To: users@cocoon.apache.org >Subject: Re: Getting current date in Cocoon > > >Gary, > >There's a DateInputModule that you could use to inject the current date >into pipelines. > >http://cocoon.apache.org/2.1/userdocs/concepts/modules-ref.html#DateInputMod >ule > > >HTH, > >Tony > >Schultz, Gary - COMM wrote: > > >>I'm trying to get the current date to compare against a Dublin core meta >> >> >tag > > >>value. I can do this with JavaScript and PHP, but I would like to do this >> >> >in > > >>Cocoon. Is there any way to get the current date in Cocoon and use it to >>compare against an element attribute value. I know enough about XSP, XSLT, >>etc to do the comparison. I just need to know if I can get the current >> >> >date. > > >> >>Gary T. Schultz >>Web Administrator / GIS Coordinator >>Wisconsin Department of Commerce >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org >>For additional commands, e-mail: users-help@cocoon.apache.org >> >> >> > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org >For additional commands, e-mail: users-help@cocoon.apache.org > >--------------------------------------------------------------------- >To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org >For additional commands, e-mail: users-help@cocoon.apache.org > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org