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)[. != ''],', ')"/>