Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1034 closed enhancement (fixed)

Use rewriteURI instead of one-to-one URI mapping in OASIS catalog

Reported by: fxp Owned by: geonetwork-devel@…
Priority: major Milestone: v2.10.0 RC0
Component: General Version: v2.8.0RC0
Keywords: Cc:

Description

Currently, OASIS catalog is used to map xsl/blanks/metadata*.xsl to schema plugin XSLTs. In order to get more flexibility to access whatever XSLTs in the schema plugin folder, it is proposed to use rewriteURI:

<rewriteURI uriStartString="blanks/metadata-schema01" rewritePrefix="/app/geonetwork/data/config/schema_plugins/csw-record" />

instead of uri mappings:

  <uri name="blanks/metadata-schema01.xsl" uri="/app/geonetwork/data/config/schema_plugins/csw-record/present/metadata-csw-record.xsl" />
  <uri name="blanks/metadata-schema01-edit.xsl" uri="/app/geonetwork/data/config/schema_plugins/csw-record/present/metadata-csw-record-edit.xsl" />

Any schema plugin resource could be included in a main XSL using the URI start (eg. blanks/metadata-schema01) and the path to the target XSLT:

<xsl:include href="blanks/metadata-schema01/present/metadata-edit.xsl"/>

If another XSL available in the schema plugin is required, we don't need to register it with modification of the Java code making the current XSLT uri mapping.

In the rewrite process, the XMLResolver check that the rewrited XSL exists and if not replace it by the blank.xsl. When the XSL cache mechanism is on, the rewrite check for the file is only made the first time (ie. no performance changes).

Main interest:

Backward compatibility issues:

  • schema plugin XSL file name changes (present/metadata-iso19139.xsl > present/metadata.xsl)

Patch: https://github.com/fxprunayre/core-geonetwork/commit/a2b40c6b9507a6222779fb88bc5fe02fa1dc3e00

Attachments (1)

migrate-schema.sh (1.4 KB ) - added by fxp 12 years ago.
Migration script which helps applying changes for #1066 and #1034.

Download all attachments as: .zip

Change History (3)

comment:1 by fxp, 12 years ago

Resolution: fixed
Status: newclosed

Commit in 3062a107c8b9ddfdbb4b01012591bb095b2318bd (and 1450f8f7c94145b01db42779f713f44896935afd for schema-plugins)

by fxp, 12 years ago

Attachment: migrate-schema.sh added

Migration script which helps applying changes for #1066 and #1034.

comment:2 by ianwallen, 12 years ago

Milestone: Future releasev2.9.0
Note: See TracTickets for help on using tickets.