Return-Path: Delivered-To: apmail-cocoon-docs-archive@www.apache.org Received: (qmail 43556 invoked from network); 12 Sep 2005 15:04:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Sep 2005 15:04:07 -0000 Received: (qmail 85978 invoked by uid 500); 12 Sep 2005 15:04:07 -0000 Delivered-To: apmail-cocoon-docs-archive@cocoon.apache.org Received: (qmail 85839 invoked by uid 500); 12 Sep 2005 15:04:05 -0000 Mailing-List: contact docs-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: docs@cocoon.apache.org List-Id: Delivered-To: mailing list docs@cocoon.apache.org Received: (qmail 85825 invoked by uid 99); 12 Sep 2005 15:04:04 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Sep 2005 08:04:01 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id F0CC829A for ; Mon, 12 Sep 2005 17:03:59 +0200 (CEST) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki To: docs@cocoon.apache.org Date: Mon, 12 Sep 2005 15:03:59 -0000 Message-ID: <20050912150359.28645.65100@ajax.apache.org> Subject: [Cocoon Wiki] Update of "DP Filtering" by KermagoretJc X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Dear Wiki user, You have subscribed to a wiki page or wiki category on "Cocoon Wiki" for change notification. The following page has been changed by KermagoretJc: http://wiki.apache.org/cocoon/DP_Filtering New page: = Filtering design pattern = = Intent = Some features need configuration files that may vary just a little for different situations. This pattern has beed designed to avoid redundancy (by rewriting almost same files) and complexity (by using XSLT) while resolving these different situations. A XSLT implementation is provided. = Motivation = There are a lot of situations where configuration files only differ a little. To resolve this situation, we may write specific XSLT (or java, ...) code. To avoid this complexity that decreases maintenance and usability, we may create a filter (like the Role-filter cocoon transformer) in XSLT, that will selects (delete or keeps) elements according the rule provided (and not only the user's role). For example, if you have the following fragment that describes a form, you may have create and update modes in the same file : = Usage = It may be used when you have files that differ only a little. Two elements, in http://bluexml.org/filter/1.0 namespace, are available : It is useful when working with static files. If you dynamically generate your files, generate directly the file you need, I think you will avoid problems. >>From a performance point of view, there is no impact because you will use it with configuration files that are usually well cached by the system. = Structure/Architecture = [img src=""] = Component = * filter:tags : tags in filter namespace and processed by the filter * condition : the condition to encounter to realize the action indicated = Implementation = It's a simple XSLT. sysadmin-create nodebug When = 1 Results = Condition = Result = When = 1 Results = Condition = Result = = Conclusion =