James Cummings wrote:
> you want to give the user the
> ability to display l/sp/scene in one document and l/lg/poem in another
> and s/p/section in another, but in the first two you want to also allow
> them to say l+4 above (or some other customisable query) etc. That is,
> each document might have individual considerations which need to be
> taken into account for searching it differently. Where should this
> logic be stored?
I would think the display definitions might be stored in one or more
xslt stylesheets, but these stylesheets can use parameters. A 'display
profile' may consist in a set of values to be assigned to the parameters
upon calling the template. To a text or a collection of texts one could
assign a default display profile. A flexible search and display system
would allow users to select another display profile or create their own
display profiles for all texts in the collection or for a subset of these.
So what you would need is a set of rules that evaluate a document type
(taken perhaps from a PI), user name, perhaps stored session
information, and return a stylesheet name, a template name and a display
profile. The display engine should then call the template using the
parameter assignments stored in the display profile. The display profile
contents would probably be stored in a database.