A filter is a named rule which causes APS Catalog to return only packages that meet a specific filtering criterion. A client creates a filter using indexes and feeds: An index contains the filter name and the filtering criterion; a feed contains information about packages that meet such criterion. For instance, to filter packages by vendors, a client must perform the following steps:
This example outlines the routine of using such filters. It is as follows:
According to the APS, each package pertains to one or more categories. A client can filter packages by these categories. To do it, a client must perform the following steps:
//select[@id='category']. //form/@action/text()//select/@name/text()//select[@id='category']/optgroup/option/@value/text().For instance, we have the following part of a Repository index:
<form id="filterForm" action="../1.atom" method="get">
<label for="name">Application name:</label>
<input type="text" id="name" name="name" value="" /><br />
<label for="category">Category</label>
<select id="category" name="category">
<optgroup label="Web">
<option value="Web/Wiki">Wiki</option>
</optgroup>
</select>
After parsing this part, a client must get a Web/Wiki category with a feed link ../1.atom?category=Web/Wiki.
A client can also filter the APS Catalog content by packagers. To do it, a client must repeat the previous procedure substituting id='category' by id='packager'.
A client can perform even more complex filtering. To build this functionality into a client, you can use facilities provided by indexes, search descriptions, or both. For details on facilities provided by indexes, we recommend you to elaborate the XML structure of each index. For description of indexes XML structure, see the Indexes section. For details on search descriptions, refer to the next section.