Bug #280


provide support for multiple UI styles in metacat

Added by Matt Jones over 22 years ago. Updated almost 22 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


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 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:

<style-set name="knb">
<stylesheet src="file://styles/dataset.xsl">
<stylesheet src="file://styles/access.xsl">

and would be found in a file named "knb.xml" in xmltodb/lib.

Actions #1

Updated by Matt Jones over 22 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:

<style-set name="knb">
<doctype publicid="-//NCEAS//eml-dataset-2.0//EN">
<target publicid="-//HTML//EN">file://styles/dataset.xsl</target>
<doctype publicid="-//NCEAS//eml-dataset//EN">
<target publicid="-//HTML//EN">file://styles/dataset.xsl</target>
<doctype publicid="-//NCEAS//eml-resource//EN">
<target publicid="-//HTML//EN">file://styles/dataset.xsl</target>
<doctype publicid="-//NCEAS//eml-access-2.0//EN">
<target publicid="-//HTML//EN">file://styles/access.xsl</target>

Actions #2

Updated by Matt Jones over 22 years ago

Implemented. Need to update stylesheets to set the qformat parameter properly,
but otherwise this is finished.

Actions #3

Updated by Matt Jones over 22 years ago

Need to implement a "generic" stylesheet for the case when no specific one is
available. Otherwise, completed.

Actions #4

Updated by Matt Jones over 22 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.


Actions #5

Updated by Redmine Admin almost 11 years ago

Original Bugzilla ID was 280


Also available in: Atom PDF