Mercurial > repos > ecology > xmlstarlet
changeset 0:4a9ac1df3278 draft default tip
"planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/main/tools-ecology/tools/xmlstarlet commit 6ebe0c98dd0d727b9202422e64f6d5f7697743fb"
author | ecology |
---|---|
date | Sun, 06 Mar 2022 22:10:31 +0000 |
parents | |
children | |
files | README.md test-data/input_standardiso19115.xml test-data/iso2eml_all_in_one.xsl test-data/output_standardEML.xml xmlstarlet.xml |
diffstat | 5 files changed, 1652 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.md Sun Mar 06 22:10:31 2022 +0000 @@ -0,0 +1,1 @@ +xmlstarlet based Galaxy tool allowing to convert XML files written using a metadata standard specification to another through an xsl file.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/input_standardiso19115.xml Sun Mar 06 22:10:31 2022 +0000 @@ -0,0 +1,762 @@ +<?xml version="1.0" encoding="UTF-8"?> +<gmd:MD_Metadata xmlns:gmd="http://www.isotc211.org/2005/gmd" + xmlns:gco="http://www.isotc211.org/2005/gco" + xmlns:gfc="http://www.isotc211.org/2005/gfc" + xmlns:gmi="http://standards.iso.org/iso/19115/-2/gmi/1.0" + xmlns:gmx="http://www.isotc211.org/2005/gmx" + xmlns:gts="http://www.isotc211.org/2005/gts" + xmlns:srv="http://www.isotc211.org/2005/srv" + xmlns:gml="http://www.opengis.net/gml/3.2" + xmlns:gmlcov="http://www.opengis.net/gmlcov/1.0" + xmlns:gmlrgrid="http://www.opengis.net/gml/3.3/rgrid" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.isotc211.org/2005/gmd http://schemas.opengis.net/csw/2.0.2/profiles/apiso/1.0.0/apiso.xsd"> + <gmd:fileIdentifier> + <gco:CharacterString>pyrenees</gco:CharacterString> + </gmd:fileIdentifier> + <gmd:language> + <gmd:LanguageCode codeList="http://www.loc.gov/standards/iso639-2/" codeListValue="fre" + codeSpace="ISO 639-2">French</gmd:LanguageCode> + </gmd:language> + <gmd:characterSet> + <gmd:MD_CharacterSetCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MD_CharacterSetCode" + codeListValue="utf8">utf8</gmd:MD_CharacterSetCode> + </gmd:characterSet> + <gmd:hierarchyLevel> + <gmd:MD_ScopeCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MX_ScopeCode" + codeListValue="dataset" + codeSpace="ISOTC211/19115">dataset</gmd:MD_ScopeCode> + </gmd:hierarchyLevel> + <gmd:contact> + <gmd:CI_ResponsibleParty> + <gmd:individualName> + <gco:CharacterString>Wilfried Heintz</gco:CharacterString> + </gmd:individualName> + <gmd:organisationName> + <gco:CharacterString>INRAE, UMR DYNAFOR</gco:CharacterString> + </gmd:organisationName> + <gmd:positionName> + <gco:CharacterString>Engineer</gco:CharacterString> + </gmd:positionName> + <gmd:contactInfo> + <gmd:CI_Contact> + <gmd:phone> + <gmd:CI_Telephone> + <gmd:voice> + <gco:CharacterString>(+33)561285516</gco:CharacterString> + </gmd:voice> + <gmd:facsimile gco:nilReason="missing"/> + </gmd:CI_Telephone> + </gmd:phone> + <gmd:address> + <gmd:CI_Address> + <gmd:deliveryPoint> + <gco:CharacterString>24 chemin de Borde Rouge CS 52627</gco:CharacterString> + </gmd:deliveryPoint> + <gmd:city> + <gco:CharacterString>Castanet-Tolosan</gco:CharacterString> + </gmd:city> + <gmd:postalCode> + <gco:CharacterString>31326</gco:CharacterString> + </gmd:postalCode> + <gmd:country> + <gco:CharacterString>France</gco:CharacterString> + </gmd:country> + <gmd:electronicMailAddress> + <gco:CharacterString>wilfried.heintz@inrae.fr</gco:CharacterString> + </gmd:electronicMailAddress> + </gmd:CI_Address> + </gmd:address> + <gmd:onlineResource> + <gmd:CI_OnlineResource> + <gmd:linkage gco:nilReason="missing"/> + <gmd:name gco:nilReason="missing"/> + </gmd:CI_OnlineResource> + </gmd:onlineResource> + </gmd:CI_Contact> + </gmd:contactInfo> + <gmd:role> + <gmd:CI_RoleCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#CI_RoleCode" + codeListValue="pointOfContact" + codeSpace="ISOTC211/19115">pointOfContact</gmd:CI_RoleCode> + </gmd:role> + </gmd:CI_ResponsibleParty> + </gmd:contact> + <gmd:dateStamp> + <gco:DateTime>2020-03-26T15:47:03</gco:DateTime> + </gmd:dateStamp> + <gmd:metadataStandardName> + <gco:CharacterString>ISO 19115:2003/19139</gco:CharacterString> + </gmd:metadataStandardName> + <gmd:metadataStandardVersion> + <gco:CharacterString>1.0</gco:CharacterString> + </gmd:metadataStandardVersion> + <gmd:dataSetURI> + <gco:CharacterString>pyrenees</gco:CharacterString> + </gmd:dataSetURI> + <gmd:spatialRepresentationInfo> + <gmd:MD_VectorSpatialRepresentation> + <gmd:topologyLevel> + <gmd:MD_TopologyLevelCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MD_TopologyLevelCode" + codeListValue="geometryOnly" + codeSpace="ISOTC211/19115">geometryOnly</gmd:MD_TopologyLevelCode> + </gmd:topologyLevel> + <gmd:geometricObjects> + <gmd:MD_GeometricObjects> + <gmd:geometricObjectType> + <gmd:MD_GeometricObjectTypeCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MD_GeometricObjectTypeCode" + codeListValue="surface" + codeSpace="ISOTC211/19115">surface</gmd:MD_GeometricObjectTypeCode> + </gmd:geometricObjectType> + <gmd:geometricObjectCount> + <gco:Integer>91380</gco:Integer> + </gmd:geometricObjectCount> + </gmd:MD_GeometricObjects> + </gmd:geometricObjects> + </gmd:MD_VectorSpatialRepresentation> + </gmd:spatialRepresentationInfo> + <gmd:referenceSystemInfo> + <gmd:MD_ReferenceSystem> + <gmd:referenceSystemIdentifier> + <gmd:RS_Identifier> + <gmd:code> + <gco:CharacterString>2154</gco:CharacterString> + </gmd:code> + <gmd:codeSpace> + <gco:CharacterString>EPSG</gco:CharacterString> + </gmd:codeSpace> + </gmd:RS_Identifier> + </gmd:referenceSystemIdentifier> + </gmd:MD_ReferenceSystem> + </gmd:referenceSystemInfo> + <gmd:identificationInfo> + <gmd:MD_DataIdentification> + <gmd:citation> + <gmd:CI_Citation> + <gmd:title> + <gco:CharacterString>Forêts anciennes des Pyrénées</gco:CharacterString> + </gmd:title> + <gmd:date> + <gmd:CI_Date> + <gmd:date> + <gco:Date>2012-01-27</gco:Date> + </gmd:date> + <gmd:dateType> + <gmd:CI_DateTypeCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#CI_DateTypeCode" + codeListValue="creation" + codeSpace="ISOTC211/19115">creation</gmd:CI_DateTypeCode> + </gmd:dateType> + </gmd:CI_Date> + </gmd:date> + <gmd:edition> + <gco:DateTime>2020-03-26T15:03:07</gco:DateTime> + </gmd:edition> + <gmd:editionDate> + <gco:DateTime>2020-03-26T15:47:07</gco:DateTime> + </gmd:editionDate> + <gmd:identifier> + <gmd:MD_Identifier> + <gmd:code> + <gco:CharacterString>pyrenees</gco:CharacterString> + </gmd:code> + </gmd:MD_Identifier> + </gmd:identifier> + <gmd:citedResponsibleParty> + <gmd:CI_ResponsibleParty> + <gmd:individualName> + <gco:CharacterString>Laurent Larrieu</gco:CharacterString> + </gmd:individualName> + <gmd:organisationName> + <gco:CharacterString>INRAE</gco:CharacterString> + </gmd:organisationName> + <gmd:positionName> + <gco:CharacterString>Engineer</gco:CharacterString> + </gmd:positionName> + <gmd:contactInfo> + <gmd:CI_Contact> + <gmd:phone> + <gmd:CI_Telephone> + <gmd:voice> + <gco:CharacterString>(+33)</gco:CharacterString> + </gmd:voice> + <gmd:facsimile gco:nilReason="missing"/> + </gmd:CI_Telephone> + </gmd:phone> + <gmd:address> + <gmd:CI_Address> + <gmd:deliveryPoint> + <gco:CharacterString>rue</gco:CharacterString> + </gmd:deliveryPoint> + <gmd:city> + <gco:CharacterString>ville</gco:CharacterString> + </gmd:city> + <gmd:postalCode> + <gco:CharacterString>0</gco:CharacterString> + </gmd:postalCode> + <gmd:country> + <gco:CharacterString>France</gco:CharacterString> + </gmd:country> + <gmd:electronicMailAddress> + <gco:CharacterString>laurent.larrieu@inrae.fr</gco:CharacterString> + </gmd:electronicMailAddress> + </gmd:CI_Address> + </gmd:address> + <gmd:onlineResource> + <gmd:CI_OnlineResource> + <gmd:linkage gco:nilReason="missing"/> + <gmd:name gco:nilReason="missing"/> + </gmd:CI_OnlineResource> + </gmd:onlineResource> + </gmd:CI_Contact> + </gmd:contactInfo> + <gmd:role> + <gmd:CI_RoleCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#CI_RoleCode" + codeListValue="owner" + codeSpace="ISOTC211/19115">owner</gmd:CI_RoleCode> + </gmd:role> + </gmd:CI_ResponsibleParty> + </gmd:citedResponsibleParty> + <gmd:citedResponsibleParty> + <gmd:CI_ResponsibleParty> + <gmd:individualName> + <gco:CharacterString>Wilfried Heintz</gco:CharacterString> + </gmd:individualName> + <gmd:organisationName> + <gco:CharacterString>INRAE, UMR DYNAFOR</gco:CharacterString> + </gmd:organisationName> + <gmd:positionName> + <gco:CharacterString>Engineer</gco:CharacterString> + </gmd:positionName> + <gmd:contactInfo> + <gmd:CI_Contact> + <gmd:phone> + <gmd:CI_Telephone> + <gmd:voice> + <gco:CharacterString>(+33)561285516</gco:CharacterString> + </gmd:voice> + <gmd:facsimile gco:nilReason="missing"/> + </gmd:CI_Telephone> + </gmd:phone> + <gmd:address> + <gmd:CI_Address> + <gmd:deliveryPoint> + <gco:CharacterString>24 chemin de Borde Rouge CS 52627</gco:CharacterString> + </gmd:deliveryPoint> + <gmd:city> + <gco:CharacterString>Castanet-Tolosan</gco:CharacterString> + </gmd:city> + <gmd:postalCode> + <gco:CharacterString>31326</gco:CharacterString> + </gmd:postalCode> + <gmd:country> + <gco:CharacterString>France</gco:CharacterString> + </gmd:country> + <gmd:electronicMailAddress> + <gco:CharacterString>wilfried.heintz@inrae.fr</gco:CharacterString> + </gmd:electronicMailAddress> + </gmd:CI_Address> + </gmd:address> + <gmd:onlineResource> + <gmd:CI_OnlineResource> + <gmd:linkage gco:nilReason="missing"/> + <gmd:name gco:nilReason="missing"/> + </gmd:CI_OnlineResource> + </gmd:onlineResource> + </gmd:CI_Contact> + </gmd:contactInfo> + <gmd:role> + <gmd:CI_RoleCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#CI_RoleCode" + codeListValue="owner" + codeSpace="ISOTC211/19115">owner</gmd:CI_RoleCode> + </gmd:role> + </gmd:CI_ResponsibleParty> + </gmd:citedResponsibleParty> + <gmd:presentationForm> + <gmd:CI_PresentationFormCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#CI_PresentationFormCode" + codeListValue="mapDigital" + codeSpace="ISOTC211/19115">mapDigital</gmd:CI_PresentationFormCode> + </gmd:presentationForm> + </gmd:CI_Citation> + </gmd:citation> + <gmd:abstract> + <gco:CharacterString>Cartographie de l'occupation ancienne du sol du massif des Pyrénées réalisée à partir de la digitalisation des minutes de cartes d'Etat Major. (2012-04-01)</gco:CharacterString> + </gmd:abstract> + <gmd:pointOfContact> + <gmd:CI_ResponsibleParty> + <gmd:individualName> + <gco:CharacterString>Wilfried Heintz</gco:CharacterString> + </gmd:individualName> + <gmd:organisationName> + <gco:CharacterString>INRAE, UMR DYNAFOR</gco:CharacterString> + </gmd:organisationName> + <gmd:positionName> + <gco:CharacterString>Engineer</gco:CharacterString> + </gmd:positionName> + <gmd:contactInfo> + <gmd:CI_Contact> + <gmd:phone> + <gmd:CI_Telephone> + <gmd:voice> + <gco:CharacterString>(+33)561285516</gco:CharacterString> + </gmd:voice> + <gmd:facsimile gco:nilReason="missing"/> + </gmd:CI_Telephone> + </gmd:phone> + <gmd:address> + <gmd:CI_Address> + <gmd:deliveryPoint> + <gco:CharacterString>24 chemin de Borde Rouge CS 52627</gco:CharacterString> + </gmd:deliveryPoint> + <gmd:city> + <gco:CharacterString>Castanet-Tolosan</gco:CharacterString> + </gmd:city> + <gmd:postalCode> + <gco:CharacterString>31326</gco:CharacterString> + </gmd:postalCode> + <gmd:country> + <gco:CharacterString>France</gco:CharacterString> + </gmd:country> + <gmd:electronicMailAddress> + <gco:CharacterString>wilfried.heintz@inrae.fr</gco:CharacterString> + </gmd:electronicMailAddress> + </gmd:CI_Address> + </gmd:address> + <gmd:onlineResource> + <gmd:CI_OnlineResource> + <gmd:linkage gco:nilReason="missing"/> + <gmd:name gco:nilReason="missing"/> + </gmd:CI_OnlineResource> + </gmd:onlineResource> + </gmd:CI_Contact> + </gmd:contactInfo> + <gmd:role> + <gmd:CI_RoleCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#CI_RoleCode" + codeListValue="metadata" + codeSpace="ISOTC211/19115">metadata</gmd:CI_RoleCode> + </gmd:role> + </gmd:CI_ResponsibleParty> + </gmd:pointOfContact> + <gmd:pointOfContact> + <gmd:CI_ResponsibleParty> + <gmd:individualName> + <gco:CharacterString>Laurent Larrieu</gco:CharacterString> + </gmd:individualName> + <gmd:organisationName> + <gco:CharacterString>INRAE</gco:CharacterString> + </gmd:organisationName> + <gmd:positionName> + <gco:CharacterString>Engineer</gco:CharacterString> + </gmd:positionName> + <gmd:contactInfo> + <gmd:CI_Contact> + <gmd:phone> + <gmd:CI_Telephone> + <gmd:voice> + <gco:CharacterString>(+33)</gco:CharacterString> + </gmd:voice> + <gmd:facsimile gco:nilReason="missing"/> + </gmd:CI_Telephone> + </gmd:phone> + <gmd:address> + <gmd:CI_Address> + <gmd:deliveryPoint> + <gco:CharacterString>rue</gco:CharacterString> + </gmd:deliveryPoint> + <gmd:city> + <gco:CharacterString>ville</gco:CharacterString> + </gmd:city> + <gmd:postalCode> + <gco:CharacterString>0</gco:CharacterString> + </gmd:postalCode> + <gmd:country> + <gco:CharacterString>France</gco:CharacterString> + </gmd:country> + <gmd:electronicMailAddress> + <gco:CharacterString>laurent.larrieu@inrae.fr</gco:CharacterString> + </gmd:electronicMailAddress> + </gmd:CI_Address> + </gmd:address> + <gmd:onlineResource> + <gmd:CI_OnlineResource> + <gmd:linkage gco:nilReason="missing"/> + <gmd:name gco:nilReason="missing"/> + </gmd:CI_OnlineResource> + </gmd:onlineResource> + </gmd:CI_Contact> + </gmd:contactInfo> + <gmd:role> + <gmd:CI_RoleCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#CI_RoleCode" + codeListValue="owner" + codeSpace="ISOTC211/19115">owner</gmd:CI_RoleCode> + </gmd:role> + </gmd:CI_ResponsibleParty> + </gmd:pointOfContact> + <gmd:pointOfContact> + <gmd:CI_ResponsibleParty> + <gmd:individualName> + <gco:CharacterString>Wilfried Heintz</gco:CharacterString> + </gmd:individualName> + <gmd:organisationName> + <gco:CharacterString>INRAE, UMR DYNAFOR</gco:CharacterString> + </gmd:organisationName> + <gmd:positionName> + <gco:CharacterString>Engineer</gco:CharacterString> + </gmd:positionName> + <gmd:contactInfo> + <gmd:CI_Contact> + <gmd:phone> + <gmd:CI_Telephone> + <gmd:voice> + <gco:CharacterString>(+33)561285516</gco:CharacterString> + </gmd:voice> + <gmd:facsimile gco:nilReason="missing"/> + </gmd:CI_Telephone> + </gmd:phone> + <gmd:address> + <gmd:CI_Address> + <gmd:deliveryPoint> + <gco:CharacterString>24 chemin de Borde Rouge CS 52627</gco:CharacterString> + </gmd:deliveryPoint> + <gmd:city> + <gco:CharacterString>Castanet-Tolosan</gco:CharacterString> + </gmd:city> + <gmd:postalCode> + <gco:CharacterString>31326</gco:CharacterString> + </gmd:postalCode> + <gmd:country> + <gco:CharacterString>France</gco:CharacterString> + </gmd:country> + <gmd:electronicMailAddress> + <gco:CharacterString>wilfried.heintz@inrae.fr</gco:CharacterString> + </gmd:electronicMailAddress> + </gmd:CI_Address> + </gmd:address> + <gmd:onlineResource> + <gmd:CI_OnlineResource> + <gmd:linkage gco:nilReason="missing"/> + <gmd:name gco:nilReason="missing"/> + </gmd:CI_OnlineResource> + </gmd:onlineResource> + </gmd:CI_Contact> + </gmd:contactInfo> + <gmd:role> + <gmd:CI_RoleCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#CI_RoleCode" + codeListValue="owner" + codeSpace="ISOTC211/19115">owner</gmd:CI_RoleCode> + </gmd:role> + </gmd:CI_ResponsibleParty> + </gmd:pointOfContact> + <gmd:pointOfContact> + <gmd:CI_ResponsibleParty> + <gmd:individualName> + <gco:CharacterString>Wilfried Heintz</gco:CharacterString> + </gmd:individualName> + <gmd:organisationName> + <gco:CharacterString>INRAE, UMR DYNAFOR</gco:CharacterString> + </gmd:organisationName> + <gmd:positionName> + <gco:CharacterString>Engineer</gco:CharacterString> + </gmd:positionName> + <gmd:contactInfo> + <gmd:CI_Contact> + <gmd:phone> + <gmd:CI_Telephone> + <gmd:voice> + <gco:CharacterString>(+33)561285516</gco:CharacterString> + </gmd:voice> + <gmd:facsimile gco:nilReason="missing"/> + </gmd:CI_Telephone> + </gmd:phone> + <gmd:address> + <gmd:CI_Address> + <gmd:deliveryPoint> + <gco:CharacterString>24 chemin de Borde Rouge CS 52627</gco:CharacterString> + </gmd:deliveryPoint> + <gmd:city> + <gco:CharacterString>Castanet-Tolosan</gco:CharacterString> + </gmd:city> + <gmd:postalCode> + <gco:CharacterString>31326</gco:CharacterString> + </gmd:postalCode> + <gmd:country> + <gco:CharacterString>France</gco:CharacterString> + </gmd:country> + <gmd:electronicMailAddress> + <gco:CharacterString>wilfried.heintz@inrae.fr</gco:CharacterString> + </gmd:electronicMailAddress> + </gmd:CI_Address> + </gmd:address> + <gmd:onlineResource> + <gmd:CI_OnlineResource> + <gmd:linkage gco:nilReason="missing"/> + <gmd:name gco:nilReason="missing"/> + </gmd:CI_OnlineResource> + </gmd:onlineResource> + </gmd:CI_Contact> + </gmd:contactInfo> + <gmd:role> + <gmd:CI_RoleCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#CI_RoleCode" + codeListValue="pointOfContact" + codeSpace="ISOTC211/19115">pointOfContact</gmd:CI_RoleCode> + </gmd:role> + </gmd:CI_ResponsibleParty> + </gmd:pointOfContact> + <gmd:resourceMaintenance> + <gmd:MD_MaintenanceInformation> + <gmd:maintenanceAndUpdateFrequency> + <gmd:MD_MaintenanceFrequencyCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MD_MaintenanceFrequencyCode" + codeListValue="asNeeded" + codeSpace="ISOTC211/19115">asNeeded</gmd:MD_MaintenanceFrequencyCode> + </gmd:maintenanceAndUpdateFrequency> + </gmd:MD_MaintenanceInformation> + </gmd:resourceMaintenance> + <gmd:graphicOverview> + <gmd:MD_BrowseGraphic> + <gmd:fileName> + <gco:CharacterString>https://dynids.toulouse.inra.fr:8444/geoserver/forets_anciennes/ows?service=WMS&version=1.1.0&request=GetMap&layers=pyrenees&bbox=311090.112199999,6137120.9254,714654,6269615&width=600&height=300&srs=EPSG:2154&format=image/png</gco:CharacterString> + </gmd:fileName> + <gmd:fileDescription> + <gco:CharacterString>pyrenees</gco:CharacterString> + </gmd:fileDescription> + </gmd:MD_BrowseGraphic> + </gmd:graphicOverview> + <gmd:graphicOverview> + <gmd:MD_BrowseGraphic> + <gmd:fileName> + <gco:CharacterString>http://wheintz.github.io/assets/img/Dynafor.jpg</gco:CharacterString> + </gmd:fileName> + <gmd:fileDescription> + <gco:CharacterString>Logo</gco:CharacterString> + </gmd:fileDescription> + </gmd:MD_BrowseGraphic> + </gmd:graphicOverview> + <gmd:descriptiveKeywords> + <gmd:MD_Keywords> + <gmd:keyword> + <gco:CharacterString>Occupation du sol</gco:CharacterString> + </gmd:keyword> + <gmd:keyword> + <gco:CharacterString>Forêts anciennes</gco:CharacterString> + </gmd:keyword> + <gmd:keyword> + <gco:CharacterString>Digitalisation</gco:CharacterString> + </gmd:keyword> + <gmd:keyword> + <gco:CharacterString>Pyrénées</gco:CharacterString> + </gmd:keyword> + <gmd:keyword> + <gco:CharacterString>Minutes d'Etat Major</gco:CharacterString> + </gmd:keyword> + <gmd:type> + <gmd:MD_KeywordTypeCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MD_KeywordTypeCode" + codeListValue="theme" + codeSpace="ISOTC211/19115">theme</gmd:MD_KeywordTypeCode> + </gmd:type> + <gmd:thesaurusName> + <gmd:CI_Citation> + <gmd:title> + <gco:CharacterString>GENERAL</gco:CharacterString> + </gmd:title> + <gmd:date> + <gmd:CI_Date> + <gmd:date> + <gco:Date>2020-03-26</gco:Date> + </gmd:date> + <gmd:dateType> + <gmd:CI_DateTypeCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#CI_DateTypeCode" + codeListValue="lastRevision" + codeSpace="ISOTC211/19115">lastRevision</gmd:CI_DateTypeCode> + </gmd:dateType> + </gmd:CI_Date> + </gmd:date> + </gmd:CI_Citation> + </gmd:thesaurusName> + </gmd:MD_Keywords> + </gmd:descriptiveKeywords> + <gmd:resourceConstraints> + <gmd:MD_LegalConstraints> + <gmd:useLimitation> + <gco:CharacterString>Licence CC-By</gco:CharacterString> + </gmd:useLimitation> + <gmd:useConstraints> + <gmd:MD_RestrictionCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MD_RestrictionCode" + codeListValue="license" + codeSpace="ISOTC211/19115">license</gmd:MD_RestrictionCode> + </gmd:useConstraints> + </gmd:MD_LegalConstraints> + </gmd:resourceConstraints> + <gmd:spatialRepresentationType> + <gmd:MD_SpatialRepresentationTypeCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MD_SpatialRepresentationTypeCode" + codeListValue="vector">vector</gmd:MD_SpatialRepresentationTypeCode> + </gmd:spatialRepresentationType> + <gmd:language> + <gmd:LanguageCode codeList="http://www.loc.gov/standards/iso639-2/" codeListValue="fre" + codeSpace="ISO 639-2">French</gmd:LanguageCode> + </gmd:language> + <gmd:characterSet> + <gmd:MD_CharacterSetCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MD_CharacterSetCode" + codeListValue="utf8">utf8</gmd:MD_CharacterSetCode> + </gmd:characterSet> + <gmd:extent> + <gmd:EX_Extent> + <gmd:geographicElement> + <gmd:EX_GeographicBoundingBox> + <gmd:westBoundLongitude> + <gco:Decimal>311090.112199999</gco:Decimal> + </gmd:westBoundLongitude> + <gmd:eastBoundLongitude> + <gco:Decimal>714654.00</gco:Decimal> + </gmd:eastBoundLongitude> + <gmd:southBoundLatitude> + <gco:Decimal>6137120.9254</gco:Decimal> + </gmd:southBoundLatitude> + <gmd:northBoundLatitude> + <gco:Decimal>6269615.00</gco:Decimal> + </gmd:northBoundLatitude> + </gmd:EX_GeographicBoundingBox> + </gmd:geographicElement> + <gmd:temporalElement> + <gmd:EX_TemporalExtent> + <gmd:extent> + <gml:TimePeriod gml:id="P41Y"> + <gml:beginPosition>1840</gml:beginPosition> + <gml:endPosition>1880</gml:endPosition> + </gml:TimePeriod> + </gmd:extent> + </gmd:EX_TemporalExtent> + </gmd:temporalElement> + </gmd:EX_Extent> + </gmd:extent> + <gmd:supplementalInformation gco:nilReason="missing"/> + </gmd:MD_DataIdentification> + </gmd:identificationInfo> + <gmd:distributionInfo> + <gmd:MD_Distribution> + <gmd:transferOptions> + <gmd:MD_DigitalTransferOptions> + <gmd:onLine> + <gmd:CI_OnlineResource> + <gmd:linkage> + <gmd:URL>https://prodinra.inra.fr/record/386328</gmd:URL> + </gmd:linkage> + <gmd:protocol> + <gco:CharacterString>WWW:LINK-1.0-http--link</gco:CharacterString> + </gmd:protocol> + <gmd:name> + <gco:CharacterString>publication</gco:CharacterString> + </gmd:name> + <gmd:description> + <gco:CharacterString>Cartographie des forêts anciennes de France - Objectifs bilan et perspectives</gco:CharacterString> + </gmd:description> + </gmd:CI_OnlineResource> + </gmd:onLine> + <gmd:onLine> + <gmd:CI_OnlineResource> + <gmd:linkage> + <gmd:URL>https://prodinra.inra.fr/record/185677</gmd:URL> + </gmd:linkage> + <gmd:protocol> + <gco:CharacterString>WWW:LINK-1.0-http--link</gco:CharacterString> + </gmd:protocol> + <gmd:name> + <gco:CharacterString>publication</gco:CharacterString> + </gmd:name> + <gmd:description> + <gco:CharacterString>Digitalisation et géoréférencement des cartes minutes de l'état major du Parc National des Pyrénées pour une analyse des forêts anciennes</gco:CharacterString> + </gmd:description> + </gmd:CI_OnlineResource> + </gmd:onLine> + <gmd:onLine> + <gmd:CI_OnlineResource> + <gmd:linkage> + <gmd:URL>https://dynids.toulouse.inra.fr:8444/geoserver/forets_anciennes/ows?service=WMS</gmd:URL> + </gmd:linkage> + <gmd:protocol> + <gco:CharacterString>OGC:WMS-1.1.0-http-get-map</gco:CharacterString> + </gmd:protocol> + <gmd:name> + <gco:CharacterString>pyrenees</gco:CharacterString> + </gmd:name> + <gmd:description> + <gco:CharacterString>Forêts anciennes des Pyrénées</gco:CharacterString> + </gmd:description> + </gmd:CI_OnlineResource> + </gmd:onLine> + <gmd:onLine> + <gmd:CI_OnlineResource> + <gmd:linkage> + <gmd:URL>https://dynids.toulouse.inra.fr:8444/geoserver/forets_anciennes/ows?service=WFS&request=GetFeature&version=1.0.0&typeName=pyrenees</gmd:URL> + </gmd:linkage> + <gmd:protocol> + <gco:CharacterString>WWW:LINK-1.0-http--link</gco:CharacterString> + </gmd:protocol> + <gmd:name> + <gco:CharacterString>pyrenees</gco:CharacterString> + </gmd:name> + <gmd:description> + <gco:CharacterString>Forêts anciennes des Pyrénées - GIS Data Download (GML)</gco:CharacterString> + </gmd:description> + </gmd:CI_OnlineResource> + </gmd:onLine> + <gmd:onLine> + <gmd:CI_OnlineResource> + <gmd:linkage> + <gmd:URL>https://dynids.toulouse.inra.fr:8444/geoserver/forets_anciennes/ows?service=WFS&request=GetFeature&version=1.0.0&typeName=pyrenees&outputFormat=json</gmd:URL> + </gmd:linkage> + <gmd:protocol> + <gco:CharacterString>WWW:LINK-1.0-http--link</gco:CharacterString> + </gmd:protocol> + <gmd:name> + <gco:CharacterString>pyrenees</gco:CharacterString> + </gmd:name> + <gmd:description> + <gco:CharacterString>Forêts anciennes des Pyrénées - GIS Data Download (GeoJSON)</gco:CharacterString> + </gmd:description> + </gmd:CI_OnlineResource> + </gmd:onLine> + <gmd:onLine> + <gmd:CI_OnlineResource> + <gmd:linkage> + <gmd:URL>https://dynids.toulouse.inra.fr:8444/geoserver/forets_anciennes/ows?service=WFS&request=GetFeature&version=1.0.0&typeName=pyrenees&outputFormat=SHAPE-ZIP</gmd:URL> + </gmd:linkage> + <gmd:protocol> + <gco:CharacterString>WWW:LINK-1.0-http--link</gco:CharacterString> + </gmd:protocol> + <gmd:name> + <gco:CharacterString>pyrenees</gco:CharacterString> + </gmd:name> + <gmd:description> + <gco:CharacterString>Forêts anciennes des Pyrénées - GIS Data Download (ESRI Shapefile)</gco:CharacterString> + </gmd:description> + </gmd:CI_OnlineResource> + </gmd:onLine> + </gmd:MD_DigitalTransferOptions> + </gmd:transferOptions> + </gmd:MD_Distribution> + </gmd:distributionInfo> + <gmd:dataQualityInfo> + <gmd:DQ_DataQuality> + <gmd:scope> + <gmd:DQ_Scope> + <gmd:level> + <gmd:MD_ScopeCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MX_ScopeCode" + codeListValue="dataset" + codeSpace="ISOTC211/19115">dataset</gmd:MD_ScopeCode> + </gmd:level> + </gmd:DQ_Scope> + </gmd:scope> + <gmd:lineage> + <gmd:LI_Lineage> + <gmd:statement> + <gco:CharacterString>La réalisation de cette carte en 2013 sur l’ensemble du massif pyrénéen a nécessité l’exploitation de 33 dalles minutes d’Etat-Major et un travail manuel de géoréferencement et vectorisation des polygones d'occupation des sols. Nous ne pouvons donc pas garantir les 100% de bien classés.</gco:CharacterString> + </gmd:statement> + </gmd:LI_Lineage> + </gmd:lineage> + </gmd:DQ_DataQuality> + </gmd:dataQualityInfo> + <!--Metadata Creation date/time: 2020-03-26T15:47:16--> + <!--ISO 19139 XML generated by geometa R package - Version 0.6-1--> + <!--ISO 19139 XML compliance: NO--> + <!--geometa R package information: Contact: Emmanuel Blondel emmanuel.blondel1@gmail.com URL: https://github.com/eblondel/geometa/wiki BugReports: https://github.com/eblondel/geometa/issues--> +</gmd:MD_Metadata> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/iso2eml_all_in_one.xsl Sun Mar 06 22:10:31 2022 +0000 @@ -0,0 +1,745 @@ +<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:eml="eml://ecoinformatics.org/eml-2.1.1" + xmlns:stmml="http://www.xml-cml.org/schema/stmml" + xmlns:sw="eml://ecoinformatics.org/software-2.1.1" + xmlns:cit="eml://ecoinformatics.org/literature-2.1.1" + xmlns:ds="eml://ecoinformatics.org/dataset-2.1.1" + xmlns:prot="eml://ecoinformatics.org/protocol-2.1.1" + xmlns:doc="eml://ecoinformatics.org/documentation-2.1.1" + xmlns:res="eml://ecoinformatics.org/resource-2.1.1" + xmlns:gmd="http://www.isotc211.org/2005/gmd" + xmlns:gco="http://www.isotc211.org/2005/gco" + xmlns:gml="http://www.opengis.net/gml/3.2" + xmlns:gmx="http://www.isotc211.org/2005/gmx" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > + +<!--xsl:import href="iso2eml-party.xsl"/> +<xsl:import href="iso2eml-coverage.xsl"/> +<xsl:import href="iso2eml-project.xsl"/--> + +<xsl:output method="xml" encoding="UTF-8" indent="yes" /> +<xsl:strip-space elements="*" /> + +<xsl:template match="/gmd:MD_Metadata"> +<eml:eml> + <xsl:attribute name="xsi:schemaLocation">eml://ecoinformatics.org/eml-2.1.1 ~/development/eml/eml.xsd</xsl:attribute> + <!-- Add the packageId --> + <xsl:attribute name="packageId"><xsl:value-of select="normalize-space(gmd:fileIdentifier/gco:CharacterString)"/></xsl:attribute> + <xsl:attribute name="system"><xsl:value-of select="'knb'"/></xsl:attribute> + <xsl:attribute name="scope"><xsl:value-of select="'system'"/></xsl:attribute> + <dataset> + <!-- Add the title --> + <xsl:for-each select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString"> + <title><xsl:value-of select="normalize-space(.)"/></title> + </xsl:for-each> + + <!-- Add creators --> + <xsl:call-template name="creators"> + <xsl:with-param name="doc" select="." /> + </xsl:call-template> + + <!-- Add additional parties --> + <xsl:call-template name="additional-parties"> + <xsl:with-param name="doc" select="." /> + </xsl:call-template> + + <!-- Add the pubDate if available --> + <xsl:if test="gmd:dateStamp/gco:DateTime != ''"> + <pubDate> + <xsl:choose> + <xsl:when test="contains(gmd:dateStamp/gco:DateTime, 'T')"> + <xsl:value-of select="normalize-space(substring-before(gmd:dateStamp/gco:DateTime, 'T'))" /> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="normalize-space(gmd:dateStamp/gco:DateTime)" /> + </xsl:otherwise> + </xsl:choose> + </pubDate> + </xsl:if> + + <!-- Add the language --> + <xsl:if test="gmd:language/gco:CharacterString != ''"> + <language><xsl:value-of select="normalize-space(gmd:language/gco:CharacterString)" /></language> + </xsl:if> + + <!-- Add the abstract --> + <abstract> + <para><xsl:value-of select="normalize-space(gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract/gco:CharacterString)" /></para> + </abstract> + + <!-- Add keywords --> + <xsl:if test="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords != ''"> + <xsl:call-template name="keywords"> + <xsl:with-param name="keys" select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords" /> + </xsl:call-template> + </xsl:if> + + <!-- Add any gmd:topicCategory fields as keywords too --> + <xsl:if test="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:topicCategory != ''"> + <xsl:call-template name="topics"> + <xsl:with-param name="topics" select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:topicCategory" /> + </xsl:call-template> + </xsl:if> + + <!-- Add intellectual rights --> + <!-- + Note these rules are specific to the arcticdata.io content, + and will need to be generalized + --> + <xsl:choose> + <xsl:when test="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:resourceConstraints/gmd:MD_Constraints/gmd:useLimitation"> + <!-- Transfer MD_Constraints/useLimitation directly --> + <intellectualRights> + <para> + <xsl:value-of select="normalize-space(gmd:identificationInfo/gmd:MD_DataIdentification/gmd:resourceConstraints/gmd:MD_Constraints/gmd:useLimitation/gco:CharacterString)" /> + </para> + </intellectualRights> + </xsl:when> + <xsl:otherwise> + + <!-- Assign a CC-BY license --> + <intellectualRights> + <para> + <xsl:text>This work is licensed under the Creative Commons Attribution 4.0 International License.To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.</xsl:text> + </para> + </intellectualRights> + + </xsl:otherwise> + </xsl:choose> + + <!-- Add distribution --> + + <!-- Add coverage --> + <xsl:call-template name="coverage" /> + + <!-- Add contacts --> + <xsl:call-template name="contacts"> + <xsl:with-param name="doc" select="." /> + </xsl:call-template> + + + <!-- Add the publisher --> + <xsl:call-template name="publishers"> + <xsl:with-param name="doc" select="." /> + </xsl:call-template> + + + <!-- Add the pubPlace --> + + <!-- Add the methods --> + + <!-- Add the project --> + <xsl:call-template name="project"> + <xsl:with-param name="doc" select="." /> + </xsl:call-template> + + <!-- Add entities --> + + </dataset> +</eml:eml> +</xsl:template> + +<!-- Process Keywords and associated thesuarus entries --> +<xsl:template name="keywords"> + <xsl:param name = "keys" /> + <xsl:for-each select="$keys"> + <xsl:variable name="kw-type" select="./gmd:MD_Keywords/gmd:type/gmd:MD_KeywordTypeCode/@codeListValue" /> + <keywordSet> + <xsl:for-each select="./gmd:MD_Keywords/gmd:keyword/gco:CharacterString"> + <keyword> + <!-- ISO: discipline, place, stratum, temporal, theme --> + <!-- EML: place, stratum, temporal, theme, taxonomic --> + <xsl:if test="$kw-type != '' and ( + $kw-type = 'place' or $kw-type = 'stratum' or + $kw-type = 'temporal' or $kw-type = 'theme')"> + <xsl:attribute name="keywordType"><xsl:value-of select="normalize-space($kw-type)"/></xsl:attribute> + </xsl:if> + <xsl:value-of select="normalize-space(.)" /> + </keyword> + </xsl:for-each> + <xsl:if test="./gmd:MD_Keywords/gmd:thesaurusName != ''"> + <xsl:choose> + <xsl:when test="./gmd:MD_Keywords/gmd:thesaurusName/gmd:CI_Citation/gmd:collectiveTitle != ''"> + <keywordThesaurus> + <xsl:value-of select="normalize-space(./gmd:MD_Keywords/gmd:thesaurusName/gmd:CI_Citation/gmd:collectiveTitle/gco:CharacterString)" /> + </keywordThesaurus> + </xsl:when> + <xsl:otherwise> + <keywordThesaurus> + <xsl:value-of select="normalize-space(./gmd:MD_Keywords/gmd:thesaurusName/gmd:CI_Citation/gmd:title/gco:CharacterString)" /> + </keywordThesaurus> + </xsl:otherwise> + </xsl:choose> + </xsl:if> + </keywordSet> + </xsl:for-each> +</xsl:template> + +<!-- Process Topics --> +<xsl:template name="topics"> + <xsl:param name = "topics" /> + <xsl:for-each select="$topics"> + <keywordSet> + <xsl:for-each select="./gmd:MD_TopicCategoryCode"> + <keyword> + <xsl:value-of select="normalize-space(.)" /> + </keyword> + </xsl:for-each> + <keywordThesaurus>ISO 19115:2003 MD_TopicCategoryCode</keywordThesaurus> + </keywordSet> + </xsl:for-each> +</xsl:template> + +<!-- Match any geographic or temporal coverage elements --> +<xsl:template name="coverage" match="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent"> + <!-- Add EML geographic and temporal coverages, if available --> + <!-- Add geographic coverages --> + <xsl:variable name="bboxCount" select="count(.//gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox)" /> + <xsl:variable name="temporalCount" select="count(.//gmd:EX_Extent/gmd:temporalElement)" /> + <xsl:variable name="descriptionCount" select="count(.//gmd:EX_Extent/gmd:description)" /> + <xsl:variable name="exDescCount" select="count(.//gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicDescription)" /> + <xsl:if test="$temporalCount + $bboxCount > 0"> + <coverage> + <xsl:choose> + <xsl:when test="($descriptionCount + $exDescCount) >= $bboxCount"> + + <xsl:variable name="descriptions" > + <xsl:if test="//gmd:EX_Extent/gmd:description"> + <xsl:for-each select=".//gmd:EX_Extent"> + <xsl:copy-of select="gmd:description" /> + <xsl:value-of select="'. '" /> + </xsl:for-each> + </xsl:if> + </xsl:variable> + + <xsl:variable name="codeDescriptions" > + <xsl:for-each select=".//gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicDescription"> + <xsl:value-of select="gmd:geographicIdentifier/gmd:MD_Identifier/gmd:code/gco:CharacterString" /> + <xsl:if test="count(//gmd:EX_GeographicDescription) > 1"> + <xsl:value-of select="', '" /> + </xsl:if> + </xsl:for-each> + </xsl:variable> + + <xsl:apply-templates select=".//gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox"> + <xsl:with-param name="allDescriptions" select="concat($descriptions, $codeDescriptions)" /> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:comment>No geographic description provided</xsl:comment> + <xsl:apply-templates select=".//gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox"> + <xsl:with-param name="allDescriptions" select="'No geographic description provided.'" /> + </xsl:apply-templates> + </xsl:otherwise> + </xsl:choose> + + <!-- Add temporal coverages --> + <xsl:apply-templates select=".//gmd:EX_Extent/gmd:temporalElement" /> + </coverage> + </xsl:if> + +</xsl:template> + +<!-- Handle geographic bounding boxes --> +<xsl:template match="gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox"> + <xsl:param name="allDescriptions" /> + <xsl:comment>Geographic coverage</xsl:comment> + <!-- Handle geographic description --> + <xsl:choose> + <xsl:when test="$allDescriptions != ''"> + + <geographicCoverage> + <geographicDescription> + <xsl:value-of select="$allDescriptions" /> + </geographicDescription> + <xsl:apply-templates select="../gmd:geographicElement/gmd:EX_GeographicBoundingBox" /> + <!-- Add bounding coordinates --> + <boundingCoordinates> + <westBoundingCoordinate> + <xsl:value-of select="normalize-space(gmd:westBoundLongitude/gco:Decimal)" /> + </westBoundingCoordinate> + <eastBoundingCoordinate> + <xsl:value-of select="normalize-space(gmd:eastBoundLongitude/gco:Decimal)" /> + </eastBoundingCoordinate> + <northBoundingCoordinate> + <xsl:value-of select="normalize-space(gmd:northBoundLatitude/gco:Decimal)" /> + </northBoundingCoordinate> + <southBoundingCoordinate> + <xsl:value-of select="normalize-space(gmd:southBoundLatitude/gco:Decimal)" /> + </southBoundingCoordinate> + </boundingCoordinates> + </geographicCoverage> + + </xsl:when> + <xsl:otherwise> + + <!-- Make up a description from the bounding box --> + <xsl:if test=".//gmd:EX_GeographicBoundingBox"> + + <geographicCoverage> + <geographicDescription> + <xsl:text>This research took place in the area bounded by: </xsl:text> + <xsl:value-of select="normalize-space(gmd:EX_GeographicBoundingBox/gmd:westBoundLongitude/gco:Decimal)" /> + <xsl:text> West,</xsl:text> + <xsl:value-of select="normalize-space(gmd:EX_GeographicBoundingBox/gmd:eastBoundLongitude/gco:Decimal)" /> + <xsl:text> East,</xsl:text> + <xsl:value-of select="normalize-space(gmd:EX_GeographicBoundingBox/gmd:northBoundLatitude/gco:Decimal)" /> + <xsl:text> North,</xsl:text> + <xsl:value-of select="normalize-space(gmd:EX_GeographicBoundingBox/gmd:southBoundLatitude/gco:Decimal)" /> + <xsl:text> South.</xsl:text> + </geographicDescription> + <!-- Add bounding coordinates --> + <boundingCoordinates> + <westBoundingCoordinate> + <xsl:value-of select="normalize-space(gmd:westBoundLongitude/gco:Decimal)" /> + </westBoundingCoordinate> + <eastBoundingCoordinate> + <xsl:value-of select="normalize-space(gmd:eastBoundLongitude/gco:Decimal)" /> + </eastBoundingCoordinate> + <northBoundingCoordinate> + <xsl:value-of select="normalize-space(gmd:northBoundLatitude/gco:Decimal)" /> + </northBoundingCoordinate> + <southBoundingCoordinate> + <xsl:value-of select="normalize-space(gmd:southBoundLatitude/gco:Decimal)" /> + </southBoundingCoordinate> + </boundingCoordinates> + </geographicCoverage> + + </xsl:if> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- Handle temporal coverage elements --> +<xsl:template name="temporalCoverage" match="gmd:EX_Extent/gmd:temporalElement"> + <xsl:comment>Temporal coverage</xsl:comment> + <xsl:choose> + <xsl:when test="gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod"> + + <!-- We have a period, use rangeOfDates --> + <temporalCoverage> + <rangeOfDates> + <beginDate> + <xsl:choose> + <xsl:when test="contains(gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:beginPosition, 'T')"> + <calendarDate> + <xsl:value-of select="normalize-space(substring-before(gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:beginPosition, 'T'))" /> + </calendarDate> + <time> + <xsl:value-of select="normalize-space(substring-after(gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:beginPosition, 'T'))" /> + </time> + </xsl:when> + <xsl:otherwise> + <calendarDate> + <xsl:value-of select="normalize-space(gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:beginPosition)" /> + </calendarDate> + </xsl:otherwise> + </xsl:choose> + </beginDate> + <endDate> + <xsl:choose> + <xsl:when test="contains(gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:endPosition, 'T')"> + <calendarDate> + <xsl:value-of select="normalize-space(substring-before(gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:endPosition, 'T'))" /> + </calendarDate> + <time> + <xsl:value-of select="normalize-space(substring-after(gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:endPosition, 'T'))" /> + </time> + </xsl:when> + <xsl:otherwise> + <calendarDate> + <xsl:value-of select="normalize-space(gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:endPosition)" /> + </calendarDate> + </xsl:otherwise> + </xsl:choose> + </endDate> + </rangeOfDates> + </temporalCoverage> + </xsl:when> + <xsl:otherwise> + + <!-- No time period, look for time instant --> + <xsl:if test="gmd:EX_TemporalExtent/gmd:extent/gml:TimeInstant"> + + <temporalCoverage> + <singleDateTime> + <calendarDate> + <xsl:value-of select="normalize-space(gmd:EX_TemporalExtent/gmd:extent/gml:TimeInstant/gml:timePosition)" /> + </calendarDate> + </singleDateTime> + </temporalCoverage> + + </xsl:if> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + + <!-- Match any gmd:credit elements, and if they are present, add a project entry with funding fields --> + <xsl:template name="project"> + <xsl:param name = "doc" /> + <xsl:variable name="awardCount" select="count(./gmd:identificationInfo/gmd:MD_DataIdentification/gmd:credit)" /> + <!-- Add funding elements --> + <xsl:if test="$awardCount > 0"> + <project> + <!-- Add the project title --> + <title><xsl:value-of select="normalize-space(./gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title[1]/gco:CharacterString)"/></title> + + <!-- Add the project abstract --> + <xsl:if test='./gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract[1]/gco:CharacterString != ""'> + <abstract><xsl:value-of select="normalize-space(./gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract[1]/gco:CharacterString)"/></abstract> + </xsl:if> + + <!-- Add personnel from the PI list or the author list --> + <xsl:choose> + <!-- Select PIs from the citation --> + <xsl:when test='$doc/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="principalInvestigator" or @codeListValue="coPrincipalInvestigator" or @codeListValue="collaboratingPrincipalInvestigator"]]!=""'> + <xsl:for-each select='gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="principalInvestigator" or @codeListValue="coPrincipalInvestigator" or @codeListValue="collaboratingPrincipalInvestigator"]]'> + <personnel> + <xsl:call-template name="party"> + <xsl:with-param name="party" select = "." /> + </xsl:call-template> + <role>principalInvestigator</role> + </personnel> + </xsl:for-each> + </xsl:when> + <!-- Alternatively, select PIs from anywhere in the doc --> + <xsl:when test='$doc//gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="principalInvestigator" or @codeListValue="coPrincipalInvestigator" or @codeListValue="collaboratingPrincipalInvestigator"]] != ""'> + <xsl:for-each select='$doc//gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="principalInvestigator" or @codeListValue="coPrincipalInvestigator" or @codeListValue="collaboratingPrincipalInvestigator"]]'> + <personnel> + <xsl:call-template name="party"> + <xsl:with-param name="party" select = "." /> + </xsl:call-template> + <role>principalInvestigator</role> + </personnel> + </xsl:for-each> + </xsl:when> + <!-- Otherwise, select the author anywhere in the document --> + <xsl:otherwise> + <xsl:for-each select='$doc//gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="author"]]'> + <personnel> + <xsl:call-template name="party"> + <xsl:with-param name="party" select = "." /> + </xsl:call-template> + <role>principalInvestigator</role> + </personnel> + </xsl:for-each> + </xsl:otherwise> + </xsl:choose> + + <!-- Add all of the funding from gmd:credit --> + <funding> + <xsl:for-each select="./gmd:identificationInfo/gmd:MD_DataIdentification/gmd:credit"> + <para><xsl:value-of select="."/></para> + </xsl:for-each> + </funding> + </project> + </xsl:if> + + </xsl:template> + +<!-- Add creator --> +<xsl:template name="creators"> + <xsl:param name = "doc" /> + <xsl:choose> + <!-- First add any authors from the gmd:citation --> + <xsl:when test='$doc/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="author"]]!=""'> + <xsl:for-each select='gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="author"]]'> + <creator> + <xsl:call-template name="party"> + <xsl:with-param name="party" select = "." /> + </xsl:call-template> + </creator> + </xsl:for-each> + </xsl:when> + <!-- Alternatively, add authors from anywhere in the document --> + <xsl:when test='$doc//gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="author"]] != "" '> + <xsl:for-each select='$doc//gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="author"]]'> + <creator> + <xsl:call-template name="party"> + <xsl:with-param name="party" select = "." /> + </xsl:call-template> + </creator> + </xsl:for-each> + </xsl:when> + <!-- Alternatively, add principalInvestigators from anywhere in the document --> + <xsl:when test='$doc//gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="principalInvestigator"]] != "" '> + <xsl:for-each select='$doc//gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="principalInvestigator"]]'> + <creator> + <xsl:call-template name="party"> + <xsl:with-param name="party" select = "." /> + </xsl:call-template> + </creator> + </xsl:for-each> + </xsl:when> + <!-- Alternatively, add pointOfContact from the citation in the document --> + <xsl:when test='$doc/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="pointOfContact"]] != "" '> + <xsl:for-each select='$doc/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="pointOfContact"]]'> + <creator> + <xsl:call-template name="party"> + <xsl:with-param name="party" select = "." /> + </xsl:call-template> + </creator> + </xsl:for-each> + </xsl:when> + <!-- Alternatively, add pointOfContact from anywhere in the document --> + <xsl:when test='$doc//gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="pointOfContact"]] != "" '> + <xsl:for-each select='$doc//gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="pointOfContact"]]'> + <creator> + <xsl:call-template name="party"> + <xsl:with-param name="party" select = "." /> + </xsl:call-template> + </creator> + </xsl:for-each> + </xsl:when> + <!-- Finally, if all else fails, add the Arctic Data Center --> + <xsl:otherwise> + <creator> + <organizationName>NSF Arctic Data Center</organizationName> + </creator> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- Add associatedParty: principalInvestigator + First, check to see if principalInvestigators are listed in the gmd:citation, and if so, use them; + If not, then search the whole document and use any found. This avoids duplication. +--> +<xsl:template name="additional-parties"> + <xsl:param name = "doc" /> + <!-- Roles to be handled: originator|principalInvestigator|resourceProvider|distributor --> + + <!-- principalInvestigators --> + <xsl:choose> + <xsl:when test='$doc/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="principalInvestigator"]]!=""'> + <xsl:for-each select='gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="principalInvestigator"]]'> + <associatedParty> + <xsl:call-template name="party"> + <xsl:with-param name="party" select = "." /> + </xsl:call-template> + <role>principalInvestigator</role> + </associatedParty> + </xsl:for-each> + </xsl:when> + <xsl:otherwise> + <xsl:for-each select='$doc//gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="principalInvestigator"]]'> + <associatedParty> + <xsl:call-template name="party"> + <xsl:with-param name="party" select = "." /> + </xsl:call-template> + <role>principalInvestigator</role> + </associatedParty> + </xsl:for-each> + </xsl:otherwise> + </xsl:choose> + + <!-- coPrincipalInvestigator --> + <xsl:choose> + <xsl:when test='$doc/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="coPrincipalInvestigator"]]!=""'> + <xsl:for-each select='gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="coPrincipalInvestigator"]]'> + <associatedParty> + <xsl:call-template name="party"> + <xsl:with-param name="party" select = "." /> + </xsl:call-template> + <role>coPrincipalInvestigator</role> + </associatedParty> + </xsl:for-each> + </xsl:when> + <xsl:otherwise> + <xsl:for-each select='$doc//gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="coPrincipalInvestigator"]]'> + <associatedParty> + <xsl:call-template name="party"> + <xsl:with-param name="party" select = "." /> + </xsl:call-template> + <role>coPrincipalInvestigator</role> + </associatedParty> + </xsl:for-each> + </xsl:otherwise> + </xsl:choose> + + <!-- collaboratingPrincipalInvestigator --> + <xsl:choose> + <xsl:when test='$doc/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="collaboratingPrincipalInvestigator"]]!=""'> + <xsl:for-each select='gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="collaboratingPrincipalInvestigator"]]'> + <associatedParty> + <xsl:call-template name="party"> + <xsl:with-param name="party" select = "." /> + </xsl:call-template> + <role>collaboratingPrincipalInvestigator</role> + </associatedParty> + </xsl:for-each> + </xsl:when> + <xsl:otherwise> + <xsl:for-each select='$doc//gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="collaboratingPrincipalInvestigator"]]'> + <associatedParty> + <xsl:call-template name="party"> + <xsl:with-param name="party" select = "." /> + </xsl:call-template> + <role>collaboratingPrincipalInvestigator</role> + </associatedParty> + </xsl:for-each> + </xsl:otherwise> + </xsl:choose> + + <!-- originators --> + <xsl:choose> + <xsl:when test='$doc/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="originator"]]!=""'> + <xsl:for-each select='gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="originator"]]'> + <associatedParty> + <xsl:call-template name="party"> + <xsl:with-param name="party" select = "." /> + </xsl:call-template> + <role>originator</role> + </associatedParty> + </xsl:for-each> + </xsl:when> + <xsl:otherwise> + <xsl:for-each select='$doc//gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="originator"]]'> + <associatedParty> + <xsl:call-template name="party"> + <xsl:with-param name="party" select = "." /> + </xsl:call-template> + <role>originator</role> + </associatedParty> + </xsl:for-each> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + + +<!-- Add contacts --> +<xsl:template name="contacts"> + <xsl:param name = "doc" /> + <xsl:choose> + <!-- Add contacts from the citation in the document --> + <xsl:when test='$doc/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="pointOfContact"]]!=""'> + <xsl:for-each select='gmd:identificationInfo/gmd:MD_DataIdentification/gmd:pointOfContact/gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="pointOfContact"]]'> + <contact> + <xsl:call-template name="party"> + <xsl:with-param name="party" select = "." /> + </xsl:call-template> + </contact> + </xsl:for-each> + </xsl:when> + <!-- Alternatively, add contacts from anywhere in the document --> + <xsl:when test='$doc//gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="pointOfContact"]] != "" '> + <xsl:for-each select='$doc//gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="pointOfContact"]]'> + <contact> + <xsl:call-template name="party"> + <xsl:with-param name="party" select = "." /> + </xsl:call-template> + </contact> + </xsl:for-each> + </xsl:when> + <!-- Alternatively, add the first author as a contact --> + <!-- + <xsl:when test='$doc//gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="author"]] != "" '> + <contact> + <xsl:call-template name="party"> + <xsl:with-param name="party" select = '$doc//gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="author"]][1]' /> + </xsl:call-template> + </contact> + </xsl:when> + --> + <!-- Finally, if all else fails, add the Arctic Data Center --> + <xsl:otherwise> + <contact> + <organizationName>NSF Arctic Data Center</organizationName> + </contact> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- Add publishers + First, check to see if publishers are listed in the gmd:citation, and if so, use them; + If not, then search the whole document and use any found. This avoids duplication. +--> +<xsl:template name="publishers"> + <xsl:param name = "doc" /> + <!-- publisher --> + <xsl:choose> + <xsl:when test='$doc/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="publisher"]]!=""'> + <xsl:for-each select='gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="publisher"]]'> + <publisher> + <xsl:call-template name="party"> + <xsl:with-param name="party" select = "." /> + </xsl:call-template> + </publisher> + </xsl:for-each> + </xsl:when> + <xsl:otherwise> + <xsl:for-each select='$doc//gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="publisher"]]'> + <publisher> + <xsl:call-template name="party"> + <xsl:with-param name="party" select = "." /> + </xsl:call-template> + </publisher> + </xsl:for-each> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- Handle eml-party fields --> +<xsl:template name="party"> + <xsl:param name = "party" /> + <xsl:apply-templates /> + <xsl:if test="$party//gmd:voice/gco:CharacterString!=''"> + <phone><xsl:value-of select="normalize-space($party//gmd:voice/gco:CharacterString)"/></phone> + </xsl:if> + <xsl:if test="$party//gmd:CI_Address/gmd:electronicMailAddress/gco:CharacterString!=''"> + <electronicMailAddress><xsl:value-of select="normalize-space($party//gmd:CI_Address/gmd:electronicMailAddress/gco:CharacterString)"/></electronicMailAddress> + </xsl:if> + <xsl:if test="$party//gmd:onlineResource/gmd:CI_OnlineResource/gmd:linkage/gmd:URL!=''"> + <onlineUrl><xsl:value-of select="normalize-space($party//gmd:onlineResource/gmd:CI_OnlineResource/gmd:linkage/gmd:URL)"/></onlineUrl> + </xsl:if> +</xsl:template> + +<!-- Add an individualName --> +<xsl:template match="gmd:individualName"> + <individualName> + <surName><xsl:value-of select="normalize-space(gco:CharacterString)"/></surName> + </individualName> +</xsl:template> + +<!-- Add an organizationName --> +<xsl:template match="gmd:organisationName"> + <organizationName><xsl:value-of select="normalize-space(gco:CharacterString)"/></organizationName> +</xsl:template> + +<!-- Add a positionName --> +<xsl:template match="gmd:positionName"> + <positionName><xsl:value-of select="normalize-space(gco:CharacterString)"/></positionName> +</xsl:template> + +<!-- voice, email, and role are all noops so they can be reordered correctly --> +<xsl:template match="gmd:voice" /> +<xsl:template match="gmd:electronicMailAddress" /> +<xsl:template match="gmd:role" /> +<xsl:template match="gmd:onlineResource" /> + +<!-- Add an Address --> +<xsl:template match="gmd:CI_Address"> + <xsl:if test="gmd:deliveryPoint/gco:CharacterString!='' or gmd:city/gco:CharacterString!='' or gmd:administrativeArea/gco:CharacterString!='' or gmd:postalCode/gco:CharacterString!='' or gmd:country/gco:CharacterString!=''"> + <address> + <xsl:if test="gmd:deliveryPoint/gco:CharacterString!=''"> + <deliveryPoint><xsl:value-of select="normalize-space(gmd:deliveryPoint/gco:CharacterString)"/></deliveryPoint> + </xsl:if> + <xsl:if test="gmd:city/gco:CharacterString!=''"> + <city><xsl:value-of select="normalize-space(gmd:city/gco:CharacterString)"/></city> + </xsl:if> + <xsl:if test="gmd:administrativeArea/gco:CharacterString!=''"> + <administrativeArea><xsl:value-of select="normalize-space(gmd:administrativeArea/gco:CharacterString)"/></administrativeArea> + </xsl:if> + <xsl:if test="gmd:postalCode/gco:CharacterString!=''"> + <postalCode><xsl:value-of select="normalize-space(gmd:postalCode/gco:CharacterString)"/></postalCode> + </xsl:if> + <xsl:if test="gmd:country/gco:CharacterString!=''"> + <country><xsl:value-of select="normalize-space(gmd:country/gco:CharacterString)"/></country> + </xsl:if> + </address> + </xsl:if> +</xsl:template> + +</xsl:stylesheet>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/output_standardEML.xml Sun Mar 06 22:10:31 2022 +0000 @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="UTF-8"?> +<eml:eml xmlns:eml="eml://ecoinformatics.org/eml-2.1.1" xmlns:stmml="http://www.xml-cml.org/schema/stmml" xmlns:sw="eml://ecoinformatics.org/software-2.1.1" xmlns:cit="eml://ecoinformatics.org/literature-2.1.1" xmlns:ds="eml://ecoinformatics.org/dataset-2.1.1" xmlns:prot="eml://ecoinformatics.org/protocol-2.1.1" xmlns:doc="eml://ecoinformatics.org/documentation-2.1.1" xmlns:res="eml://ecoinformatics.org/resource-2.1.1" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:gmx="http://www.isotc211.org/2005/gmx" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="eml://ecoinformatics.org/eml-2.1.1 ~/development/eml/eml.xsd" packageId="pyrenees" system="knb" scope="system"> + <dataset> + <title>Forêts anciennes des Pyrénées</title> + <creator> + <individualName> + <surName>Wilfried Heintz</surName> + </individualName> + <organizationName>INRAE, UMR DYNAFOR</organizationName> + <positionName>Engineer</positionName> + <address> + <deliveryPoint>24 chemin de Borde Rouge CS 52627</deliveryPoint> + <city>Castanet-Tolosan</city> + <postalCode>31326</postalCode> + <country>France</country> + </address> + <phone>(+33)561285516</phone> + <electronicMailAddress>wilfried.heintz@inrae.fr</electronicMailAddress> + </creator> + <creator> + <individualName> + <surName>Wilfried Heintz</surName> + </individualName> + <organizationName>INRAE, UMR DYNAFOR</organizationName> + <positionName>Engineer</positionName> + <address> + <deliveryPoint>24 chemin de Borde Rouge CS 52627</deliveryPoint> + <city>Castanet-Tolosan</city> + <postalCode>31326</postalCode> + <country>France</country> + </address> + <phone>(+33)561285516</phone> + <electronicMailAddress>wilfried.heintz@inrae.fr</electronicMailAddress> + </creator> + <pubDate>2020-03-26</pubDate> + <abstract> + <para>Cartographie de l'occupation ancienne du sol du massif des Pyrénées réalisée à partir de la digitalisation des minutes de cartes d'Etat Major. (2012-04-01)</para> + </abstract> + <keywordSet> + <keyword keywordType="theme">Occupation du sol</keyword> + <keyword keywordType="theme">Forêts anciennes</keyword> + <keyword keywordType="theme">Digitalisation</keyword> + <keyword keywordType="theme">Pyrénées</keyword> + <keyword keywordType="theme">Minutes d'Etat Major</keyword> + <keywordThesaurus>GENERAL</keywordThesaurus> + </keywordSet> + <intellectualRights> + <para>This work is licensed under the Creative Commons Attribution 4.0 International License.To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.</para> + </intellectualRights> + <coverage> + <!--No geographic description provided--> + <!--Geographic coverage--> + <geographicCoverage> + <geographicDescription>No geographic description provided.</geographicDescription> + <boundingCoordinates> + <westBoundingCoordinate>311090.112199999</westBoundingCoordinate> + <eastBoundingCoordinate>714654.00</eastBoundingCoordinate> + <northBoundingCoordinate>6269615.00</northBoundingCoordinate> + <southBoundingCoordinate>6137120.9254</southBoundingCoordinate> + </boundingCoordinates> + </geographicCoverage> + <!--Temporal coverage--> + <temporalCoverage> + <rangeOfDates> + <beginDate> + <calendarDate>1840</calendarDate> + </beginDate> + <endDate> + <calendarDate>1880</calendarDate> + </endDate> + </rangeOfDates> + </temporalCoverage> + </coverage> + <contact> + <individualName> + <surName>Wilfried Heintz</surName> + </individualName> + <organizationName>INRAE, UMR DYNAFOR</organizationName> + <positionName>Engineer</positionName> + <address> + <deliveryPoint>24 chemin de Borde Rouge CS 52627</deliveryPoint> + <city>Castanet-Tolosan</city> + <postalCode>31326</postalCode> + <country>France</country> + </address> + <phone>(+33)561285516</phone> + <electronicMailAddress>wilfried.heintz@inrae.fr</electronicMailAddress> + </contact> + </dataset> +</eml:eml>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xmlstarlet.xml Sun Mar 06 22:10:31 2022 +0000 @@ -0,0 +1,54 @@ +<tool id="xmlstarlet" name="xmlstarlet" version="1.6.1"> + <description>convert a metadata XML file in one standard to another</description> + <requirements> + <requirement type="package" version="1.6.1">xmlstarlet</requirement> + </requirements> + <command detect_errors="exit_code"><![CDATA[ +xml tr '$xsl' '$input' > '$output' + ]]> + </command> + <inputs> + <param name="input" type="data" format="xml" label="input xml file to convert" help="A xml file corresponding to a xsd schema you want to convert in another." /> + <param name="xsl" type="data" format="xml" label="input xsl convertion file" help="A xsl file describing the mapping between a first xsd specification to another." /> + </inputs> + <outputs> + <data name="output" format="xml" label="${tool.name} on ${on_string}: Converted xml" /> + </outputs> + <tests> + <!-- Ensure conversion works --> + <test expect_num_outputs="1"> + <param name="input" value="input_standardiso19115.xml" ftype="xml"/> + <param name="xsl" value="iso2eml_all_in_one.xsl" ftype="xml"/> + <output name="output" file="output_standardEML.xml" /> + </test> + </tests> + <help> + +.. class:: infomark + +**What it does** + +This tool converts a xml file to another using a xsl coversion file to specify the translation to be done, from a wsd schema to another. + +----- + +**Inputs** + +A xml metadata file using a standard (for exemple EML, ISO19115,...) and a xsl file describing the mapping between the standard terms from input file and terms of the searched output standard. + +----- + +**Outputs** + +A xml metadata file using a new standard (for example ISO19115, EML, ...). + </help> + <citations> + <citation type="bibtex">@ARTICLE{Kim07aninterior-point, + author = {Mikhail Grushinskiy}, + title = {XMLStarlet Command Line XML Toolkit}, + howpublished = "\url{http://xmlstar.sourceforge.net/}", + year = {2021}, + note = "{online; accessed 08-November-2021}" + }</citation> + </citations> +</tool>