Return-Path: Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: (qmail 24940 invoked from network); 18 Nov 2005 04:27:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Nov 2005 04:27:50 -0000 Received: (qmail 35753 invoked by uid 500); 18 Nov 2005 04:22:02 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 32024 invoked by uid 500); 18 Nov 2005 04:21:36 -0000 Mailing-List: contact cvs-help@cocoon.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@cocoon.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 23059 invoked by uid 99); 18 Nov 2005 04:19:46 -0000 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 17 Nov 2005 20:17:00 -0800 Received: (qmail 8210 invoked by uid 65534); 18 Nov 2005 04:15:48 -0000 Message-ID: <20051118041548.8207.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r345438 [221/286] - in /cocoon/site/site/2.1: ./ developing/ developing/portal/ developing/portal/coplets/ developing/webapps/ developing/webapps/authentication/ faq/ howto/ installing/ plan/ plan/documentation/ plan/otherplanning/ plan/ove... Date: Fri, 18 Nov 2005 04:13:22 -0000 To: cvs@cocoon.apache.org From: crossley@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Added: cocoon/site/site/2.1/userdocs/scratchpad/date-selector.html URL: http://svn.apache.org/viewcvs/cocoon/site/site/2.1/userdocs/scratchpad/date-selector.html?rev=345438&view=auto ============================================================================== --- cocoon/site/site/2.1/userdocs/scratchpad/date-selector.html (added) +++ cocoon/site/site/2.1/userdocs/scratchpad/date-selector.html Thu Nov 17 20:00:02 2005 @@ -0,0 +1,1443 @@ + + + + + + + +DateSelector in Cocoon + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + +
+
+
+
+ +
+ + +
+ +
+ +   +
+ + + + + +
+

DateSelector in Cocoon

+ +

DateSelector

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +

NAME

+ +
+ +

date

+ +
+ +

WHAT

+ +
+ +

The DateSelector component is used to select appropriate sitemap +processing depending on the current date, and time.

+ +
+ +

TYPE

+ +
+ +

Selector, Sitemap Component

+ +
+ +

BLOCK

+ +
+ +

Scratchpad

+ +
+ +

CLASS

+ +
+ +

org.apache.cocoon.selection.DateSelector

+ +
+ +

SINCE

+ +
+ +

Cocoon 2.1

+ +
+ +

CACHEABLE

+ +
+ +

not applicable

+ +
+
+ +

Description

+
+

The DateSelector tests the current date, and time against the test +attribute of the selectors when clause.

+
+ +

Usage

+
+

The DateSelector allows to define date, and time specific sitemap +processing. This way Cocoon can do date, and time specific sitemap processing. +

+ +

Sitemap pipeline examples

+
+<map:select type="daytime">
+  <map:when test="night">
+    <!-- do something for night publishing -->
+    <map:read src="resources/{2}-night.css" mime-type="text/css>
+  </map:when>
+  <map:when test="morning">
+    <!-- do something for morning publishing -->
+    <map:read src="resources/{2}-morning.css" mime-type="text/css>
+  </map:when>
+  ...
+  <map:otherwise>
+    <!-- define for completness, and if selecting fails due to errors -->
+  </map:otherwise>
+</map:select>
+
+ +

Sitemap component configuration example

+

The following snippet defines a DateSelector named daytime. A day is +partioned into four daytime areas: night, morning, afternoon, and evening. These +daytime names are used to define daytime specific pipeline processing for each +daytime area.

+
+<map:selectors default="browser">
+  ...
+  <map:selector type="daytime" src="org.apache.cocoon.selection.DateSelector">
+    <before name="night" date="06:00:00" dateformat="HH:mm:ss"/>
+    <before name="morning" date="12:00:00" dateformat="HH:mm:ss"/>
+    <before name="afternoon" date="18:00:00" dateformat="HH:mm:ss"/>
+    <before name="evening" date="23:59:59" dateformat="HH:mm:ss"/>
+  </map:selector>
+...
+</map:selectors>
+
+ +

Configuration

+

Explain the sitemap selector configuration, options when declaring date +selector

+ +

Setup

+

Explain the sitemap selector setup, ie options when using date selector

+ +

Effect on Object Model and Sitemap Parameters

+
+ +

Bugs/Caveats

+
+

Describe limitation, bugs of DateSelector

+
+ +

History

+
+

11-28-03: initial creation

+
+ +

See also

+
+

A general documentation about selectors is available at +Matchers and Selectors.

+ +
+
+ +
 
+
+ + + Propchange: cocoon/site/site/2.1/userdocs/scratchpad/date-selector.html ------------------------------------------------------------------------------ svn:eol-style = native