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


1 Answer 1


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

      <gco:CharacterString>Rue Vautierstraat 29</gco:CharacterString>
      <gmx:Anchor xlink:href="SDN:C32:7:BE">Belgium</gmx:Anchor>

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: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/*/
<xsl:variable name="postalCode" select="../../../../gmd:contactInfo/*/gmd:address/*/
<xsl:variable name="city" select="../../../../gmd:contactInfo/*/gmd:address/*/
<xsl:variable name="administrativeArea" select="../../../../gmd:contactInfo/*/gmd:address/*/
<xsl:variable name="country" select="../../../../gmd:contactInfo/*/gmd:address/*/

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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