2

In GeoNetwork 3.4, the default format for Metadata information "Contact" is the American Format i.e. street, nummer, city, Postal Code, Country

example: Rue Vautier 29, Bruxelles, 1000, Belgium

However in Europe (in Belgium at least) it should be:

Rue Vautier 29, 1000 Bruxelles, Belgium

Otherwise the address is not valid. Do you know how to modify that?

The metadata files are harvested on a regular basis from a WAF so I can't (and don't want to) hard-code it.

Here is an example of a MD file

http://geonetwork.bmdc.be/geonetwork/srv/eng/catalog.search#/metadata/bmdc.be:dataset:2023

0

In the metadata itself its address is defined with its components separated individually, for example

<gmd:address>
  <gmd:CI_Address>
    <gmd:deliveryPoint>
      <gco:CharacterString>Rue Vautierstraat 29</gco:CharacterString>
    </gmd:deliveryPoint>
    <gmd:city>
      <gco:CharacterString>Brussel/Bruxelles</gco:CharacterString>
    </gmd:city>
    <gmd:postalCode>
      <gco:CharacterString>1000</gco:CharacterString>
    </gmd:postalCode>
    <gmd:country>
      <gmx:Anchor xlink:href="SDN:C32:7:BE">Belgium</gmx:Anchor>
    </gmd:country>
    <gmd:electronicMailAddress>
      <gco:CharacterString>bmdc@naturalsciences.be</gco:CharacterString>
    </gmd:electronicMailAddress>
  </gmd:CI_Address>
</gmd:address>

However, the record view uses the indexed value for address field. This is defined in this XSLT file, like

        <xsl:variable name="address" select="string-join(../../../../gmd:contactInfo/*/gmd:address/*/(
                                      gmd:deliveryPoint|gmd:postalCode|gmd:city|
                                      gmd:administrativeArea|gmd:country)/gco:CharacterString/text(), ', ')"/>

It just joins gmd:deliveryPoint, gmd:postalCode, gmd:city, gmd:administrativeArea and gmd:country with a comma. In your example Rue Vautier 29, Bruxelles, 1000, Belgium.

One way to fix this could be to define individual variables for each component and then make the join in the order you want.

<xsl:variable name="deliveryPoint" select="../../../../gmd:contactInfo/*/gmd:address/*/
                                    gmd:deliveryPoint/gco:CharacterString/text()"/>
<xsl:variable name="postalCode" select="../../../../gmd:contactInfo/*/gmd:address/*/
                                      gmd:postalCode/gco:CharacterString/text()"/>
<xsl:variable name="city" select="../../../../gmd:contactInfo/*/gmd:address/*/
                                      gmd:city/gco:CharacterString/text()"/>
<xsl:variable name="administrativeArea" select="../../../../gmd:contactInfo/*/gmd:address/*/
                                      gmd:administrativeArea/gco:CharacterString/text()"/>
<xsl:variable name="country" select="../../../../gmd:contactInfo/*/gmd:address/*/
                                      gmd:country/gco:CharacterString/text()"/>




<xsl:variable name="address" select="string-join(($deliveryPoint, $postalCode, $city, $gmd:administrativeArea, $country)[. != ''],', ')"/>

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.