Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove url as part of unit of measurement #417

Open
wants to merge 2 commits into
base: 4.2.x
Choose a base branch
from

Conversation

wangf1122
Copy link
Contributor

The url appended to the uom attribute (unit of measurement) is causing some issue #415

The discussion is to not enforce such url which is brought from indexing

<xsl:value-of select="if (contains(@uom, '#'))
then concat(., ' ', tokenize(@uom, '#')[2])
else concat(., ' ', @uom)"/>

Copy link
Contributor

@josegar74 josegar74 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wangf1122 An alternative would be to remove the template to match gco:Distance from update-fixed-info, that way it preserves what the user enters. This is how it works in https://github.com/geonetwork/core-geonetwork/blob/4.2.x/schemas/iso19139/src/main/plugin/iso19139/update-fixed-info.xsl

But in any case the solution looks fine.

@ianwallen ianwallen added this to the 4.2.12 milestone Dec 5, 2024
@wangf1122
Copy link
Contributor Author

@wangf1122 An alternative would be to remove the template to match gco:Distance from update-fixed-info, that way it preserves what the user enters. This is how it works in https://github.com/geonetwork/core-geonetwork/blob/4.2.x/schemas/iso19139/src/main/plugin/iso19139/update-fixed-info.xsl

But in any case the solution looks fine.

@josegar74

Removing this template from update-fixed-info.xl seems to be the right choice and this template should never been there. My only concern is what if there are production data already come with this url which the harm is already done. We will need to do some manual data fixing. If you are ok with this, then I can just get rid of this unnecessary template

@josegar74
Copy link
Contributor

@wangf1122 in any case the update must be done for the existing metadata, if we keep the template with the value change, the existing metadata will require editing for the update-fixed-info to be applied.

I think we can simply delete the template and apply a database update to remove the unwanted URL in the attribute.

@wangf1122
Copy link
Contributor Author

@josegar74

I have removed the whole xsl template. So it will not add such url and will do nothing to gco:distance/@uom attribute. As discussed, we could deal with individual data by manual editing or database direct update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants