Hi
I see this code to handle codelists in ISO19139 schema:
https://github.com/geonetwork/core-geonetwork/blob/3.4.x/schemas/iso19139/src/main/plugin/iso19139/layout/layout.xsl#L503
https://github.com/geonetwork/core-geonetwork/blob/3.4.x/schemas/iso19139/src/main/plugin/iso19139/layout/layout.xsl#L555
In both cases are used for codelists the specific values for iso19139 ($iso19139codelists) instead of $codelists that contains the values in the schema of the metadata edited. While for labels is used $labels that contain the labels for the metadata schema (so allows override in a custom schema the values and still work with that templates):
<xsl:param name=“labels” select=“$labels” required=“no”/>
<xsl:param name=“codelists” select=“$iso19139codelists” required=“no”/>
See variables defined in:
https://github.com/geonetwork/core-geonetwork/blob/3.4.x/web/src/main/webapp/xslt/common/base-variables-metadata.xsl#L73-L81
<xsl:variable name=“schemaInfo” select=“/root/gui/schemas/*[name(.)=$schema]”/>
<xsl:variable name=“labels” select=“$schemaInfo/labels”/>
<xsl:variable name=“codelists” select=“$schemaInfo/codelists”/>
<xsl:variable name=“strings” select=“$schemaInfo/strings”/>
<xsl:variable name=“iso19139schema” select=“/root/gui/schemas/iso19139”/>
<xsl:variable name=“iso19139labels” select=“$iso19139schema/labels”/>
<xsl:variable name=“iso19139codelists” select=“$iso19139schema/codelists”/>
<xsl:variable name=“iso19139strings” select=“$iso19139schema/strings”/>
Not sure if there’s any reason for this that I could be missing or it’s a bug?
Regards,
Jose García
···
Vriendelijke groeten / Kind regards,
Jose García
Veenderweg 13
6721 WD Bennekom
The Netherlands
T: +31 (0)318 416664
Please consider the environment before printing this email.
Hi Jose,
Le lun. 11 juin 2018 à 10:30, Jose Garcia <jose.garcia@anonymised.com> a écrit :
Hi
I see this code to handle codelists in ISO19139 schema:
https://github.com/geonetwork/core-geonetwork/blob/3.4.x/schemas/iso19139/src/main/plugin/iso19139/layout/layout.xsl#L503
https://github.com/geonetwork/core-geonetwork/blob/3.4.x/schemas/iso19139/src/main/plugin/iso19139/layout/layout.xsl#L555
In both cases are used for codelists the specific values for iso19139 ($iso19139codelists) instead of $codelists that contains the values in the schema of the metadata edited. While for labels is used $labels that contain the labels for the metadata schema (so allows override in a custom schema the values and still work with that templates):
Some ISO19139 based schema are not extended the codelists so it makes things easy in that case. I think that was the reason to have the default value of the param set to 19139 codelist. You can define your schema codelist
<xsl:template mode=“mode-iso19139-xyz” priority=“201” match=“[/@codeList]”>
and then call the mode-iso19139 template with your overridden codelist if needed ?
Francois
<xsl:param name=“labels” select=“$labels” required=“no”/>
<xsl:param name=“codelists” select=“$iso19139codelists” required=“no”/>
See variables defined in:
https://github.com/geonetwork/core-geonetwork/blob/3.4.x/web/src/main/webapp/xslt/common/base-variables-metadata.xsl#L73-L81
<xsl:variable name=“schemaInfo” select=“/root/gui/schemas/*[name(.)=$schema]”/>
<xsl:variable name=“labels” select=“$schemaInfo/labels”/>
<xsl:variable name=“codelists” select=“$schemaInfo/codelists”/>
<xsl:variable name=“strings” select=“$schemaInfo/strings”/>
<xsl:variable name=“iso19139schema” select=“/root/gui/schemas/iso19139”/>
<xsl:variable name=“iso19139labels” select=“$iso19139schema/labels”/>
<xsl:variable name=“iso19139codelists” select=“$iso19139schema/codelists”/>
<xsl:variable name=“iso19139strings” select=“$iso19139schema/strings”/>
Not sure if there’s any reason for this that I could be missing or it’s a bug?
Regards,
Jose García
Vriendelijke groeten / Kind regards,
Jose García
Veenderweg 13
6721 WD Bennekom
The Netherlands
T: +31 (0)318 416664
Please consider the environment before printing this email.
Check out the vibrant tech community on one of the world’s most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Hi Francois
Thanks, I’ll give a try to that.
Regards,
Jose García
···
On Mon, Jun 11, 2018 at 10:37 AM, Francois Prunayre <fx.prunayre@anonymised.com…31…> wrote:
Hi Jose,
Le lun. 11 juin 2018 à 10:30, Jose Garcia <jose.garcia@anonymised.com> a écrit :
Hi
I see this code to handle codelists in ISO19139 schema:
https://github.com/geonetwork/core-geonetwork/blob/3.4.x/schemas/iso19139/src/main/plugin/iso19139/layout/layout.xsl#L503
https://github.com/geonetwork/core-geonetwork/blob/3.4.x/schemas/iso19139/src/main/plugin/iso19139/layout/layout.xsl#L555
In both cases are used for codelists the specific values for iso19139 ($iso19139codelists) instead of $codelists that contains the values in the schema of the metadata edited. While for labels is used $labels that contain the labels for the metadata schema (so allows override in a custom schema the values and still work with that templates):
Some ISO19139 based schema are not extended the codelists so it makes things easy in that case. I think that was the reason to have the default value of the param set to 19139 codelist. You can define your schema codelist
<xsl:template mode=“mode-iso19139-xyz” priority=“201” match=“[/@codeList]”>
and then call the mode-iso19139 template with your overridden codelist if needed ?
Francois
<xsl:param name=“labels” select=“$labels” required=“no”/>
<xsl:param name=“codelists” select=“$iso19139codelists” required=“no”/>
See variables defined in:
https://github.com/geonetwork/core-geonetwork/blob/3.4.x/web/src/main/webapp/xslt/common/base-variables-metadata.xsl#L73-L81
<xsl:variable name=“schemaInfo” select=“/root/gui/schemas/*[name(.)=$schema]”/>
<xsl:variable name=“labels” select=“$schemaInfo/labels”/>
<xsl:variable name=“codelists” select=“$schemaInfo/codelists”/>
<xsl:variable name=“strings” select=“$schemaInfo/strings”/>
<xsl:variable name=“iso19139schema” select=“/root/gui/schemas/iso19139”/>
<xsl:variable name=“iso19139labels” select=“$iso19139schema/labels”/>
<xsl:variable name=“iso19139codelists” select=“$iso19139schema/codelists”/>
<xsl:variable name=“iso19139strings” select=“$iso19139schema/strings”/>
Not sure if there’s any reason for this that I could be missing or it’s a bug?
Regards,
Jose García
Vriendelijke groeten / Kind regards,
Jose García
Veenderweg 13
6721 WD Bennekom
The Netherlands
T: +31 (0)318 416664
Please consider the environment before printing this email.
Check out the vibrant tech community on one of the world’s most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@anonymised.comsourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
–
Vriendelijke groeten / Kind regards,
Jose García
Veenderweg 13
6721 WD Bennekom
The Netherlands
T: +31 (0)318 416664
Please consider the environment before printing this email.