Using Facetmap XSLT files
The facetmap schema describes the facets you have created for your data, and also contains the resources classified in those facets. You start with an XML document conforming to the facetmap schema.
The conversion is performed in two discrete "preprocess" and "process" phases, each by its own XSL transform file in the appropriate directory ("preprocess" or "process").
During the preprocess phase, convert the Facetmap file to the Facetmap Persistence format. This is a simple transform: feed your Facetmap XML doc into the preprocess XSL; no other input is required. The preprocessing phase optimizes the data for faster processing at runtime. You must preprocess the Facetmap every time you modify the data, but can then save the Facetmap Persistence data for later use.
Perform the process phase when a user makes a query for Selection data. Queries are represented by reference strings which are passed to the process XSL as the string param "reference". Using this parameter, the process XSL converts your Facetmap Persistence XML data to the user's selection, expressed in Selection schema.
You get reference parameters from previous Selection data (it's the "s" attribute on Selection elements). If you specify no reference parameter, the process XSL will create a root (top-level) selection, from which you can get reference parameters to continue browsing the facetmap. (You may want to cache the root Selection XML, as it's the most commonly requested selection.)
The process XSL accepts these optional parameters:
max_resource_output- the maximum number of resources to include in selection
display_empty_subsets- defaults false, but if set true, shows subselections that contain zero resources
You can serve the Selection XML directly, or use its data to construct your own presentation. We have provided a few transforms in the "display" directory to get you started. All of them transform Selection XML into HTML for display.
For more details about the Facetmap engine, descriptions of facetmap elements and attributes, and runtime options, see the Facetmap Java API reference, which is built on the same principles.