Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 58240 invoked by uid 500); 2 Jul 2002 13:43:19 -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 58229 invoked from network); 2 Jul 2002 13:43:19 -0000 Message-ID: <85063BBE668FD411944400D0B744267A018638FE@AUSMAIL> From: "Lai, Harry" To: "'cocoon-users@xml.apache.org'" Subject: RE: [doc] Request feedback on Draft: Parameter Selector user doc Date: Tue, 2 Jul 2002 08:43:14 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi Beth, Great doc! I just saw one minor bug in the first example. You have: ... Since the generate call is inside the act, the parameter you want is actually {../1}, not {1}. Aside from that, though, this looks good to me. Harry -----Original Message----- From: Naquin, Beth [mailto:Beth.Naquin@morpho.com] Sent: Monday, July 01, 2002 5:53 PM To: cocoon-users@xml.apache.org Subject: [doc] Request feedback on Draft: Parameter Selector user doc Hi all, Below is a draft of a document on the ParameterSelector for possible inclusion in the userdocs/Selectors section. I thought I'd post it here to get some feedback first. Could you please give it a quick review for: accuracy/correctness, understandability (esp to a newbie), additional info to add ?? Thanks a bunch, Beth ================================================================ Parameter Selector applies to: cocoon 2.0.2, ?????????????? DOES THIS APPLY TO OTHER VERSIONS OF COCOON ALSO?? Name: Parameter Selector Class: org.apache.cocoon.selection.ParameterSelector Cacheable: ???????? CAN SOMEONE ANSWER THIS, OR IS IT NONAPPLICABLE?? This Selector matches a string, in the Parameters object passed to the selector, against a specified Cocoon internal parameter. It performs a case-sensitive string comparison between the value of the 'parameter-selector-test' parameter and the value of the 'test' attribute of the element. This internal parameter could be: -- A sitemap parameter from the map:match portion of the pipeline -- A sitemap parameter set by an action Reasons to use ParameterSelector ----------------------------------------- One purpose of this selector is to select between different pipeline configurations based on sitemap parameters set by an action. This would allow the action to control the logic required to set one or more parameters, which can then be used by this selector to control pipeline processing. Thus, complex decision-making logic can be contained in actions, while the sitemap simply uses the results of the actions (the parameters) to determine pipeline processing. Parameter Selector can also be used to select on the value of 'keys' (such as {1} or {../2} ) from the wildcard matcher. Information in the URI, such as part of a filename, can then be used to determine pipeline processing. Examples ------------ Add the component to your sitemap.xmap: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... ... ... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Use a parameter set by an action: Assume there is an action (named MyAction) that sets a parameter (named MyRegion) to several possible values. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Use values from the URI: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: