Return-Path: Delivered-To: apmail-xml-cocoon-cvs-archive@xml.apache.org Received: (qmail 60125 invoked by uid 500); 19 Oct 2001 11:20:29 -0000 Mailing-List: contact cocoon-cvs-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: cocoon-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cocoon-cvs@xml.apache.org Received: (qmail 60108 invoked by uid 500); 19 Oct 2001 11:20:29 -0000 Delivered-To: apmail-xml-cocoon2-cvs@apache.org Date: 19 Oct 2001 11:13:49 -0000 Message-ID: <20011019111349.57600.qmail@icarus.apache.org> From: cziegeler@apache.org To: xml-cocoon2-cvs@apache.org Subject: cvs commit: xml-cocoon2/documentation/xdocs/userdocs/selectors selectors.xml X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N cziegeler 01/10/19 04:13:49 Modified: documentation/xdocs/userdocs/matchers Tag: cocoon_20_branch matchers.xml documentation/xdocs/userdocs/selectors Tag: cocoon_20_branch selectors.xml Log: [patch/docs]Selector documentation Submitted by: Gianugo Rabellino [gianugo@rabellino.it] Revision Changes Path No revision No revision 1.1.2.3 +7 -7 xml-cocoon2/documentation/xdocs/userdocs/matchers/matchers.xml Index: matchers.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/documentation/xdocs/userdocs/matchers/matchers.xml,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- matchers.xml 2001/10/18 13:24:39 1.1.2.2 +++ matchers.xml 2001/10/19 11:13:48 1.1.2.3 @@ -143,18 +143,18 @@
    -
  • WildCard URI matcher (The default matcher): matches the URI against a wildcard pattern
  • -
  • Regexp URI matcher: +
  • WildCard URI matcher(The default matcher): matches the URI against a wildcard pattern
  • +
  • Regexp URI matcher: matches the URI against a fully blown regular expression
  • -
  • Request parameter - matcher: matches a request parameters given as a pattern. If +
  • Request parameter + matcher: matches a request parameters given as a pattern. If the parameter exists, its value is available for later substitution
  • -
  • Wildcard request parameter matcher: matches a wildcard - given as a pattern against the value of the configured +
  • Wildcard request parameter matcher: matches a wildcard + given as a pattern against the value of the configured parameter
  • -
  • Wildcard session parameter matcher: same as the +
  • Wildcard session parameter matcher: same as the request parameter, but it matches a session parameter
No revision No revision 1.1.2.2 +84 -9 xml-cocoon2/documentation/xdocs/userdocs/selectors/selectors.xml Index: selectors.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/documentation/xdocs/userdocs/selectors/selectors.xml,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- selectors.xml 2001/10/16 14:42:18 1.1.2.1 +++ selectors.xml 2001/10/19 11:13:48 1.1.2.2 @@ -9,25 +9,100 @@ Technical document + This document describes all available selectors of @doctitle@. -

This document lists all available selectors of @doctitle@ and - describes their purpose.

+

+ This document lists all available selectors of @doctitle@ and + describes their purpose. +

-

Forthcoming... -

+

+ Selectors in @docname@ have a role similar to matchers + while being more flexible. Like matchers they are designed + to test something against a part of the environment (the + request URI, headers, cookies and so on), but unlike matchers + they can be active decision driving components. + A matcher allows only for simple + "yes/no" decisions: the match can be succesful or not, if it + is the pipeline is executed, if not it's simply ignored. + Selectors go a step further allowing for more complex + use cases, where there is need for a decision to be + made according to a multiple chance scenario. In short you can + think of matchers as an "if" statement, while selectors have all + the power of an "if-else if-else" or "switch-case" construct. + The selector syntax is similar will be familiar to people + using the XSLT <xsl:test> statement. +

+

+ As an example consider the typical scenario where a page has to + be rendered in different way according to the browser being + used. There are plenty of browsers out there so expressing this + need as a set of matchers might become ankward and counterintuitive. + Using the BrowserSelector, which checks a given pattern + against the user-agent header, it's easy to deploy a consistent + and readable setup: +

+ + + + + + + + + + + + + + + + + + + + + +]]> + +
-

Forthcoming... -

-
---------------------------------------------------------------------- In case of troubles, e-mail: webmaster@xml.apache.org To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org For additional commands, e-mail: cocoon-cvs-help@xml.apache.org