Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 2009 invoked by uid 500); 16 Jun 2003 11:54:56 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 1977 invoked from network); 16 Jun 2003 11:54:55 -0000 Received: from daiquiri.bb-data.de (193.31.178.129) by daedalus.apache.org with SMTP; 16 Jun 2003 11:54:55 -0000 Received: by daiquiri.bb-data.de; id NAA14979; Mon, 16 Jun 2003 13:52:42 +0200 (MET DST) Received: from unknown(193.31.178.42) by daiquiri.bb-data.de via smap (V5.5) id xma014901; Mon, 16 Jun 03 13:51:49 +0200 Received: from el-presidente.bb-data.de (localhost [127.0.0.1]) by el-presidente.bb-data.de (8.12.9/8.12.9) with ESMTP id h5GBrxVf011441 for ; Mon, 16 Jun 2003 13:54:00 +0200 (MET DST) Received: from sunrise.bb-data.de (sunrise.bb-data.de [193.31.178.37]) by el-presidente.bb-data.de (8.12.9/8.12.9) with ESMTP id h5GBruBk011404 for ; Mon, 16 Jun 2003 13:53:56 +0200 (MET DST) Received: from sysweb01.bg-sys.de ([10.49.8.52]) by sunrise.bb-data.de (Netscape Messaging Server 3.6) with ESMTP id AAA6AF3 for ; Mon, 16 Jun 2003 13:53:55 +0200 Received: from bgsysm01.bg-sys.de (localhost [127.0.0.1]) by sysweb01.bg-sys.de (8.12.2/8.12.2) with ESMTP id h5GBrfgM016231 for ; Mon, 16 Jun 2003 13:53:41 +0200 (MEST) Subject: Re: FYI: Date Input Module and date formatting To: cocoon-users@xml.apache.org X-Mailer: Lotus Notes Release 5.0.10 March 22, 2002 Message-ID: From: "Markus Schulze" Date: Mon, 16 Jun 2003 13:53:35 +0200 X-MIMETrack: Serialize by Router on BGSYSM01/BG-SYS(Release 5.0.10 |March 22, 2002) at 16.06.2003 13:53:37 MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hello, I am a little bit confused: with DateInputModule from cocoon-2.1m3-dev 2003/03/09 (@version CVS $Id: DateInputModule.java,v 1.1 2003/03/09 00:09:02 pier Exp $), which seems be the newest version, only one date-format can be passed to the XSL. It has to be specified in the tags in cocoon.xconf. Additional tags, as described by Perry Molendijk below, are not passed to the XSL. Hence: cocoon.xconf: EEE, d MMM yyyy HH:mm:ss sitemap: ... delivers the expected result. But cocoon.xconf: EEE, d MMM yyyy HH:mm:ss sitemap: delivers the "default" date formatting and not the "format-something". Did I mix up cocoon-versions or misunderstood something? Markus > "Perry Molendijk" > > For anyone trying to come to grips with input modules. Below is what you > need to do if you want to make the current date in a particular format > available in the sitemap: > > in cocoon.xconf look for: > > class="org.apache.cocoon.components.modules.input.DateInputModule" > logger="core.modules.input" name="date"/> > > and replace it with: > > class="org.apache.cocoon.components.modules.input.DateInputModule" > logger="core.modules.input" name="date"> > dd-EEE-yyyy > MM-dd-yyyy > EEE, MMM d, yyyy > EEE, d MMM yyyy HH:mm:ss Z > > > in the sitemap snippet below is an example of passing the current date as a > parameter to an XSL: > > > > > > > > > > You can replace {date:format} with {date:xxxxx} where xxxxx represents the > name of one of the tags added in cocoon.xconf. > e.g. {date:long-format} will give you a date in "EEE, d MMM yyyy HH:mm:ss Z" > format. > > From an error message I worked that the date input module must somehow use > the SimpleDateFormat, so for more information about the date formats > supported see the Java JDK docs on docs/api/java/text/SimpleDateFormat.html. Markus Schulze --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org For additional commands, e-mail: cocoon-users-help@xml.apache.org