The search control mechanism allows the contents of one control to be filtered by the value of another. The filter mechanism implements hierarchical relationships in searches such as title <- edition whereby the contents of the edition control contains only those related to the selected title.
<searchForm>
<ssc:and>
<ssc:dropDownObjects
path="gn4:editionRef/nav:refObject/gn4:edition/gn4:titleRef/@idref" label="Title"
xquery="gn4:title order by @name"
sourceName="titleRef"/>
<ssc:dropDownObjects
path="gn4:editionRef/@idref" label="Edition"
xquery="gn4:edition order by @descName">
<ssc:filter
xquery="fn:in( gn4:titleRef/@idref, @@)"
isOptional="false"
sourceName="titleRef"/>
</ssc:dropDownObjects>
The filter element's sourceName value must match one defined on a dropDownObjects element so that the source control can provide values to the filtered one.
The source values are substituted into the filter's xquery replacing the @@ characters. The resulting xquery is combined with the filtered control's xquery to create the final condition used to generate the list of items.
The isOptional property specifies how to handle the case where no values are specified in the source control; when true the filtered control will be filled using only the controls xquery else when false the control will be empty. When a value is specified the control is filtered as normal.
The filter mechanism only works with dropDownObjects at the moment.