|
Commit message:
"planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/main/tools-ecology/tools/xmlstarlet commit 6ebe0c98dd0d727b9202422e64f6d5f7697743fb" |
|
added:
README.md test-data/input_standardiso19115.xml test-data/iso2eml_all_in_one.xsl test-data/output_standardEML.xml xmlstarlet.xml |
| b |
| diff -r 000000000000 -r 4a9ac1df3278 README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.md Sun Mar 06 22:10:31 2022 +0000 |
| b |
| @@ -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. |
| b |
| diff -r 000000000000 -r 4a9ac1df3278 test-data/input_standardiso19115.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/input_standardiso19115.xml Sun Mar 06 22:10:31 2022 +0000 |
| b |
| b'@@ -0,0 +1,762 @@\n+<?xml version="1.0" encoding="UTF-8"?>\n+<gmd:MD_Metadata xmlns:gmd="http://www.isotc211.org/2005/gmd"\n+ xmlns:gco="http://www.isotc211.org/2005/gco"\n+ xmlns:gfc="http://www.isotc211.org/2005/gfc"\n+ xmlns:gmi="http://standards.iso.org/iso/19115/-2/gmi/1.0"\n+ xmlns:gmx="http://www.isotc211.org/2005/gmx"\n+ xmlns:gts="http://www.isotc211.org/2005/gts"\n+ xmlns:srv="http://www.isotc211.org/2005/srv"\n+ xmlns:gml="http://www.opengis.net/gml/3.2"\n+ xmlns:gmlcov="http://www.opengis.net/gmlcov/1.0"\n+ xmlns:gmlrgrid="http://www.opengis.net/gml/3.3/rgrid"\n+ xmlns:xlink="http://www.w3.org/1999/xlink"\n+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\n+ xsi:schemaLocation="http://www.isotc211.org/2005/gmd http://schemas.opengis.net/csw/2.0.2/profiles/apiso/1.0.0/apiso.xsd">\n+ <gmd:fileIdentifier>\n+ <gco:CharacterString>pyrenees</gco:CharacterString>\n+ </gmd:fileIdentifier>\n+ <gmd:language>\n+ <gmd:LanguageCode codeList="http://www.loc.gov/standards/iso639-2/" codeListValue="fre"\n+ codeSpace="ISO 639-2">French</gmd:LanguageCode>\n+ </gmd:language>\n+ <gmd:characterSet>\n+ <gmd:MD_CharacterSetCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MD_CharacterSetCode"\n+ codeListValue="utf8">utf8</gmd:MD_CharacterSetCode>\n+ </gmd:characterSet>\n+ <gmd:hierarchyLevel>\n+ <gmd:MD_ScopeCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MX_ScopeCode"\n+ codeListValue="dataset"\n+ codeSpace="ISOTC211/19115">dataset</gmd:MD_ScopeCode>\n+ </gmd:hierarchyLevel>\n+ <gmd:contact>\n+ <gmd:CI_ResponsibleParty>\n+ <gmd:individualName>\n+ <gco:CharacterString>Wilfried Heintz</gco:CharacterString>\n+ </gmd:individualName>\n+ <gmd:organisationName>\n+ <gco:CharacterString>INRAE, UMR DYNAFOR</gco:CharacterString>\n+ </gmd:organisationName>\n+ <gmd:positionName>\n+ <gco:CharacterString>Engineer</gco:CharacterString>\n+ </gmd:positionName>\n+ <gmd:contactInfo>\n+ <gmd:CI_Contact>\n+ <gmd:phone>\n+ <gmd:CI_Telephone>\n+ <gmd:voice>\n+ <gco:CharacterString>(+33)561285516</gco:CharacterString>\n+ </gmd:voice>\n+ <gmd:facsimile gco:nilReason="missing"/>\n+ </gmd:CI_Telephone>\n+ </gmd:phone>\n+ <gmd:address>\n+ <gmd:CI_Address>\n+ <gmd:deliveryPoint>\n+ <gco:CharacterString>24 chemin de Borde Rouge CS 52627</gco:CharacterString>\n+ </gmd:deliveryPoint>\n+ <gmd:city>\n+ <gco:CharacterString>Castanet-Tolosan</gco:CharacterString>\n+ </gmd:city>\n+ <gmd:postalCode>\n+ <gco:CharacterString>31326</gco:CharacterString>\n+ </gmd:postalCode>\n+ <gmd:country>\n+ <gco:CharacterString>France</gco:CharacterString>\n+ </gmd:country>\n+ <gmd:electronicMailAddress>\n+ <gco:CharacterString>wilfried.heintz@inrae.fr</gco:CharacterString>\n+ </gmd:electronicMailAddress>\n+ </gmd:CI_Address>\n+ </gmd:address>\n+ <gmd:onlineResource>\n+ <gmd:CI_OnlineResource>\n+ <gmd:linkage gco:nilReason="missing"/>\n+ <gmd:name gco:nilReason="missing"/>\n+ </gmd:CI_OnlineResource>\n+ </gmd:onlineResource>\n+ </gmd:CI_Contact>\n+ </gmd:cont'..b' </gmd:protocol>\n+ <gmd:name>\n+ <gco:CharacterString>pyrenees</gco:CharacterString>\n+ </gmd:name>\n+ <gmd:description>\n+ <gco:CharacterString>For\xc3\xaats anciennes des Pyr\xc3\xa9n\xc3\xa9es - GIS Data Download (GML)</gco:CharacterString>\n+ </gmd:description>\n+ </gmd:CI_OnlineResource>\n+ </gmd:onLine>\n+ <gmd:onLine>\n+ <gmd:CI_OnlineResource>\n+ <gmd:linkage>\n+ <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>\n+ </gmd:linkage>\n+ <gmd:protocol>\n+ <gco:CharacterString>WWW:LINK-1.0-http--link</gco:CharacterString>\n+ </gmd:protocol>\n+ <gmd:name>\n+ <gco:CharacterString>pyrenees</gco:CharacterString>\n+ </gmd:name>\n+ <gmd:description>\n+ <gco:CharacterString>For\xc3\xaats anciennes des Pyr\xc3\xa9n\xc3\xa9es - GIS Data Download (GeoJSON)</gco:CharacterString>\n+ </gmd:description>\n+ </gmd:CI_OnlineResource>\n+ </gmd:onLine>\n+ <gmd:onLine>\n+ <gmd:CI_OnlineResource>\n+ <gmd:linkage>\n+ <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>\n+ </gmd:linkage>\n+ <gmd:protocol>\n+ <gco:CharacterString>WWW:LINK-1.0-http--link</gco:CharacterString>\n+ </gmd:protocol>\n+ <gmd:name>\n+ <gco:CharacterString>pyrenees</gco:CharacterString>\n+ </gmd:name>\n+ <gmd:description>\n+ <gco:CharacterString>For\xc3\xaats anciennes des Pyr\xc3\xa9n\xc3\xa9es - GIS Data Download (ESRI Shapefile)</gco:CharacterString>\n+ </gmd:description>\n+ </gmd:CI_OnlineResource>\n+ </gmd:onLine>\n+ </gmd:MD_DigitalTransferOptions>\n+ </gmd:transferOptions>\n+ </gmd:MD_Distribution>\n+ </gmd:distributionInfo>\n+ <gmd:dataQualityInfo>\n+ <gmd:DQ_DataQuality>\n+ <gmd:scope>\n+ <gmd:DQ_Scope>\n+ <gmd:level>\n+ <gmd:MD_ScopeCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MX_ScopeCode"\n+ codeListValue="dataset"\n+ codeSpace="ISOTC211/19115">dataset</gmd:MD_ScopeCode>\n+ </gmd:level>\n+ </gmd:DQ_Scope>\n+ </gmd:scope>\n+ <gmd:lineage>\n+ <gmd:LI_Lineage>\n+ <gmd:statement>\n+ <gco:CharacterString>La r\xc3\xa9alisation de cette carte en 2013 sur l\xe2\x80\x99ensemble du massif pyr\xc3\xa9n\xc3\xa9en a n\xc3\xa9cessit\xc3\xa9 l\xe2\x80\x99exploitation de 33 dalles minutes d\xe2\x80\x99Etat-Major et un travail manuel de g\xc3\xa9or\xc3\xa9ferencement et vectorisation des polygones d\'occupation des sols. Nous ne pouvons donc pas garantir les 100% de bien class\xc3\xa9s.</gco:CharacterString>\n+ </gmd:statement>\n+ </gmd:LI_Lineage>\n+ </gmd:lineage>\n+ </gmd:DQ_DataQuality>\n+ </gmd:dataQualityInfo>\n+ <!--Metadata Creation date/time: 2020-03-26T15:47:16-->\n+ <!--ISO 19139 XML generated by geometa R package - Version 0.6-1-->\n+ <!--ISO 19139 XML compliance: NO-->\n+ <!--geometa R package information:\tContact: Emmanuel Blondel emmanuel.blondel1@gmail.com\tURL: https://github.com/eblondel/geometa/wiki\tBugReports: https://github.com/eblondel/geometa/issues-->\n+</gmd:MD_Metadata>\n\\ No newline at end of file\n' |
| b |
| diff -r 000000000000 -r 4a9ac1df3278 test-data/iso2eml_all_in_one.xsl --- /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 |
| [ |
| b'@@ -0,0 +1,745 @@\n+<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" \n+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \n+ xmlns:eml="eml://ecoinformatics.org/eml-2.1.1" \n+ xmlns:stmml="http://www.xml-cml.org/schema/stmml" \n+ xmlns:sw="eml://ecoinformatics.org/software-2.1.1" \n+ xmlns:cit="eml://ecoinformatics.org/literature-2.1.1" \n+ xmlns:ds="eml://ecoinformatics.org/dataset-2.1.1" \n+ xmlns:prot="eml://ecoinformatics.org/protocol-2.1.1" \n+ xmlns:doc="eml://ecoinformatics.org/documentation-2.1.1" \n+ xmlns:res="eml://ecoinformatics.org/resource-2.1.1" \n+ xmlns:gmd="http://www.isotc211.org/2005/gmd" \n+ xmlns:gco="http://www.isotc211.org/2005/gco"\n+ xmlns:gml="http://www.opengis.net/gml/3.2"\n+ xmlns:gmx="http://www.isotc211.org/2005/gmx"\n+ xmlns:xlink="http://www.w3.org/1999/xlink"\n+ xmlns:xs="http://www.w3.org/2001/XMLSchema" \n+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >\n+\n+<!--xsl:import href="iso2eml-party.xsl"/>\n+<xsl:import href="iso2eml-coverage.xsl"/>\n+<xsl:import href="iso2eml-project.xsl"/-->\n+\n+<xsl:output method="xml" encoding="UTF-8" indent="yes" />\n+<xsl:strip-space elements="*" />\n+\n+<xsl:template match="/gmd:MD_Metadata">\n+<eml:eml>\n+ <xsl:attribute name="xsi:schemaLocation">eml://ecoinformatics.org/eml-2.1.1 ~/development/eml/eml.xsd</xsl:attribute>\n+ <!-- Add the packageId -->\n+ <xsl:attribute name="packageId"><xsl:value-of select="normalize-space(gmd:fileIdentifier/gco:CharacterString)"/></xsl:attribute>\n+ <xsl:attribute name="system"><xsl:value-of select="\'knb\'"/></xsl:attribute>\n+ <xsl:attribute name="scope"><xsl:value-of select="\'system\'"/></xsl:attribute>\n+ <dataset>\n+ <!-- Add the title -->\n+ <xsl:for-each select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString">\n+ <title><xsl:value-of select="normalize-space(.)"/></title>\n+ </xsl:for-each>\n+ \n+ <!-- Add creators -->\n+ <xsl:call-template name="creators">\n+ <xsl:with-param name="doc" select="." />\n+ </xsl:call-template>\n+\n+ <!-- Add additional parties -->\n+ <xsl:call-template name="additional-parties">\n+ <xsl:with-param name="doc" select="." />\n+ </xsl:call-template>\n+\n+ <!-- Add the pubDate if available -->\n+ <xsl:if test="gmd:dateStamp/gco:DateTime != \'\'">\n+ <pubDate>\n+ <xsl:choose>\n+ <xsl:when test="contains(gmd:dateStamp/gco:DateTime, \'T\')">\n+ <xsl:value-of select="normalize-space(substring-before(gmd:dateStamp/gco:DateTime, \'T\'))" />\n+ </xsl:when>\n+ <xsl:otherwise>\n+ <xsl:value-of select="normalize-space(gmd:dateStamp/gco:DateTime)" />\n+ </xsl:otherwise>\n+ </xsl:choose>\n+ </pubDate>\n+ </xsl:if>\n+ \n+ <!-- Add the language -->\n+ <xsl:if test="gmd:language/gco:CharacterString != \'\'">\n+ <language><xsl:value-of select="normalize-space(gmd:language/gco:CharacterString)" /></language> \n+ </xsl:if>\n+ \n+ <!-- Add the abstract -->\n+ <abstract>\n+ <para><xsl:value-of select="normalize-space(gmd:identificationInfo/gmd:MD_DataIdentification/gmd:abstract/gco:CharacterString)" /></para>\n+ </abstract>\n+ \n+ <!-- Add keywords -->\n+ <xsl:if test="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords != \'\'">\n+ <xsl:call-template name="keywords">\n+ <xsl:with-param name="keys" select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords" />\n+ </xsl:call-template>\n+ </xsl:if>\n+\n+ <!-- Add any gmd:topicCategory fields as keywords too -->\n+ <xsl:if test="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:topicCategory !='..b'ataIdentification/gmd:citation/gmd:CI_Citation/gmd:citedResponsibleParty/gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="publisher"]]\'>\n+ <publisher>\n+ <xsl:call-template name="party">\n+ <xsl:with-param name="party" select = "." />\n+ </xsl:call-template>\n+ </publisher>\n+ </xsl:for-each>\n+ </xsl:when>\n+ <xsl:otherwise>\n+ <xsl:for-each select=\'$doc//gmd:CI_ResponsibleParty[gmd:role/gmd:CI_RoleCode[@codeListValue="publisher"]]\'>\n+ <publisher>\n+ <xsl:call-template name="party">\n+ <xsl:with-param name="party" select = "." />\n+ </xsl:call-template>\n+ </publisher>\n+ </xsl:for-each>\n+ </xsl:otherwise>\n+ </xsl:choose>\n+</xsl:template>\n+\n+<!-- Handle eml-party fields --> \n+<xsl:template name="party">\n+ <xsl:param name = "party" />\n+ <xsl:apply-templates /> \n+ <xsl:if test="$party//gmd:voice/gco:CharacterString!=\'\'">\n+ <phone><xsl:value-of select="normalize-space($party//gmd:voice/gco:CharacterString)"/></phone>\n+ </xsl:if>\n+ <xsl:if test="$party//gmd:CI_Address/gmd:electronicMailAddress/gco:CharacterString!=\'\'">\n+ <electronicMailAddress><xsl:value-of select="normalize-space($party//gmd:CI_Address/gmd:electronicMailAddress/gco:CharacterString)"/></electronicMailAddress>\n+ </xsl:if>\n+ <xsl:if test="$party//gmd:onlineResource/gmd:CI_OnlineResource/gmd:linkage/gmd:URL!=\'\'">\n+ <onlineUrl><xsl:value-of select="normalize-space($party//gmd:onlineResource/gmd:CI_OnlineResource/gmd:linkage/gmd:URL)"/></onlineUrl>\n+ </xsl:if>\n+</xsl:template>\n+\n+<!-- Add an individualName -->\n+<xsl:template match="gmd:individualName">\n+ <individualName>\n+ <surName><xsl:value-of select="normalize-space(gco:CharacterString)"/></surName>\n+ </individualName>\n+</xsl:template>\n+\n+<!-- Add an organizationName -->\n+<xsl:template match="gmd:organisationName">\n+ <organizationName><xsl:value-of select="normalize-space(gco:CharacterString)"/></organizationName>\n+</xsl:template>\n+\n+<!-- Add a positionName -->\n+<xsl:template match="gmd:positionName">\n+ <positionName><xsl:value-of select="normalize-space(gco:CharacterString)"/></positionName>\n+</xsl:template>\n+\n+<!-- voice, email, and role are all noops so they can be reordered correctly -->\n+<xsl:template match="gmd:voice" />\n+<xsl:template match="gmd:electronicMailAddress" />\n+<xsl:template match="gmd:role" />\n+<xsl:template match="gmd:onlineResource" />\n+\n+<!-- Add an Address -->\n+<xsl:template match="gmd:CI_Address"> \n+ <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!=\'\'">\n+ <address>\n+ <xsl:if test="gmd:deliveryPoint/gco:CharacterString!=\'\'">\n+ <deliveryPoint><xsl:value-of select="normalize-space(gmd:deliveryPoint/gco:CharacterString)"/></deliveryPoint>\n+ </xsl:if>\n+ <xsl:if test="gmd:city/gco:CharacterString!=\'\'">\n+ <city><xsl:value-of select="normalize-space(gmd:city/gco:CharacterString)"/></city>\n+ </xsl:if>\n+ <xsl:if test="gmd:administrativeArea/gco:CharacterString!=\'\'">\n+ <administrativeArea><xsl:value-of select="normalize-space(gmd:administrativeArea/gco:CharacterString)"/></administrativeArea>\n+ </xsl:if>\n+ <xsl:if test="gmd:postalCode/gco:CharacterString!=\'\'">\n+ <postalCode><xsl:value-of select="normalize-space(gmd:postalCode/gco:CharacterString)"/></postalCode>\n+ </xsl:if>\n+ <xsl:if test="gmd:country/gco:CharacterString!=\'\'">\n+ <country><xsl:value-of select="normalize-space(gmd:country/gco:CharacterString)"/></country>\n+ </xsl:if>\n+ </address>\n+ </xsl:if>\n+</xsl:template>\n+\n+</xsl:stylesheet>\n' |
| b |
| diff -r 000000000000 -r 4a9ac1df3278 test-data/output_standardEML.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/output_standardEML.xml Sun Mar 06 22:10:31 2022 +0000 |
| b |
| @@ -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> |
| b |
| diff -r 000000000000 -r 4a9ac1df3278 xmlstarlet.xml --- /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> |