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

Resource identifier #36 comment on use of MD_Identifier over RS_Identifier. #143

Open
coalsh opened this issue Jan 27, 2024 · 2 comments
Open
Labels
Encoding Issues that would affect the XML encoding Guidance Issues that primarily affect the general or element guidance, not the "normative" parts question Further information is requested

Comments

@coalsh
Copy link

coalsh commented Jan 27, 2024

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 MD_Identifier 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?

      <!-- resource identifier -->
      <gmd:identifier>
        <gmd:MD_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:MD_Identifier>
      </gmd:identifier>

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:
image

Perhaps my perception of the recommendation is wrong. Some clarification would be greatly appreciated.

@coalsh coalsh added question Further information is requested Guidance Issues that primarily affect the general or element guidance, not the "normative" parts Encoding Issues that would affect the XML encoding labels Jan 27, 2024
@nmtoken
Copy link
Contributor

nmtoken commented Jan 30, 2024

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>  

@coalsh
Copy link
Author

coalsh commented Jan 30, 2024

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 MD_Identifier and encode the complete URI as a gmx:Anchor in the code element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Encoding Issues that would affect the XML encoding Guidance Issues that primarily affect the general or element guidance, not the "normative" parts question Further information is requested
Projects
Status: No status
Development

No branches or pull requests

2 participants