Skip to content

ISO-19115-3 URN metadataIdentifier modified when converted with xsl-view #9232

Description

@streino

Describe the bug

Conversion from ISO-19115-3 to "xsl-view" modifies URN metadataIdentifiers. The "urn:..." codeSpace generates a "urn:.../..." identifier in the output.

Example record:

Original XML:

<mdb:metadataIdentifier>
  <mcc:MD_Identifier>
    <mcc:code>
      <gco:CharacterString>0a048a62-2cc7-40e2-931f-2e37cfe4132a</gco:CharacterString>
    </mcc:code>
    <mcc:codeSpace>
      <gco:CharacterString>urn:uuid</gco:CharacterString>
    </mcc:codeSpace>
  </mcc:MD_Identifier>
</mdb:metadataIdentifier>

xsl-view output:

<h2>Métadonnées</h2>
  <dl class="gn-code">
     <dt>Identifiant de la fiche</dt>
     <dd>urn:uuid/0a048a62-2cc7-40e2-931f-2e37cfe4132a
        <p></p>
     </dd>
  </dl>

Expected behavior

URN identifier should use the correct separator according to RFC-4122, i.e. :.

Cause

The xsl-view doesn't handle the special case of URN like other formatters.

Notes

Some ISO-19115-3 templates set codeSpace to "urn:uuid" by default, so this is likely to affect most ISO-10115-3 catalogs.

Related but not the same as #9170. I don't have enough knowledge of GeoNetwork to think of all the possible cases where this bug might lurk, nor would I know how to reliably search for it -- besides searching for "codeSpace" which returns quite a lot of hits, and may not catch cases with intermediate variables. This does look like something that would need a more thorough approach, though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions