-
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
None mandatory Linkage field has red asterisk mark #315
Comments
The "problem" is that the code check is using also the cardinality of the element, that indeed is mandatory to be present in the XML: http://www.datypic.com/sc/niem21/t-gmd_CI_OnlineResource_Type.html But that doesn't really imply that the element must contain a value. We could try to remove that check, and verify how affects other elements as probably some will require to add the condition as mandatory to be displayed as currently. |
Isn't the real problem that it should be based on gmd:onlineResource which is not mandatory according to the following: http://www.datypic.com/sc/niem21/e-gmd_CI_Contact.html And only if a the gmd:onlineResource is added then the linkage is required. |
By default,
In the default view, this information is flatten, so you just the linkage element, not the container. To remove it you need to go to the full view. About the mandatory calculation, I think is used for 2 things:
Maybe we should keep the current check just for 1) and for 2) use the configuration in |
Do you have any sample or suggestion where I can remove such check so I can give it some tests on my localhost? |
I have prepared two pull request. One is for Geonetwork render-element in form-builder to have extra parameter to force checking the xsd schema. geonetwork/core-geonetwork#8294 And one within the HNAP schema, to update the label xml to have the required fields be mandatory and not force to check the xsd schema. Please review and see if it fits the purpose of removing this linkage's red asterisk mark |
Some none mandatory fields for example linkage has the red astrix mark in front
The label for this field has no such condition as in this code.
iso19139.ca.HNAP/src/main/plugin/iso19139.ca.HNAP/loc/eng/labels.xml
Lines 1298 to 1303 in 33a7855
I found the logic to place such required mark is probably related to the form builder and its parentEditInfo
https://github.com/geonetwork/core-geonetwork/blob/2731e560fd9e3a8cea16047082cf557d3c0978c5/web/src/main/webapp/xslt/ui-metadata/form-builder.xsl#L116-L120
And this parentEditInfo was passed from HNAP layout.xsl
iso19139.ca.HNAP/src/main/plugin/iso19139.ca.HNAP/layout/layout.xsl
Lines 95 to 96 in 33a7855
So far, this is my investigation. This gmd:linkage is just one of them. There are couple of other fields are forced to set the gn_required (red astrix ) without stating the condition as mandatory.
The text was updated successfully, but these errors were encountered: