[GeoNetwork-devel] [GeoNetwork opensource Developer website] #1034: Use rewriteURI instead of one-to-one URI mapping in OASIS catalog

#1034: Use rewriteURI instead of one-to-one URI mapping in OASIS catalog
-------------------------+--------------------------------------------------
Reporter: fxp | Owner: geonetwork-devel@…
     Type: enhancement | Status: new
Priority: major | Milestone: Future release
Component: General | Version: v2.8.0RC0
Keywords: |
-------------------------+--------------------------------------------------
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

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1034&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#1034: Use rewriteURI instead of one-to-one URI mapping in OASIS catalog
--------------------------+-------------------------------------------------
  Reporter: fxp | Owner: geonetwork-devel@…
      Type: enhancement | Status: closed
  Priority: major | Milestone: Future release
Component: General | Version: v2.8.0RC0
Resolution: fixed | Keywords:
--------------------------+-------------------------------------------------
Changes (by fxp):

  * status: new => closed
  * resolution: => fixed

Comment:

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

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1034#comment:1&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#1034: Use rewriteURI instead of one-to-one URI mapping in OASIS catalog
--------------------------+-------------------------------------------------
  Reporter: fxp | Owner: geonetwork-devel@…
      Type: enhancement | Status: closed
  Priority: major | Milestone: v2.9.0
Component: General | Version: v2.8.0RC0
Resolution: fixed | Keywords:
--------------------------+-------------------------------------------------
Changes (by ianwallen):

  * milestone: Future release => v2.9.0

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1034#comment:2&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.