diff --git a/resources/xsl/4.1/doi2csv.xsl b/resources/xsl/4.1/doi2csv.xsl index 1dde4c96f74632c978ed379169eb18ddbe4f23a7..0b3048bd67547173ffd857be9025c3a6d87c293b 100644 --- a/resources/xsl/4.1/doi2csv.xsl +++ b/resources/xsl/4.1/doi2csv.xsl @@ -4,8 +4,11 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:d="http://datacite.org/schema/kernel-4" exclude-result-prefixes="d" - xsi:schemaLocation="http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4/metadata.xsd"> + xsi:schemaLocation="http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4.1/metadata.xsd"> + <!-- + TODO: support fundingReference element + --> <xsl:output method="text" indent="no" omit-xml-declaration="yes" encoding="utf-8"/> <xsl:strip-space elements="*"/> @@ -33,9 +36,11 @@ <!-- 2. Creator(s) --> <xsl:template match="d:creators/d:creator"> - <xsl:call-template name="row"> + <xsl:call-template name="rowName"> <xsl:with-param name="key">creatorName</xsl:with-param> <xsl:with-param name="value" select="d:creatorName/text()"/> + <xsl:with-param name="affiliation" select="d:affiliation/text()"/> + <xsl:with-param name="orcid" select="d:nameIdentifier[@nameIdentifierScheme = 'ORCID']/text()"/> </xsl:call-template> </xsl:template> @@ -80,10 +85,12 @@ <!-- 7. Contributor(s) --> <xsl:template match="d:contributors/d:contributor"> - <xsl:call-template name="row"> + <xsl:call-template name="rowName"> <xsl:with-param name="key">contributorName</xsl:with-param> <xsl:with-param name="attr" select="@contributorType"/> <xsl:with-param name="value" select="d:contributorName/text()"/> + <xsl:with-param name="affiliation" select="d:affiliation/text()"/> + <xsl:with-param name="orcid" select="d:nameIdentifier[@nameIdentifierScheme = 'ORCID']/text()"/> </xsl:call-template> </xsl:template> @@ -215,6 +222,16 @@ </xsl:call-template> </xsl:template> + <!-- 19. FundingReference(s) --> + <xsl:template match="d:fundingReferences/d:fundingReference"> + <xsl:call-template name="rowFunder"> + <xsl:with-param name="key">funderName</xsl:with-param> + <xsl:with-param name="value" select="d:funderName/text()"/> + <xsl:with-param name="awardNumber" select="d:awardNumber/text()"/> + <xsl:with-param name="awardTitle" select="d:awardTitle/text()"/> + </xsl:call-template> + </xsl:template> + <!-- override the built-in template rule for text nodes --> <xsl:template match="text()"/> @@ -237,6 +254,66 @@ <xsl:text> </xsl:text> </xsl:template> + <xsl:template name="rowName"> + <xsl:param name="key"/> + <xsl:param name="attr" select="''"/> + <xsl:param name="attr2" select="''"/> + <xsl:param name="value" select="''"/> + <xsl:param name="affiliation" select="''"/> + <xsl:param name="orcid" select="''"/> + + <xsl:call-template name="pair"> + <xsl:with-param name="key" select="$key"/> + <xsl:with-param name="attr" select="$attr"/> + <xsl:with-param name="attr2" select="$attr2"/> + <xsl:with-param name="value" select="$value"/> + </xsl:call-template> + + <xsl:if test="string-length($affiliation) != 0"> + <xsl:call-template name="pair"> + <xsl:with-param name="key" select="'affiliation'"/> + <xsl:with-param name="value" select="$affiliation"/> + </xsl:call-template> + </xsl:if> + + <xsl:if test="string-length($orcid) != 0"> + <xsl:call-template name="pair"> + <xsl:with-param name="key" select="'nameIdentifier:ORCID'"/> + <xsl:with-param name="value" select="$orcid"/> + </xsl:call-template> + </xsl:if> + + <xsl:text> </xsl:text> + </xsl:template> + + <xsl:template name="rowFunder"> + <xsl:param name="key"/> + <xsl:param name="value" select="''"/> + <xsl:param name="awardNumber" select="''"/> + <xsl:param name="awardTitle" select="''"/> + + <xsl:call-template name="pair"> + <xsl:with-param name="key" select="$key"/> + <xsl:with-param name="value" select="$value"/> + </xsl:call-template> + + <xsl:if test="string-length($awardNumber) != 0"> + <xsl:call-template name="pair"> + <xsl:with-param name="key" select="'awardNumber'"/> + <xsl:with-param name="value" select="$awardNumber"/> + </xsl:call-template> + </xsl:if> + + <xsl:if test="string-length($awardTitle) != 0"> + <xsl:call-template name="pair"> + <xsl:with-param name="key" select="'awardTitle'"/> + <xsl:with-param name="value" select="$awardTitle"/> + </xsl:call-template> + </xsl:if> + + <xsl:text> </xsl:text> + </xsl:template> + <xsl:template name="pair"> <xsl:param name="key"/> <xsl:param name="attr" select="''"/> @@ -270,6 +347,7 @@ </xsl:otherwise> </xsl:choose> </xsl:if> + <xsl:text>;</xsl:text> </xsl:template> diff --git a/resources/xsl/4.1/doi2landing.xsl b/resources/xsl/4.1/doi2landing.xsl index 71119381ced63c5b2c5d8caace728884a39ce1b8..59c3550dda36f486b0338b45a97abd40b5b59c4f 100644 --- a/resources/xsl/4.1/doi2landing.xsl +++ b/resources/xsl/4.1/doi2landing.xsl @@ -7,7 +7,7 @@ xmlns:d="http://datacite.org/schema/kernel-4" exclude-result-prefixes="d" xsi:schemaLocation="http://www.w3.org/1999/xhtml http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd - http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4/metadata.xsd"> + http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4.1/metadata.xsd"> <xsl:output method="xml" indent="no" omit-xml-declaration="no" media-type="text/html" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.1//EN" diff --git a/resources/xsl/4.1/xml2doi.xsl b/resources/xsl/4.1/xml2doi.xsl index 2d1c887e07169d19038bde859df7d26ea6564d81..7249efdd88a901b673e528d63e2d9ccb8b01a830 100644 --- a/resources/xsl/4.1/xml2doi.xsl +++ b/resources/xsl/4.1/xml2doi.xsl @@ -12,7 +12,7 @@ xmlns:gml="http://www.opengis.net/gml" xmlns:gmx="http://www.isotc211.org/2005/gmx" exclude-result-prefixes="d gmd gco gml gmx" - xsi:schemaLocation="http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4/metadata.xsd" + xsi:schemaLocation="http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4.1/metadata.xsd" xmlns:exsl="http://exslt.org/common" extension-element-prefixes="exsl"> diff --git a/src/test/resources/datacite-example-fundingReference-v.4.1.txt b/src/test/resources/datacite-example-fundingReference-v.4.1.txt new file mode 100644 index 0000000000000000000000000000000000000000..80da725431bbeda8c6ab183373b11aadb124496e --- /dev/null +++ b/src/test/resources/datacite-example-fundingReference-v.4.1.txt @@ -0,0 +1,27 @@ +# Generated by doi2csv.xsl;; +identifier:DOI;10.5281/zenodo.47394; +creatorName;Dedeurwaerdere, Tom;affiliation;Université catholique de Louvain; +title;Combining internal and external motivations in multi-actor governance arrangements for biodiversity and ecosystem services; +publisher;Zenodo; +publicationYear;2016; +subject;Internal motivations; +subject;Biodiversity; +subject;Multi-actor governance; +subject;Payment for ecosystem services; +subject;Crowding out; +funderName;European Commission;awardNumber;282625;awardTitle;MOTivational strength of ecosystem services and alternative ways to express the value of BIOdiversity; +funderName;European Commission;awardNumber;284382;awardTitle;Institutionalizing global genetic-resource commons. Global Strategies for accessing and using essential public knowledge assets in the life sciences; +date:Issued;2016-03-11; +resourceType:Dataset;; +alternateIdentifier:URL;http://zenodo.org/record/47394; +relatedIdentifier:HasPart:URL;https://zenodo.org/record/47394/files/Data_All_Internal_motivations.pdf; +relatedIdentifier:HasPart:URL;https://zenodo.org/record/47394/files/survey_questionnaire_internal_motivations.pdf; +rights;Open Access;;rightsURI;info:eu-repo/semantics/openAccess; +rights;Creative Commons Zero 1.0 Universal;;rightsURI;http://creativecommons.org/publicdomain/zero/1.0/; +description:Abstract;"<p>These files provide the original survey data of the paper on motivations for biodiversity conservation in Europe. This paper analyses the possibility of building a mutually supportive dynamics between + internally and<br /> externally motivated behaviour for biodiversity conservation and ecosystem services provision. To this<br /> purpose a face to face survey amongst 169 key actors of 34 highly successful and prominent + biodiversity<br /> arrangements in seven EU countries was conducted. The main<br /> finding of the paper is the feasibility of<br /> combining inherently intrinsically motivated behaviours (providing enjoyment, pleasure from<br + /> experimentation and learning, aesthetic satisfaction) and internalized extrinsic motivations (related<br /> to the identification with the collective goals of conservation policy) through a common set of governance<br /> features. + Successful initiatives that combine internal and external motivations share the following<br /> features: inclusive decision making processes, a broad monitoring by &ldquo,peers&rdquo, beyond the core staff of the<br /> + initiatives, and a context that is supportive for the building of autonomous actor competences. These<br /> findings are in line with the psycho-sociological theory of motivation, which shows the importance of a<br /> psycho-social + context leading to a subjective perception of autonomy and a sense of competence of the<br /> actors.</p>"; diff --git a/src/test/resources/datacite-example-fundingReference-v.4.1.xml b/src/test/resources/datacite-example-fundingReference-v.4.1.xml new file mode 100644 index 0000000000000000000000000000000000000000..ddec7dce99236145920f814c119af1abe72f19a6 --- /dev/null +++ b/src/test/resources/datacite-example-fundingReference-v.4.1.xml @@ -0,0 +1,61 @@ +<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://datacite.org/schema/kernel-4" xsi:schemaLocation="http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4.1/metadata.xsd"> + <identifier identifierType="DOI">10.5281/zenodo.47394</identifier> + <creators> + <creator> + <creatorName nameType="Personal">Dedeurwaerdere, Tom</creatorName> + <givenName>Tom</givenName> + <familyName>Dedeurwaerdere</familyName> + <affiliation>Université catholique de Louvain</affiliation> + </creator> + </creators> + <titles> + <title xml:lang="en">Combining internal and external motivations in multi-actor governance arrangements for biodiversity and ecosystem services</title> + </titles> + <publisher>Zenodo</publisher> + <publicationYear>2016</publicationYear> + <subjects> + <subject xml:lang="en">Internal motivations</subject> + <subject xml:lang="en">Biodiversity</subject> + <subject xml:lang="en">Multi-actor governance</subject> + <subject xml:lang="en">Payment for ecosystem services</subject> + <subject xml:lang="en">Crowding out</subject> + </subjects> + <fundingReferences> + <fundingReference> + <funderName>European Commission</funderName> + <funderIdentifier funderIdentifierType="Crossref Funder ID">http://doi.org/10.13039/501100000780</funderIdentifier> + <awardNumber awardURI="http://cordis.europa.eu/project/rcn/100180_en.html">282625</awardNumber> + <awardTitle>MOTivational strength of ecosystem services and alternative ways to express the value of BIOdiversity</awardTitle> + </fundingReference> + <fundingReference> + <funderName>European Commission</funderName> + <funderIdentifier funderIdentifierType="Crossref Funder ID">http://doi.org/10.13039/501100000780</funderIdentifier> + <awardNumber awardURI="http://cordis.europa.eu/project/rcn/100603_en.html">284382</awardNumber> + <awardTitle>Institutionalizing global genetic-resource commons. Global Strategies for accessing and using essential public knowledge assets in the life sciences</awardTitle> + </fundingReference> + </fundingReferences> + <dates> + <date dateType="Issued">2016-03-11</date> + </dates> + <resourceType resourceTypeGeneral="Dataset"/> + <alternateIdentifiers> + <alternateIdentifier alternateIdentifierType="URL">http://zenodo.org/record/47394</alternateIdentifier> + </alternateIdentifiers> + <relatedIdentifiers> + <relatedIdentifier relatedIdentifierType="URL" relationType="HasPart">https://zenodo.org/record/47394/files/Data_All_Internal_motivations.pdf</relatedIdentifier> + <relatedIdentifier relatedIdentifierType="URL" relationType="HasPart">https://zenodo.org/record/47394/files/survey_questionnaire_internal_motivations.pdf</relatedIdentifier> + </relatedIdentifiers> + <rightsList> + <rights rightsURI="info:eu-repo/semantics/openAccess">Open Access</rights> + <rights rightsURI="http://creativecommons.org/publicdomain/zero/1.0/">Creative Commons Zero 1.0 Universal</rights> + </rightsList> + <descriptions> + <description xml:lang="en" descriptionType="Abstract"><p>These files provide the original survey data of the paper on motivations for biodiversity conservation in Europe. This paper analyses the possibility of building a mutually supportive dynamics between + internally and<br /> externally motivated behaviour for biodiversity conservation and ecosystem services provision. To this<br /> purpose a face to face survey amongst 169 key actors of 34 highly successful and prominent + biodiversity<br /> arrangements in seven EU countries was conducted. The main<br /> finding of the paper is the feasibility of<br /> combining inherently intrinsically motivated behaviours (providing enjoyment, pleasure from<br + /> experimentation and learning, aesthetic satisfaction) and internalized extrinsic motivations (related<br /> to the identification with the collective goals of conservation policy) through a common set of governance<br /> features. + Successful initiatives that combine internal and external motivations share the following<br /> features: inclusive decision making processes, a broad monitoring by &ldquo;peers&rdquo; beyond the core staff of the<br /> + initiatives, and a context that is supportive for the building of autonomous actor competences. These<br /> findings are in line with the psycho-sociological theory of motivation, which shows the importance of a<br /> psycho-social + context leading to a subjective perception of autonomy and a sense of competence of the<br /> actors.</p></description> + </descriptions> +</resource>