I have the following xml file which is a part of a metadata (I extracted just one part of it)
<?xml version="1.0" encoding="UTF-8"?>
<gmd:MD_Metadata xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gts="http://www.isotc211.org/2005/gts" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gml="http://www.opengis.net/gml" xmlns:geonet="http://www.fao.org/geonetwork" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.isotc211.org/2005/gmd http://www.isotc211.org/2005/gmd/gmd.xsd http://www.isotc211.org/2005/srv http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd">
<gmd:pointOfContact>
<gmd:CI_ResponsibleParty>
<gmd:individualName xsi:type="gmd:PT_FreeText_PropertyType">
<gco:CharacterString>Freddie Mercury</gco:CharacterString>
<gmd:PT_FreeText>
<gmd:textGroup>
<gmd:LocalisedCharacterString locale="#ITA">Pippo</gmd:LocalisedCharacterString>
</gmd:textGroup>
</gmd:PT_FreeText>
</gmd:individualName>
<gmd:organisationName xsi:type="gmd:PT_FreeText_PropertyType">
<gco:CharacterString>The Queen</gco:CharacterString>
<gmd:PT_FreeText>
<gmd:textGroup>
<gmd:LocalisedCharacterString locale="#ITA">Music Institute</gmd:LocalisedCharacterString>
</gmd:textGroup>
</gmd:PT_FreeText>
</gmd:organisationName>
<gmd:positionName xsi:type="gmd:PT_FreeText_PropertyType">
<gco:CharacterString>Singer</gco:CharacterString>
</gmd:positionName>
<gmd:contactInfo>
<gmd:CI_Contact>
<gmd:phone>
<gmd:CI_Telephone>
<gmd:voice>
<gco:CharacterString>123456789</gco:CharacterString>
</gmd:voice>
<gmd:facsimile>
<gco:CharacterString>123456789</gco:CharacterString>
</gmd:facsimile>
</gmd:CI_Telephone>
</gmd:phone>
<gmd:address>
<gmd:CI_Address>
<gmd:city>
<gco:CharacterString>Zanzibar</gco:CharacterString>
</gmd:city>
<gmd:postalCode>
<gco:CharacterString>00001</gco:CharacterString>
</gmd:postalCode>
<gmd:country>
<gco:CharacterString>India</gco:CharacterString>
</gmd:country>
<gmd:electronicMailAddress>
<gco:CharacterString>[email protected]</gco:CharacterString>
</gmd:electronicMailAddress>
</gmd:CI_Address>
</gmd:address>
<gmd:transferOptions>
<gmd:MD_DigitalTransferOptions>
<gmd:onLine>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>http://www.google.it</gmd:URL>
</gmd:linkage>
</gmd:CI_OnlineResource>
</gmd:onLine>
</gmd:MD_DigitalTransferOptions>
</gmd:transferOptions>
</gmd:CI_Contact>
</gmd:contactInfo>
<gmd:role>
<gmd:CI_RoleCode codeListValue="pointOfContact" codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/Codelist/ML_gmxCodelists.xml#CI_RoleCode"/>
</gmd:role>
</gmd:CI_ResponsibleParty>
</gmd:pointOfContact>
</gmd:MD_Metadata>
I would like to extract only two information from this file: 1. the text Freddie Mercury (gco:CharacterString)
- the url http://www.google.it (gmd:URL)
I started trying using the following XSLT transformation
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" encoding="UTF-8" />
<gmd:MD_Metadata xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gmd="http://www.isotc211.org/2005/gmd" gco:isoType="gmd:MD_Metadata">
<xsl:template match="//gmd:pointOfContact">
<xsl:apply-templates select="gco:CharacterString" />
</xsl:template>
<xsl:template match="gco:CharacterString">
<xsl:text>name=</xsl:text>
</xsl:template>
</gmd:MD_Metadata>
</xsl:stylesheet>
but it is not working.
Could you please help me in this goal?