Copyright 1999-2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE faqs PUBLIC "-//APACHE//DTD FAQ V1.0//EN" "faq-v10.dtd">
<faqs title="Cocoon Sitemap Selector FAQs">
<faq>
<question>
What is a selector?
</question>
<answer>
<p>
A selector is a core sitemap component of Cocoon. Selectors are designed to evaluate a
generally simple boolean expression regarding some part of the environment (request URI, headers, or cookies, for example). The result of this evaluation determines which pipeline fragments should be combined within a given pipeline. Selectors are executed during pipeline setup.
</p>
<p>
In the sitemap file, each selector has a unique name which is mapped to a java class. One selector name must be declared as the default selector. Each selector may have additional configuration information specified in child elements.
</p>
<p>
For more conceptual information about selectors see <link href="../userdocs/concepts/matchers_selectors.html">Using and Implementing Matchers and Selectors</link>. For detailed descriptions about all of the available Cocoon selectors, see the user's guide document <link href="../userdocs/selectors/selectors.html">Matchers in Cocoon</link>. You may also wish to consult the Cocoon API documentation.
</p>
</answer>
</faq>
<faq>
<question>
What is the difference between a selector and a matcher?
</question>
<answer>
<p>
Both matchers and selectors can be used to determine the flow, order, and components involved in request processing. Their differences include the complexity of the decisions they can make about processing as well as the values they return to the sitemap. For a more detailed discussion of their similarities and differences, see <link href="../userdocs/concepts/matchers_selectors.html">Using and Implementing Matchers and Selectors</link>.