-
Notifications
You must be signed in to change notification settings - Fork 19
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
Metadata editor - data identification dates - support only date format #272
base: 3.12.x
Are you sure you want to change the base?
Conversation
…t - xslt process to update existing metadata
@@ -18,6 +18,7 @@ | |||
<PublicationDate>Value is required for Metadata publication date</PublicationDate> | |||
<CreationDate>Value is required for Metadata creation date</CreationDate> | |||
<MissingDate>Value is required for Date</MissingDate> | |||
<InvalidDate>Date format is not valid. Should be: YYYY-MM-DD</InvalidDate> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed (and shown in your screenshot) the date format can be in different formats depending on locale so maybe this message should be changed to be more generic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest:
The date is entered using your current locale, it will store the date in YYYY-MM-DD format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternate:
The date entered is not in the correct format for your locale
xmlns:geonet="http://www.fao.org/geonetwork" | ||
exclude-result-prefixes="#all"> | ||
|
||
<xsl:template match="gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date[gco:Date and string-length(gco:Date) != 10]/gco:Date"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question?
Is this required for the following as well?
gmd:identificationInfo/*/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:beginPosition
We currently have issues when publishing this date to Open Data. It does not support single date as a year so we have to add the 01-01 as well. It is possible that this is an Open Data issues and not necessarily an HNAP issue so I'm just asking the question.
Requires geonetwork/core-geonetwork#6394
HNAP requires date format only for the data identification dates, with this change the fields in the editor display allow to select only dates in the metadata editor and does not allow to change to year/month or year modes.
A validation rule is added also to validate the full date format:
YYYY-MM-DD
: