SWiM, Lectora and locutor/stylesheet generator

To present OMDoc pages as XHTML+Presentation MathML, SWiM uses the OMDoc XSLT style sheets.

Shortcomings of the current implementation

 * presentation elements are assumed to be contained in the same file as symbols.
 * Only one presentation per symbol is supported.

As Lectora wants to present documents with user-/community-specific notations of symbols, a new mechanism must be created.

Requirements

 * The solution should still be XSLT, as this is probably best supported by SWiM and other systems.
 * The stylesheet generator should be a separate component that can be plugged into SWiM.
 * It should also be possible to re-implement its functionality using makefiles and shell scripts (and XSLT, of course) for batch-transformation of documents, replacing the old batch process.
 * The following workflow must be supported:
 * When an OMDoc page is to be presented, SWiM asks Lectora for every symbol $$s_i$$ used on the page how to present it, i.e. SWiM requests a mapping $$m\colon s_i \mapsto p_i$$ from Lectora.
 * An XSLT style sheet capable of transforming of the current OMDoc page to XHTML+MathML with the above mapping for symbols is created by the stylesheet generator
 * SWiM applies the generated style sheet to the OMDoc page, resulting in a presentation view.

Idea
For a symbol set $$S$$ and a presentation set $$P$$, create individual stylesheets for each combination $$(s,p)\in S\times P$$. To transform a document $$d$$, concatenate the single-symbol stylesheets for all symbols in $$d$$ to one stylesheet that corresponds to the above mapping $$m$$.