#1034 closed enhancement (fixed)
Use rewriteURI instead of one-to-one URI mapping in OASIS catalog
Reported by: | fxp | Owned by: | |
---|---|---|---|
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:
- do not require Java changes to access a schema plugin resources
- could help to reduce the XSL size (for example, FOP templates are included in the main one which is maybe not required. RDF outputs is independant of the main view and edit XSLTs - http://trac.osgeo.org/geonetwork/wiki/proposals/DCATandRDFServices)
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)
Change History (3)
comment:1 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
by , 12 years ago
Attachment: | migrate-schema.sh added |
---|
comment:2 by , 12 years ago
Milestone: | Future release → v2.9.0 |
---|
Commit in 3062a107c8b9ddfdbb4b01012591bb095b2318bd (and 1450f8f7c94145b01db42779f713f44896935afd for schema-plugins)