provide support for multiple UI styles in metacat
Metacat currently allows a mapping between one document type to a particular
stylesheet for HTML transformation. We want to be able to use the same metacat
instance for presenting multiple user interface perspecitves, like a KNB
interface, an NRS interface, and a OBFS interface.
Proposed solution: remove all references to XSL stylesheets from the
xml_catalog table, and instead provide this information in a series of metacat
configuration files, which I will call a "style set". Each style set will have a
name, and will specify the mapping between a particular document type and the
stylesheet that should be used to transform that type into HTML. It will also
provide a default style in case there isn't an exact match. The main
metacat.properties file will have a property that indicates which user interface
style is the default. In addition, the semantics of the qformat parameter to
metacat will be extended, so that the name of a style set can be provided in
qformat, and that name will then determine the set of style sheets to use.
This change will allow a single metacat instance to display mutiple user interfaces.
The style set configuration file might be something like this:
and would be found in a file named "knb.xml" in xmltodb/lib.
#1 Updated by Matt Jones about 19 years ago
This format doesn't support non-html transforms. In order for the target
doctype to also be specified, we could try something like:
#4 Updated by Matt Jones almost 19 years ago
Added a new generic style sheet called "ascii-treeview.xsl" that can format any
XML document into an ascci-art tree for display. This is now used as the
default html transform in both knb.xml and nrs.xml when a more specific
transformation for a document type has not been provided. I also checked in a
'generic.xsl' stylesheet that tries to do the same thing but in a tabular form
-- it is not complete, but it is there if someone wants to work through the issues.