Hi list,
working on a iso19139 profile (on branch 2.10.x), I came across the schema-
conversion stuff.
Let's see the xml definition of a converter:
<converter name="xml_csw-record"
nsUri="http://www.isotc211.org/2005/gmd"
schemaLocation="www.isotc211.org/2005/gmd/gmd.xsd"
xslt="etcetera"/>
The documentation in the file says that the "name" defines the geonetwork
service name, and the "xslt" is the name of the xsl stylesheet to call for
converting the metadata.
The "name" attribute is also used to select the label for the button that will
export the metadata using the given converter.
The first consideration is that, for creating a proper converter, the comments
are suggesting the implementors to create a set of new services.
Now, if I am defining a schema plugin to be used with a stock GeoNetwork, I may
not want to create a brand new service.
I may externalize the service definition using the overriding mechanism, but a
schema plugin should work only by adding the currently documented stuff;
the override is not automatic, so the override file should be provided
somewhere outside of the plugin, and geonetwork should be externally configured
to read from this override file.
This is to say that we may want to use some predefined services to serve as
many converters as possible. This leads to the second condideration.
Second consideration:
Let's say that generically we may use a single Convert service and a proper
xsl file. It means that I may want to use the same service applied to different
xsl files, in order to have different transformation. This is not possibile at
the moment, since the localization logic (in xsl files) uses the service name
as a key for the localization.
A minor change in the XSL makes it possible to use a new attribute, "service",
to define the service name, and use "name" for the localization.
e.g.:
<converter name="myprofile2iso19139"
service="basicconverter"
xslt="myprofile2iso19139.xsl"/>
<converter name="myprofile2dc"
service="basicconverter"
xslt="myprofile2dc.xsl"/>
The labels would be bound to the name, so the same service could be used more
than once. The change would be back compatible, setting 'service' with the
value of 'name' if not defined.
Another consideration/question:
are the nsUri and schemaLocation attributes ever used?
nsUri is used in SchemaManager.existsConverter(), but I could not find any
place where this method is called.
Ciao,
Emanuele
--
Our support, Your Success!
Visit http://opensdi.geo-solutions.it for more information.
Ing. Emanuele Tajariol
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 380 2116282
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------