Open coalsh opened 5 months ago
Your error mesage makes me think you're using the wrong schema, though there is an issue here... The error I would expect to see is:
Description | Invalid content was found starting with element 'gmd:codeSpace'. No child element is expected at this point.
All the below are valid (against http://inspire.ec.europa.eu/draft-schemas/inspire-md-schemas-temp/apiso-inspire/apiso-inspire.xsd):
<gmd:identifier>
<gmd:MD_Identifier>
<gmd:code>
gmx:Anchor xlink:href="https://www.bodc.ac.uk/resources/inventories/edmed/search/6725" xlink:title="EDMED6725">EDMED6725</gmx:Anchor>
</gmd:code>
</gmd:MD_Identifier>
</gmd:identifier>
or:
<gmd:identifier>
<gmd:RS_Identifier>
<gmd:code>
<gco:CharacterString>EDMED6725</gco:CharacterString>
</gmd:code>
<gmd:codeSpace>
<gco:CharacterString>https://www.bodc.ac.uk/resources/inventories/edmed/search/6725</gco:CharacterString>
</gmd:codeSpace>
</gmd:RS_Identifier>
</gmd:identifier>
or:
<gmd:identifier>
<gmd:RS_Identifier>
<gmd:code>
<gco:CharacterString>EDMED6725</gco:CharacterString>
</gmd:code>
<gmd:codeSpace>
<gmx:Anchor xlink:href="https://www.bodc.ac.uk/resources/inventories/edmed/search/6725"/>
</gmd:codeSpace>
</gmd:RS_Identifier>
</gmd:identifier>
Hi @nmtoken, thank you for your response. After reviewing the ISO 19115 Guidance (and after getting the same error as you), all of the XML stanzas you posted above confirm what I expect to be the correct use of RS_Identifier and MD_Identifier tags for the Resource identifier element #36.
I think all is needed here is to make a clarifying amendment to the element guidance 'Comment' section because to me, it can be interpreted that code and codespace should be encapsulated between MD_Identifier tags (like I posted above) rather than RS_Identifier. I made a quick amendment mentioning a gmx:Anchor below that should to the trick:
_Since INSPIRE metadata technical guidance version 2, it is no longer required to use RS_Identifier if a value for code space value is provided. In such cases (where there is a code space provided) it is now strongly recommended to use MDIdentifier and encode the complete URI as a gmx:Anchor in the code element.
In the comment section of the Resource identifier element #36, it states:
_Since INSPIRE metadata technical guidance version 2, it is no longer required to use RS_Identifier if a value for code space value is provided. In such cases (where there is a code space provided) it is now strongly recommended to use MDIdentifier and encode the complete URI in the code element.
When a code space is provided, is this comment recommending that the encoding should be as seen below?
The reason I am asking is because I get XSD errors when I use this structure: One of '{"http://www.isotc211.org/2005/gmd":code}' is expected.
The guidance for ISO 19115:2003 also appears to suggest this:
Perhaps my perception of the recommendation is wrong. Some clarification would be greatly appreciated.