Project

General

Profile

Actions

Bug #280

closed

provide support for multiple UI styles in metacat

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

Status:
Resolved
Priority:
Immediate
Assignee:
Category:
metacat
Target version:
Start date:
09/14/2001
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
280

Description

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:

<style-set name="knb">
<default-style>file://styles/generic-style.xsl</default-style>
<stylesheet src="file://styles/dataset.xsl">
<doctype>-//NCEAS//eml-dataset-2.0//EN</doctype>
<doctype>-//NCEAS//eml-dataset//EN</doctype>
<doctype>-//NCEAS//eml-resource//EN</doctype>
</stylesheet>
<stylesheet src="file://styles/access.xsl">
<doctype>-//NCEAS//eml-access-2.0//EN</doctype>
</stylesheet>
</style-set>

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

Actions #1

Updated by Matt Jones almost 23 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">
<default-style>file://styles/generic-style.xsl</default-style>
<doctype publicid="-//NCEAS//eml-dataset-2.0//EN">
<target publicid="-//HTML//EN">file://styles/dataset.xsl</target>
</doctype>
<doctype publicid="-//NCEAS//eml-dataset//EN">
<target publicid="-//HTML//EN">file://styles/dataset.xsl</target>
</doctype>
<doctype publicid="-//NCEAS//eml-resource//EN">
<target publicid="-//HTML//EN">file://styles/dataset.xsl</target>
</doctype>
<doctype publicid="-//NCEAS//eml-access-2.0//EN">
<target publicid="-//HTML//EN">file://styles/access.xsl</target>
</doctype>
</style-set>

Actions #2

Updated by Matt Jones almost 23 years ago

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

Actions #3

Updated by Matt Jones almost 23 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 almost 23 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.

RESOLVED FIXED.

Actions #5

Updated by Redmine Admin over 11 years ago

Original Bugzilla ID was 280

Actions

Also available in: Atom PDF