diff --git a/source/_four.html.md.erb b/source/_four.html.md.erb index 1b3df18..20bd7a3 100644 --- a/source/_four.html.md.erb +++ b/source/_four.html.md.erb @@ -1,11 +1,10 @@ -## Metadata Schema 4.6 +## Metadata Schema 4.7 -Released <%= Date.parse("2024-12-05").strftime("%-d %b %Y") %>. Changes in this version include: +Released <%= Date.parse("2026-03-31").strftime("%-d %b %Y") %>. Changes in this version include: -* New resourceTypeGeneral values: Award and Project -* New relatedIdentifierType values: CSTR and RRID -* New relationType pair: IsTranslationOf and HasTranslation -* New contributorType: Translator -* New dateType: Coverage +* New resourceTypeGeneral values: Poster and Presentation +* New relatedIdentifierType values: RAiD and SWHID +* New relationType value: Other +* New relationTypeInformation sub-property of RelatedIdentifier and RelatedItem -More info +More info diff --git a/source/_versions.html.md.erb b/source/_versions.html.md.erb index bb59592..8b72a2b 100644 --- a/source/_versions.html.md.erb +++ b/source/_versions.html.md.erb @@ -1,5 +1,16 @@ ## DataCite Metadata Schema 4 +### [DataCite Metadata Schema 4.7](/meta/kernel-4.7/) + +Released <%= Date.parse("2026-03-31").strftime("%-d %b %Y") %>. Changes in this version include: + +* Addition of new resourceTypeGeneral values: Poster and Presentation +* Addition of new relatedIdentifierType values: RAiD and SWHID +* Addition of new relationType value: Other +* Addition of new relationTypeInformation sub-property of RelatedIdentifier and RelatedItem + +
+ ### [DataCite Metadata Schema 4.6](/meta/kernel-4.6/) Released <%= Date.parse("2024-12-05").strftime("%-d %b %Y") %>. Changes in this version include: diff --git a/source/meta/kernel-4.7/example/datacite-example-audiovisual-v4.xml b/source/meta/kernel-4.7/example/datacite-example-audiovisual-v4.xml new file mode 100644 index 0000000..01cd3ee --- /dev/null +++ b/source/meta/kernel-4.7/example/datacite-example-audiovisual-v4.xml @@ -0,0 +1,42 @@ + + + 10.82433/9jbk-4c28 + + + Garcia, Sofia + Sofia + Garcia + + https://orcid.org/0000-0001-5727-2427 + Arizona State + University + + + + DOIs in Action: Making Presentations More Discoverable + + International Metadata Forum + 2025 + + 2025-08-11 + + Conference presentation recording + + https://example.org/metadata-forum-2025 + 10.82433/v14f-gk24 + + en + + Conference presentations are often + overlooked in discovery and citation systems. This presentation demonstrates practical + workflows for assigning DOIs to presentations, linking them to related datasets and + publications, and embedding identifiers in slide decks for easy sharing. By applying + these strategies, researchers can increase the visibility, impact, and reusability of + their talks beyond the event itself. + + \ No newline at end of file diff --git a/source/meta/kernel-4.7/example/datacite-example-award-v4.xml b/source/meta/kernel-4.7/example/datacite-example-award-v4.xml new file mode 100644 index 0000000..b014281 --- /dev/null +++ b/source/meta/kernel-4.7/example/datacite-example-award-v4.xml @@ -0,0 +1,51 @@ + + + 10.82433/p1zt-4c67 + + + The Research Trust + https://ror.org/12abcde34 + + + + Enhancing metadata for inclusive research on entrenched disadvantage + + The Research Trust + 2024 + Grant + + + Garcia, Sofia + Sofia + Garcia + https://orcid.org/0000-0001-5727-2427 + Arizona State University + + + Arizona State University + https://ror.org/03efmqc40 + + + + 2024-08-01 + 2025-01-01/2027-12-31 + 2028-01-01/2029-12-31 + + + 900000 USD + + + This funding award supports a project aimed at improving metadata practices to facilitate inclusive research on issues of entrenched disadvantage. The project focuses on creating robust, standardized metadata that accurately represents diverse populations and contexts. + + + https://grants.net/123456 + + + + The Research Trust + https://doi.org/10.13039/501100012345 + 123456 + Enhancing metadata for inclusive research on entrenched disadvantage + + + \ No newline at end of file diff --git a/source/meta/kernel-4.7/example/datacite-example-coverage-v4.xml b/source/meta/kernel-4.7/example/datacite-example-coverage-v4.xml new file mode 100644 index 0000000..91e7faf --- /dev/null +++ b/source/meta/kernel-4.7/example/datacite-example-coverage-v4.xml @@ -0,0 +1,49 @@ + + + 10.82433/pgk2-ar97 + + + European Social Fund/DABURH, Department of History, Leiden University + https://ror.org/027bh9e22 + + + + Amsterdam immigrants, 1578-1810 + Simon Hart database + + DANS Data Station Social Sciences and Humanities + 1995 + + + historical demography + immigration + Arts and Humanities + + + This dataset contains information about the number and origin of the Amsterdam immigrants in the period 1578-1810. The data are subdivided in total, male and female, per region or place of origin. The dataset is based on lists compiled by the Amsterdam archivist dr. Simon Hart and his colleagues between 1960 and 1979. + + + + Data Station Admin + Data Archiving and Networked Services (DANS) + + + + 1578-01-01/1810-12-31 + 1995-03-01/1995-11-29 + + nl + + D0049 + easy-dataset:36690 + + + + Amsterdam + + 52.377956 + 4.897070 + + + + \ No newline at end of file diff --git a/source/meta/kernel-4.7/example/datacite-example-dataset-v4.xml b/source/meta/kernel-4.7/example/datacite-example-dataset-v4.xml new file mode 100644 index 0000000..dcb320f --- /dev/null +++ b/source/meta/kernel-4.7/example/datacite-example-dataset-v4.xml @@ -0,0 +1,80 @@ + + + + 10.82433/9184-DY35 + + + National Gallery + https://ror.org/043kfff89 + + + + External Environmental Data, 2010-2020, National Gallery + + National Gallery + 2022 + Environmental data + + FOS: Earth and related environmental sciences + temperature + relative humidity + illuminance + moisture content + Environmental monitoring + + + + Padfield, Joseph + Joseph + Padfield + https://orcid.org/0000-0002-2572-6428 + National Gallery + + + Building Facilities Department + National Gallery + + + + 2010/2020 + 2010/2020 + 2022 + + en + + https://www.nationalgallery.org.uk/research/research-resources/research-papers/improving-our-environment + https://research.ng-london.org.uk/scientific/env/ + 10.1080/00393630.2018.1504449/ + 10.5281/zenodo.7629200 + + + 13.6 MB + + + application/json + + 1.0 + + Creative Commons Attribution Non Commercial 4.0 International + + + The National Gallery houses one of the greatest ‒ and most visited ‒ collections of Western European painting, often welcoming more than 6 million visitors a year. The Scientific Department researches the history of materials and techniques and their degradation mechanisms (fading, darkening, etc.), through analysis using a range of micro-analytical and imaging methods. It also works in the fields of preventive conservation and environmental management of galleries (monitoring, lighting, vibration), as well as the development of a wide range of new instruments and methods (both analytical and imaging) for technical examination of artworks, most often in collaboration with universities. The examination of the environmental conditions within The National Gallery began soon after it was established in 1824. Early concerns often related to dust and pollution. The first electronic data logger, recording light levels, was introduced in 1975, with the regular logging of temperature and relative humidity followed soon after. Today the Gallery has hundreds of sensors, monitoring the environmental conditions in over hundreds of locations, 24/7. The National Gallery currently archives millions of environmental readings every year, which are used to monitor the Gallery conditions ensuring the on-going care of the collections. These readings are also used to examine long term environmental trends, manage additional events, and within the planning and management of preventive conservation work and research at the National Gallery. The National Gallery Environmental Database is an internal, bespoke system which has been developed, over the last 20 years, to act as an archive for all of these environmental readings. This dataset contains a selected range of the data gathered from a few of the external sensors that have been used to monitor ambient light levels, temperature, relative humidity and air moisture content 24 hours a day, 7 days a week over the last two decades. + + + + Roof of National Gallery, London, UK + + 51.50872 + -0.12841 + + + + + + H2020 Excellent Science + https://doi.org/10.13039/100010662 + 871034 + Integrating Platforms for the European Research Infrastructure ON Heritage Science + + + diff --git a/source/meta/kernel-4.7/example/datacite-example-full-v4.xml b/source/meta/kernel-4.7/example/datacite-example-full-v4.xml new file mode 100644 index 0000000..8456b4e --- /dev/null +++ b/source/meta/kernel-4.7/example/datacite-example-full-v4.xml @@ -0,0 +1,320 @@ + + + + 10.82433/B09Z-4K37 + + + ExampleFamilyName, ExampleGivenName + ExampleGivenName + ExampleFamilyName + https://orcid.org/0000-0001-5727-2427 + ExampleAffiliation + + + ExampleOrganization + https://ror.org/04wxnsj81 + + + + Example Title + Example Subtitle + Example TranslatedTitle + Example AlternativeTitle + + Example Publisher + 2024 + Example ResourceType + + FOS: Computer and information sciences + Digital curation and preservation + Example Subject + + + + ExampleFamilyName, ExampleGivenName + ExampleGivenName + ExampleFamilyName + https://orcid.org/0000-0001-5727-2427 + ExampleAffiliation + + + ExampleFamilyName, ExampleGivenName + ExampleGivenName + ExampleFamilyName + https://orcid.org/0000-0001-5727-2427 + ExampleAffiliation + + + ExampleFamilyName, ExampleGivenName + ExampleGivenName + ExampleFamilyName + https://orcid.org/0000-0001-5727-2427 + ExampleAffiliation + + + ExampleFamilyName, ExampleGivenName + ExampleGivenName + ExampleFamilyName + https://orcid.org/0000-0001-5727-2427 + ExampleAffiliation + + + ExampleOrganization + https://ror.org/03yrm5c26 + + + ExampleFamilyName, ExampleGivenName + ExampleGivenName + ExampleFamilyName + https://orcid.org/0000-0001-5727-2427 + ExampleAffiliation + + + ExampleOrganization + https://ror.org/03yrm5c26 + + + ExampleFamilyName, ExampleGivenName + ExampleGivenName + ExampleFamilyName + https://orcid.org/0000-0001-5727-2427 + ExampleAffiliation + + + ExampleFamilyName, ExampleGivenName + ExampleGivenName + ExampleFamilyName + https://orcid.org/0000-0001-5727-2427 + ExampleAffiliation + + + ExampleFamilyName, ExampleGivenName + ExampleGivenName + ExampleFamilyName + https://orcid.org/0000-0001-5727-2427 + ExampleAffiliation + + + ExampleFamilyName, ExampleGivenName + ExampleGivenName + ExampleFamilyName + https://orcid.org/0000-0001-5727-2427 + ExampleAffiliation + + + DataCite + https://ror.org/04wxnsj81 + + + International DOI Foundation + + + ExampleFamilyName, ExampleGivenName + ExampleGivenName + ExampleFamilyName + https://orcid.org/0000-0001-5727-2427 + ExampleAffiliation + + + ExampleFamilyName, ExampleGivenName + ExampleGivenName + ExampleFamilyName + https://orcid.org/0000-0001-5727-2427 + ExampleAffiliation + + + ExampleContributor + ExampleOrganization + + + ExampleFamilyName, ExampleGivenName + ExampleGivenName + ExampleFamilyName + https://orcid.org/0000-0001-5727-2427 + ExampleAffiliation + + + ExampleContributor + https://ror.org/03yrm5c26 + + + ExampleFamilyName, ExampleGivenName + ExampleGivenName + ExampleFamilyName + https://orcid.org/0000-0001-5727-2427 + ExampleAffiliation + + + ExampleFamilyName, ExampleGivenName + ExampleGivenName + ExampleFamilyName + https://orcid.org/0000-0001-5727-2427 + ExampleAffiliation + + + ExampleOrganization + https://ror.org/03yrm5c26 + + + ExampleFamilyName, ExampleGivenName + ExampleGivenName + ExampleFamilyName + https://orcid.org/0000-0001-5727-2427 + ExampleAffiliation + + + + 2024-01-01 + 2024-01-01 + 2024-01-01 + 2024-01-01/2024-12-31 + 2024-01-01/2024-12-31 + 2024-01-01 + 2024-01-01 + 2024-01-01 + 2024-01-01 + 2024-01-01 + 2024-01-01 + 2024-01-01 + + en + + 12345 + + + ark:/13030/tqb3kh97gh8w + arXiv:0706.0001 + 2018AGUFM.A24K..07S + 31253.11.sciencedb.13238 + 10.1016/j.epsl.2011.11.037 + 9783468111242 + 1562-6865 + 10013/epic.10033 + IECUR0097 + 978-3-905673-82-1 + 0077-5606 + 0A9 2002 12B4A105 7 + 1188-1534 + urn:lsid:ubio.org:namebank:11815 + 12082125 + http://purl.oclc.org/foo/bar + RRID:SCR_014641 + 123456789999 + http://www.heatflow.und.edu/index2.html + urn:nbn:de:101:1-201102033592 + https://w3id.org/games/spec/coil#Coil_Bomb_Die_Of_Age + 10.1016/j.epsl.2011.11.037 + 10.1016/j.epsl.2011.11.037 + 10.1016/j.epsl.2011.11.037 + 10.1016/j.epsl.2011.11.037 + 10.1016/j.epsl.2011.11.037 + 10.1016/j.epsl.2011.11.037 + 10.1016/j.epsl.2011.11.037 + 10.1016/j.epsl.2011.11.037 + 10.1016/j.epsl.2011.11.037 + 10.1016/j.epsl.2011.11.037 + 10.1016/j.epsl.2011.11.037 + 10.1016/j.epsl.2011.11.037 + 10.1016/j.epsl.2011.11.037 + 10.1016/j.epsl.2011.11.037 + 10.1016/j.epsl.2011.11.037 + 10.1016/j.epsl.2011.11.037 + 10.1016/j.epsl.2011.11.037 + + + 1 MB + 90 pages + + + application/xml + text/plain + + 1 + + Creative Commons Attribution 4.0 International + + + Example Abstract + Example Methods + Example SeriesInformation + Example TableOfContents + Example TechnicalInfo + Example Other + + + + Vancouver, British Columbia, Canada + + 49.2827 + -123.1207 + + + -123.27 + -123.02 + 49.195 + 49.315 + + + + 41.991 + -71.032 + + + 42.893 + -69.622 + + + 41.991 + -68.211 + + + 41.090 + -69.622 + + + 41.991 + -71.032 + + + + + + + Example Funder + https://doi.org/10.13039/501100000780 + 12345 + Example AwardTitle + + + + + 1234-5678 + + + ExampleFamilyName, ExampleGivenName + ExampleGivenName + ExampleFamilyName + + + + Example RelatedItem Title + Example RelatedItem TranslatedTitle + + 1990 + 1 + 2 + 1 + 1 + 100 + Example RelatedItem Publisher + Example RelatedItem Edition + + + ExampleFamilyName, ExampleGivenName + ExampleGivenName + ExampleFamilyName + + + + + diff --git a/source/meta/kernel-4.7/example/datacite-example-instrument-v4.xml b/source/meta/kernel-4.7/example/datacite-example-instrument-v4.xml new file mode 100644 index 0000000..9b1054b --- /dev/null +++ b/source/meta/kernel-4.7/example/datacite-example-instrument-v4.xml @@ -0,0 +1,34 @@ + + + + 10.82433/08QF-EE96 + + + DECTRIS + Q107529885 + + + + Pilatus detector at MX station 14.1 + + Helmholtz Centre Potsdam - GFZ German Research Centre for Geosciences + 2022 + + + Helmholtz-Zentrum Berlin für Materialien und Energie + https://ror.org/02aj13c28 + + + Raster image pixel detector + + 1234567 + + + 1234.1675 + https://www.dectris.com/products/pilatus3/pilatus3-s-for-synchrotron/details/pilatus3-s-6m + + + The Pilatus 6M pixel-detector at the MX station 14.1 + Model Name: PILATUS3 S 6M. Instrument type: Raster image pixel detector. Measured variables: X-ray. + + diff --git a/source/meta/kernel-4.7/example/datacite-example-multilingual-v4.xml b/source/meta/kernel-4.7/example/datacite-example-multilingual-v4.xml new file mode 100644 index 0000000..c244e10 --- /dev/null +++ b/source/meta/kernel-4.7/example/datacite-example-multilingual-v4.xml @@ -0,0 +1,46 @@ + + + + 10.82433/BYT7-2G42 + + Advances in Chemistry + Avances en Química + 化学进展 + + + + Zou, Jing + https://orcid.org/0000-0002-4553-2743 + + + DataCite + https://ror.org/04wxnsj81 + + + DataCite + 2022 + + + Chemistry + Químicas + 化学 + + + 2024-01-01 + + + This chapter reviews selected landmarks occurred in Chemistry basic research in the last 5 years + El capítulo repasa los principales avances en la investigación básica en Ciencias Químicas en los últimos 5 años + 本章回顾了过去5年中在化学基础研究中发生的一些里程碑式的事件 + + en + + arXiv:0706.0001 + + + + Creative Commons Attribution 4.0 International + Atribución 4.0 Internacional + 署名 4.0 国际 + + \ No newline at end of file diff --git a/source/meta/kernel-4.7/example/datacite-example-parallel-languages-v4.xml b/source/meta/kernel-4.7/example/datacite-example-parallel-languages-v4.xml new file mode 100644 index 0000000..0756b4c --- /dev/null +++ b/source/meta/kernel-4.7/example/datacite-example-parallel-languages-v4.xml @@ -0,0 +1,24 @@ + + + 10.82433/4r08-sa38 + + + Global Seismology Research Center + + + + Seismometer User Manual + Manuel d'utilisation du sismomètre + + Global Seismology Research Center + 2023 + + 2023 + + Manual + mul + + This manual provides comprehensive instructions on the installation, calibration, and maintenance of the Global Seismology Research Center's seismometer models. + Ce manuel fournit des instructions complètes pour l'installation, l'étalonnage et l'entretien des modèles de sismomètres du Centre de recherche sismologique mondial. + + \ No newline at end of file diff --git a/source/meta/kernel-4.7/example/datacite-example-poster-v4.xml b/source/meta/kernel-4.7/example/datacite-example-poster-v4.xml new file mode 100644 index 0000000..559e087 --- /dev/null +++ b/source/meta/kernel-4.7/example/datacite-example-poster-v4.xml @@ -0,0 +1,37 @@ + + + 10.82433/q80x-4z58 + + + Garcia, Sofia + Sofia + Garcia + + https://orcid.org/0000-0001-5727-2427 + Arizona State + University + + + + Persistent Identifiers in Practice: Enhancing Poster Discoverability and Reuse + + International Metadata Forum + 2025 + + 2025 + + Conference poster + + https://example.org/metadata-forum-2025 + + en + + Posters are a key channel for sharing + early research, yet they often disappear after the event. This poster shows how + persistent identifiers (PIDs) can make posters easier to cite, discover, and reuse. + + \ No newline at end of file diff --git a/source/meta/kernel-4.7/example/datacite-example-presentation-v4.xml b/source/meta/kernel-4.7/example/datacite-example-presentation-v4.xml new file mode 100644 index 0000000..ed80fc6 --- /dev/null +++ b/source/meta/kernel-4.7/example/datacite-example-presentation-v4.xml @@ -0,0 +1,46 @@ + + + 10.82433/v14f-gk24 + + + Garcia, Sofia + Sofia + Garcia + + https://orcid.org/0000-0001-5727-2427 + Arizona State + University + + + + DOIs in Action: Making Presentations More Discoverable + + International Metadata Forum + 2025 + + 2025-08-11 + + Conference presentation + + https://example.org/metadata-forum-2025 + 10.82433/9jbk-4c28 + + en + + Creative Commons Attribution 4.0 International + + + Conference presentations are often + overlooked in discovery and citation systems. This presentation demonstrates practical + workflows for assigning DOIs to presentations, linking them to related datasets and + publications, and embedding identifiers in slide decks for easy sharing. By applying + these strategies, researchers can increase the visibility, impact, and reusability of + their talks beyond the event itself. + + \ No newline at end of file diff --git a/source/meta/kernel-4.7/example/datacite-example-project-v4.xml b/source/meta/kernel-4.7/example/datacite-example-project-v4.xml new file mode 100644 index 0000000..7376755 --- /dev/null +++ b/source/meta/kernel-4.7/example/datacite-example-project-v4.xml @@ -0,0 +1,88 @@ + + + 10.82433/84dj-am41 + + + Habermann, Ted + Ted + Habermann + https://orcid.org/0000-0003-3585-6733 + Metadata Game Changers (United States) + + + + EAGER: INFORMATE: Improving networks for organizational repositories through metadata augmentation, transformation and evolution + INFORMATE + + Metadata Game Changers (United States) + 2023 + Collaboration + + informate + CHORUS + global research infrastructure + Information systems not elsewhere classified + + + + Jones, Jamaica + Jamaica + Jones + https://orcid.org/0000-0002-1969-2508 + University of Pittsburgh + + + Habermann, Ted + Ted + Habermann + https://orcid.org/0000-0003-3585-6733 + Metadata Game Changers (United States) + + + Habermann, Ted + Ted + Habermann + https://orcid.org/0000-0003-3585-6733 + Metadata Game Changers (United States) + + + Ratner, Howard + Howard + Ratner + https://orcid.org/0000-0002-2123-6317 + CHORUS + + + Packer, Tara + Tara + Packer + https://orcid.org/https://orcid.org/0009-0009-0223-2917 + CHORUS + + + + 2023-08-15/2024-12-31 + + + https://doi.org/10.6084/m9.figshare.25139354.v1 + https://doi.org/10.59350/77zs1-hz764 + https://doi.org/10.59350/cnkm2-18f84 + https://doi.org/10.59350/ksgzn-a6w37 + https://doi.org/10.59350/yqkat-59f79 + https://doi.org/10.54900/vnevh-vaw22 + https://doi.org/10.54900/08pke-hyy45 + https://www.youtube.com/watch?v=bsDzsxJPHrI + https://doi.org/10.17605/OSF.IO/CYABT + + + The Global Research Infrastructure (GRI) is made up of the repositories and organizations that provide persistent identifiers (PIDs) and detailed metadata about many kinds of research objects: preprints, published papers, datasets, dissertations, proposals, reviews, … and connect these objects to funders, research institutions, researchers, and one another using PIDs. Together, this infrastructure currently contains millions of objects and is growing rapidly in almost every possible direction. How can this infrastructure increase understanding of the myriad contributions made to global knowledge by funders like the National Science Foundation and other federal agencies? How can we use this infrastructure to increase understanding of connections across the U.S. and global research landscape? How can this infrastructure be used to increase completeness, consistency, and connectivity within agency repositories and search tools? These are the kinds of questions we will explore in this project. + + + + U.S. National Science Foundation + https://ror.org/021nxhr62 + 2334426 + EAGER: INFORMATE: Improving networks for organizational repositories through metadata augmentation, transformation and evolution + + + \ No newline at end of file diff --git a/source/meta/kernel-4.7/example/datacite-example-relateditem1-v4.xml b/source/meta/kernel-4.7/example/datacite-example-relateditem1-v4.xml new file mode 100644 index 0000000..fbb5551 --- /dev/null +++ b/source/meta/kernel-4.7/example/datacite-example-relateditem1-v4.xml @@ -0,0 +1,40 @@ + + + + 10.82433/Q54D-PF76 + + + Garcia, Sofia + Sofia + Garcia + https://orcid.org/0000-0001-5727-2427 + Arizona State University + + + + Example Article Title + + Example Publisher + 2022 + ScholarlyArticle + + 2022 + + + 1234-5678 + + + + 1234-5678 + + Journal of Metadata Examples + + 2022 + 3 + 4 + 20 + 35 + Example Publisher + + + diff --git a/source/meta/kernel-4.7/example/datacite-example-relateditem2-v4.xml b/source/meta/kernel-4.7/example/datacite-example-relateditem2-v4.xml new file mode 100644 index 0000000..933509f --- /dev/null +++ b/source/meta/kernel-4.7/example/datacite-example-relateditem2-v4.xml @@ -0,0 +1,36 @@ + + + + 10.82433/ECK0-F231 + + + Garcia, Sofia + Sofia + Garcia + + + + Example Chapter Title + + Example Publisher + 1980 + + + + + Example Book Title + + 1980 + I + 110 + 155 + Example Publisher + 2nd edition + + + Miller, Elizabeth + + + + + \ No newline at end of file diff --git a/source/meta/kernel-4.7/example/datacite-example-relateditem3-v4.xml b/source/meta/kernel-4.7/example/datacite-example-relateditem3-v4.xml new file mode 100644 index 0000000..bb11ef7 --- /dev/null +++ b/source/meta/kernel-4.7/example/datacite-example-relateditem3-v4.xml @@ -0,0 +1,41 @@ + + + + 10.82433/4FDH-RH04 + + + Garcia, Sofia + Sofia + Garcia + + + + Example Chapter Title + + Example Publisher + 2016 + + + 0-12-345678-1 + + + + 0-12-345678-1 + + + Garcia, Sofia + Sofia + Garcia + + + + Example Book Title + + 2016 + 4 + 45 + 63 + Example Publisher + + + \ No newline at end of file diff --git a/source/meta/kernel-4.7/example/datacite-example-relationtypeinformation-v4.xml b/source/meta/kernel-4.7/example/datacite-example-relationtypeinformation-v4.xml new file mode 100644 index 0000000..10b2332 --- /dev/null +++ b/source/meta/kernel-4.7/example/datacite-example-relationtypeinformation-v4.xml @@ -0,0 +1,37 @@ + + + 10.82433/0320-9g16 + + + Garcia, Sofia + Sofia + Garcia + + https://orcid.org/0000-0001-5727-2427 + Arizona State + University + + + + Comment on "Improving Metadata Quality in Scholarly Repositories" + + Global Open Research + 2025 + + + 10.82433/e34e-y143 + + en + + This preprint provides a response to + the article "Improving Metadata Quality in Scholarly Repositories." It discusses + additional considerations for enhancing metadata completeness, consistency, and + interoperability. The authors highlight practical workflows, offer examples of common + metadata challenges, and suggest strategies to improve discoverability and reuse of + repository content. + + \ No newline at end of file diff --git a/source/meta/kernel-4.7/example/datacite-example-translation-original-v4.xml b/source/meta/kernel-4.7/example/datacite-example-translation-original-v4.xml new file mode 100644 index 0000000..ffb2cd9 --- /dev/null +++ b/source/meta/kernel-4.7/example/datacite-example-translation-original-v4.xml @@ -0,0 +1,25 @@ + + + 10.82433/pma6-nf93 + + + Green, Simon + + + + Klimawandel und Anpassungsstrategien + + Institut für Umweltforschung + 2022 + + 2022-07-07 + + + de + + 10.82433/45e5-xy14 + + + Dieser Bericht untersucht die Auswirkungen des Klimawandels und erkundet mögliche Anpassungsstrategien. Er befasst sich mit Themen wie extremen Wetterereignissen, Anpassungsmaßnahmen für städtische und ländliche Gebiete und politischen Empfehlungen zur Minderung von Klimarisiken. + + \ No newline at end of file diff --git a/source/meta/kernel-4.7/example/datacite-example-translation-translated-v4.xml b/source/meta/kernel-4.7/example/datacite-example-translation-translated-v4.xml new file mode 100644 index 0000000..c8b5b64 --- /dev/null +++ b/source/meta/kernel-4.7/example/datacite-example-translation-translated-v4.xml @@ -0,0 +1,30 @@ + + + 10.82433/45e5-xy14 + + + Green, Simon + + + + Climate Change and Adaptation Strategies + + Institute for Environmental Research + 2024 + + 2024-09-15 + + + en + + + Schneider, Anna + + + + 10.82433/pma6-nf93 + + + This report examines the impacts of climate change and explores potential adaptation strategies. It addresses issues such as extreme weather events, adaptation measures for urban and rural areas, and policy recommendations to mitigate climate risks. + + \ No newline at end of file diff --git a/source/meta/kernel-4.7/include/datacite-contributorType-v4.xsd b/source/meta/kernel-4.7/include/datacite-contributorType-v4.xsd new file mode 100644 index 0000000..686ee57 --- /dev/null +++ b/source/meta/kernel-4.7/include/datacite-contributorType-v4.xsd @@ -0,0 +1,37 @@ + + + + + + The type of contributor of the resource. + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/meta/kernel-4.7/include/datacite-dateType-v4.xsd b/source/meta/kernel-4.7/include/datacite-dateType-v4.xsd new file mode 100644 index 0000000..17db992 --- /dev/null +++ b/source/meta/kernel-4.7/include/datacite-dateType-v4.xsd @@ -0,0 +1,27 @@ + + + + + + The type of date. Use RKMS‐ISO8601 standard for depicting date ranges.To indicate the end of an embargo period, use Available. To indicate the start of an embargo period, use Submitted or Accepted, as appropriate. + + + + + + + + + + + + + + + + + diff --git a/source/meta/kernel-4.7/include/datacite-descriptionType-v4.xsd b/source/meta/kernel-4.7/include/datacite-descriptionType-v4.xsd new file mode 100644 index 0000000..4f5e5f4 --- /dev/null +++ b/source/meta/kernel-4.7/include/datacite-descriptionType-v4.xsd @@ -0,0 +1,19 @@ + + + + + + The type of the description. + + + + + + + + + + + diff --git a/source/meta/kernel-4.7/include/datacite-funderIdentifierType-v4.xsd b/source/meta/kernel-4.7/include/datacite-funderIdentifierType-v4.xsd new file mode 100644 index 0000000..754c972 --- /dev/null +++ b/source/meta/kernel-4.7/include/datacite-funderIdentifierType-v4.xsd @@ -0,0 +1,16 @@ + + + + + + The type of the funderIdentifier. + + + + + + + + + + diff --git a/source/meta/kernel-4.7/include/datacite-nameType-v4.xsd b/source/meta/kernel-4.7/include/datacite-nameType-v4.xsd new file mode 100644 index 0000000..bf54922 --- /dev/null +++ b/source/meta/kernel-4.7/include/datacite-nameType-v4.xsd @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/source/meta/kernel-4.7/include/datacite-numberType-v4.xsd b/source/meta/kernel-4.7/include/datacite-numberType-v4.xsd new file mode 100644 index 0000000..0de90c7 --- /dev/null +++ b/source/meta/kernel-4.7/include/datacite-numberType-v4.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/source/meta/kernel-4.7/include/datacite-relatedIdentifierType-v4.xsd b/source/meta/kernel-4.7/include/datacite-relatedIdentifierType-v4.xsd new file mode 100644 index 0000000..87760fd --- /dev/null +++ b/source/meta/kernel-4.7/include/datacite-relatedIdentifierType-v4.xsd @@ -0,0 +1,39 @@ + + + + + + The type of the RelatedIdentifier. + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/meta/kernel-4.7/include/datacite-relationType-v4.xsd b/source/meta/kernel-4.7/include/datacite-relationType-v4.xsd new file mode 100644 index 0000000..40d0358 --- /dev/null +++ b/source/meta/kernel-4.7/include/datacite-relationType-v4.xsd @@ -0,0 +1,59 @@ + + + + + + Description of the relationship of the resource being registered (A) and the related resource (B). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/meta/kernel-4.7/include/datacite-resourceType-v4.xsd b/source/meta/kernel-4.7/include/datacite-resourceType-v4.xsd new file mode 100644 index 0000000..02a0c16 --- /dev/null +++ b/source/meta/kernel-4.7/include/datacite-resourceType-v4.xsd @@ -0,0 +1,52 @@ + + + + + + The general type of a resource. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source/meta/kernel-4.7/include/datacite-titleType-v4.xsd b/source/meta/kernel-4.7/include/datacite-titleType-v4.xsd new file mode 100644 index 0000000..18efc0d --- /dev/null +++ b/source/meta/kernel-4.7/include/datacite-titleType-v4.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/source/meta/kernel-4.7/include/xml.xsd b/source/meta/kernel-4.7/include/xml.xsd new file mode 100644 index 0000000..bd291f3 --- /dev/null +++ b/source/meta/kernel-4.7/include/xml.xsd @@ -0,0 +1,286 @@ + + + + + + +
+

About the XML namespace

+ +
+

+ This schema document describes the XML namespace, in a form + suitable for import by other schema documents. +

+

+ See + http://www.w3.org/XML/1998/namespace.html and + + http://www.w3.org/TR/REC-xml for information + about this namespace. +

+

+ Note that local names in this namespace are intended to be + defined only by the World Wide Web Consortium or its subgroups. + The names currently defined in this namespace are listed below. + They should not be used with conflicting semantics by any Working + Group, specification, or document instance. +

+

+ See further below in this document for more information about how to refer to this schema document from your own + XSD schema documents and about the + namespace-versioning policy governing this schema document. +

+
+
+
+
+ + + + +
+ +

lang (as an attribute name)

+

+ denotes an attribute whose value + is a language code for the natural language of the content of + any element; its value is inherited. This name is reserved + by virtue of its definition in the XML specification.

+ +
+
+

Notes

+

+ Attempting to install the relevant ISO 2- and 3-letter + codes as the enumerated possible values is probably never + going to be a realistic possibility. +

+

+ See BCP 47 at + http://www.rfc-editor.org/rfc/bcp/bcp47.txt + and the IANA language subtag registry at + + http://www.iana.org/assignments/language-subtag-registry + for further information. +

+

+ The union allows for the 'un-declaration' of xml:lang with + the empty string. +

+
+
+
+ + + + + + + + + +
+ + + + +
+ +

space (as an attribute name)

+

+ denotes an attribute whose + value is a keyword indicating what whitespace processing + discipline is intended for the content of the element; its + value is inherited. This name is reserved by virtue of its + definition in the XML specification.

+ +
+
+
+ + + + + + +
+ + + +
+ +

base (as an attribute name)

+

+ denotes an attribute whose value + provides a URI to be used as the base for interpreting any + relative URIs in the scope of the element on which it + appears; its value is inherited. This name is reserved + by virtue of its definition in the XML Base specification.

+ +

+ See http://www.w3.org/TR/xmlbase/ + for information about this attribute. +

+
+
+
+
+ + + + +
+ +

id (as an attribute name)

+

+ denotes an attribute whose value + should be interpreted as if declared to be of type ID. + This name is reserved by virtue of its definition in the + xml:id specification.

+ +

+ See http://www.w3.org/TR/xml-id/ + for information about this attribute. +

+
+
+
+
+ + + + + + + + + + +
+ +

Father (in any context at all)

+ +
+

+ denotes Jon Bosak, the chair of + the original XML Working Group. This name is reserved by + the following decision of the W3C XML Plenary and + XML Coordination groups: +

+
+

+ In appreciation for his vision, leadership and + dedication the W3C XML Plenary on this 10th day of + February, 2000, reserves for Jon Bosak in perpetuity + the XML name "xml:Father". +

+
+
+
+
+
+ + + +
+

About this schema document

+ +
+

+ This schema defines attributes and an attribute group suitable + for use by schemas wishing to allow xml:base, + xml:lang, xml:space or + xml:id attributes on elements they define. +

+

+ To enable this, such a schema must import this schema for + the XML namespace, e.g. as follows: +

+
+          <schema . . .>
+           . . .
+           <import namespace="http://www.w3.org/XML/1998/namespace"
+                      schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+     
+

+ or +

+
+           <import namespace="http://www.w3.org/XML/1998/namespace"
+                      schemaLocation="http://www.w3.org/2009/01/xml.xsd"/>
+     
+

+ Subsequently, qualified reference to any of the attributes or the + group defined below will have the desired effect, e.g. +

+
+          <type . . .>
+           . . .
+           <attributeGroup ref="xml:specialAttrs"/>
+     
+

+ will define a type which will schema-validate an instance element + with any of those attributes. +

+
+
+
+
+ + + +
+

Versioning policy for this schema document

+
+

+ In keeping with the XML Schema WG's standard versioning + policy, this schema document will persist at + + http://www.w3.org/2009/01/xml.xsd. +

+

+ At the date of issue it can also be found at + + http://www.w3.org/2001/xml.xsd. +

+

+ The schema document at that URI may however change in the future, + in order to remain compatible with the latest version of XML + Schema itself, or with the XML namespace itself. In other words, + if the XML Schema or XML namespaces change, the version of this + document at + http://www.w3.org/2001/xml.xsd + + will change accordingly; the version at + + http://www.w3.org/2009/01/xml.xsd + + will not change. +

+

+ Previous dated (and unchanging) versions of this schema + document are at: +

+ +
+
+
+
+ +
diff --git a/source/meta/kernel-4.7/index.html.md b/source/meta/kernel-4.7/index.html.md new file mode 100644 index 0000000..c5929b3 --- /dev/null +++ b/source/meta/kernel-4.7/index.html.md @@ -0,0 +1,68 @@ +--- +title: DataCite Metadata Schema 4.7 +version: 4.7 +date: 2026-03-31 +layout: schema +schema_url: /meta/kernel-4.7/metadata.xsd +documentation_url: https://datacite-metadata-schema.readthedocs.io/en/4.7/ +--- + +## Documentation +DataCite Metadata Working Group. (2026). DataCite Metadata Schema Documentation for the Publication and Citation of Research Data and Other Research Outputs. Version 4.7. DataCite e.V. [https://doi.org/10.14454/qdd3-ps68](https://doi.org/10.14454/qdd3-ps68) + +
Access documentation
+
+
Download PDF
+ +## Schema +DataCite Metadata Working Group. (2026). DataCite Metadata Schema for the Publication and Citation of Research Data and Other Research Outputs. Version 4.7. DataCite e.V. [https://doi.org/0.14454/28a4-kd32](https://doi.org/10.14454/28a4-kd32) + +
View XSD
+ +## Changes + +#### See [Version 4.7 Update](https://datacite-metadata-schema.readthedocs.io/en/4.7/introduction/version-update) for full details. + + +* Addition of new resourceTypeGeneral values: Poster and Presentation +* Addition of new relatedIdentifierType values: RAiD and SWHID +* Addition of new relationType value: Other +* Addition of new relationTypeInformation sub-property of RelatedIdentifier and RelatedItem + + +## Examples + +Demonstration Examples + +* Full DataCite metadata example: [XML](example/datacite-example-full-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/B09Z-4K37?publisher=true&affiliation=true) +* Example for Dataset resourceTypeGeneral: [XML](example/datacite-example-dataset-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/9184-DY35?publisher=true&affiliation=true) +* Example for Poster resourceTypeGeneral: [XML](example/datacite-example-poster-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/q80x-4z58?publisher=true&affiliation=true) +* Example for Presentation resourceTypeGeneral: [XML](example/datacite-example-presentation-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/v14f-gk24?publisher=true&affiliation=true) +* Example for Audiovisual resourceTypeGeneral: [XML](example/datacite-example-audiovisual-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/9jbk-4c28?publisher=true&affiliation=true) +* Example for Award resourceTypeGeneral: [XML](example/datacite-example-award-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/p1zt-4c67?publisher=true&affiliation=true) +* Example for Project resourceTypeGeneral: [XML](example/datacite-example-project-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/84dj-am41?publisher=true&affiliation=true) +* Example for relationTypeInformation attribute with relationType "Other": [XML](example/datacite-example-relationtypeinformation-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/0320-9g16?publisher=true&affiliation=true) +* Example for Coverage dateType: [XML](example/datacite-example-coverage-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/pgk2-ar97?publisher=true&affiliation=true) +* Example connecting a translation to the original work: + * Example of a translation: [XML](example/datacite-example-translation-translated-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/45e5-xy14?publisher=true&affiliation=true) + * Example of the original (translated) work: [XML](example/datacite-example-translation-original-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/pma6-nf93?publisher=true&affiliation=true) +* Example of a document containing two languages in parallel: [XML](example/datacite-example-parallel-languages-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/4r08-sa38?publisher=true&affiliation=true) +* Example showing multilingual metadata: [XML](example/datacite-example-multilingual-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/byt7-2g42?publisher=true&affiliation=true) +* Examples with RelatedItem: + * Journal article in a journal (with an ISSN): [XML](example/datacite-example-relateditem1-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/q54d-pf76?publisher=true&affiliation=true) + * Digitized book chapter in a book (with no identifier): [XML](example/datacite-example-relateditem2-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/eck0-f231?publisher=true&affiliation=true) + * Digitized book chapter in a book (with an ISBN): [XML](example/datacite-example-relateditem3-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/4fdh-rh04?publisher=true&affiliation=true) + +Live Examples (real DOIs - metadata may change) + +* Example for Software resourceTypeGeneral: [XML](https://api.datacite.org/dois/application/vnd.datacite.datacite+xml/10.5281/zenodo.7635478), [JSON](https://api.datacite.org/dois/10.5281/zenodo.7635478?publisher=true&affiliation=true) +* Example with GeoLocation: [XML](https://api.datacite.org/dois/application/vnd.datacite.datacite+xml/10.1594/PANGAEA.770250), [JSON](https://api.datacite.org/dois/10.1594/PANGAEA.770250?publisher=true&affiliation=true) +* Example with (GeoLocation) Polygon: [XML](https://api.datacite.org/dois/application/vnd.datacite.datacite+xml/10.15129/3da7087a-91a3-40be-9a83-7e412156db59), [JSON](https://api.datacite.org/dois/10.15129/3da7087a-91a3-40be-9a83-7e412156db59?publisher=true&affiliation=true) +* Example with HasMetadata as related resource: [XML](https://api.datacite.org/dois/application/vnd.datacite.datacite+xml/10.26164/leopoldina_10_00390), [JSON](https://api.datacite.org/dois/10.26164/leopoldina_10_00390?publisher=true&affiliation=true) +* Example with IsIdenticalTo as related resource: [XML](https://api.datacite.org/dois/application/vnd.datacite.datacite+xml/10.5282/oph.2), [JSON](https://api.datacite.org/dois/10.5282/oph.2?publisher=true&affiliation=true) +* Example with Contributor: [XML](https://api.datacite.org/dois/application/vnd.datacite.datacite+xml/10.4228/zalf.sy6a-xt12), [JSON](https://api.datacite.org/dois/10.4228/zalf.sy6a-xt12?publisher=true&affiliation=true) +* Example for Workflow resourceTypeGeneral : [XML](https://api.datacite.org/dois/application/vnd.datacite.datacite+xml/10.48546/WORKFLOWHUB.WORKFLOW.412.1), [JSON](https://api.datacite.org/dois/10.48546/WORKFLOWHUB.WORKFLOW.412.1?publisher=true&affiliation=true) +* Example with FundingReference: [XML](https://api.datacite.org/dois/application/vnd.datacite.datacite+xml/10.5281/zenodo.47394), [JSON](https://api.datacite.org/dois/10.5281/zenodo.47394?publisher=true&affiliation=true) +* Example of a blog post published simultaneously in two languages: + * Blog post in Spanish: [XML](https://api.datacite.org/dois/application/vnd.datacite.datacite+xml/10.5438/S7C0-Y897), [JSON](https://api.datacite.org/dois/10.5438/S7C0-Y897?publisher=true&affiliation=true) + * Blog post in English: [XML](https://api.datacite.org/dois/application/vnd.datacite.datacite+xml/10.5438/1HG2-BF13), [JSON](https://api.datacite.org/dois/10.5438/1HG2-BF13?publisher=true&affiliation=true) diff --git a/source/meta/kernel-4.7/metadata.xsd b/source/meta/kernel-4.7/metadata.xsd new file mode 100644 index 0000000..4c20423 --- /dev/null +++ b/source/meta/kernel-4.7/metadata.xsd @@ -0,0 +1,715 @@ + + + + + + + + + + + + + + + + + + Root element of a single record. This wrapper element is for XML implementation only and is not defined in the DataCite DOI standard. + Note: This is the case for all wrapper elements within this schema. + No content in this wrapper element. + + + + + + + A persistent identifier that identifies a resource. + + + + + + + + + + + + + + + The main researchers involved working on the data, or the authors of the publication in priority order. May be a corporate/institutional or personal name. + Format: Family, Given. + Personal names can be further specified using givenName and familyName. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A name or title by which a resource is known. + + + + + + + + + + + + + + + + The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource. This property will be used to formulate the citation, so consider the prominence of the role. + In the case of datasets, "publish" is understood to mean making the data available to the community of researchers. + + + + + + + + + + + + + + + Year when the data is made publicly available. If an embargo period has been in effect, use the date when the embargo period ends. + In the case of datasets, "publish" is understood to mean making the data available on a specific date to the community of researchers. If there is no standard publication year value, use the date that would be preferred from a citation perspective. + YYYY + + + + + + + + The type of a resource. You may enter an additional free text description. + The format is open, but the preferred format is a single term of some detail so that a pair can be formed with the sub-property. + + + + + + + + + + + + + + + + Subject, keywords, classification codes, or key phrases describing the resource. + + + + + + + + + + + + + + + + + + + + + + The institution or person responsible for collecting, creating, or otherwise contributing to the development of the dataset. + The personal name format should be: Family, Given. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Different dates relevant to the work. + YYYY,YYYY-MM-DD, YYYY-MM-DDThh:mm:ssTZD or any other format or level of granularity described in W3CDTF. Use RKMS-ISO8601 standard for depicting date ranges. + + + + + + + + + + + + + + + + Primary language of the resource. Allowed values are taken from IETF BCP 47, ISO 639-1 language codes. + + + + + + + + An identifier or identifiers other than the primary Identifier applied to the resource being registered. This may be any alphanumeric string which is unique within its domain of issue. May be used for local identifiers. AlternateIdentifier should be used for another identifier of the same instance (same location, same file). + + + + + + + + + + + + + + + + + + Identifiers of related resources. Use this property to indicate subsets of properties, as appropriate. + + + + + + + + + + + + + + + + + + + + + + + + Unstructures size information about the resource. + + + + + + + + + + + Technical format of the resource. + Use file extension or MIME type where possible. + + + + + + + + Version number of the resource. If the primary resource has changed the version number increases. + Register a new identifier for a major version change. Individual stewards need to determine which are major vs. minor versions. May be used in conjunction with properties 11 and 12 (AlternateIdentifier and RelatedIdentifier) to indicate various information updates. May be used in conjunction with property 17 (Description) to indicate the nature and file/record range of version. + + + + + + + + Any rights information for this resource. Provide a rights management statement for the resource or reference a service providing such information. Include embargo information if applicable. +Use the complete title of a license and include version information if applicable. + + + + + + + + + + + + + + + + + + + + + + All additional information that does not fit in any of the other categories. May be used for technical information. It is a best practice to supply a description. + + + + + + + + + + + + + + + + + + + + + + + Spatial region or named place where the data was gathered or about which the data is focused. + + + + + A point contains a single latitude-longitude pair. + + + + + A box contains two white space separated latitude-longitude pairs, with each pair separated by whitespace. The first pair is the lower corner, the second is the upper corner. + + + + + A drawn polygon area, defined by a set of points and lines connecting the points in a closed chain. + + + + + + + + + + + + + + + + + + + + Information about financial support (funding) for the resource being registered. + + + + + + Name of the funding provider. + + + + + + + + Uniquely identifies a funding entity, according to various types. + + + + + + + + + + + + + The code assigned by the funder to a sponsored award (grant). + + + + + + + + + + + + The human readable title of the award (grant). + + + + + + + + + + + + + + Information about a resource related to the one being registered e.g. a journal or book of which the article or chapter is part. + + + + + + The identifier for the related item. + + + + + + + The type of the Identifier for the related item e.g. DOI. + + + + + The name of the scheme. + + + + + The URI of the relatedMetadataScheme. + + + + + The type of the relatedMetadataScheme, linked with the schemeURI. + + + + + + + + + + + + The institution or person responsible for creating the + related resource. To supply multiple creators, repeat this property. + + + + + + + + + + + + + + + + + + + + + + + + + + + + Title of the related item. + + + + + + + + + + + + + + + + The year when the item was or will be made publicly available. + + + + + + + + Volume of the related item. + + + + + Issue number or name of the related item. + + + + + Number of the related item e.g. report number of article number. + + + + + + + + + + + + First page of the related item e.g. of the chapter, article, or conference paper. + + + + + Last page of the related item e.g. of the chapter, article, or conference paper. + + + + + The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource. This property will be used to formulate the citation, so consider the prominence of the role. + + + + + Edition or version of the related item. + + + + + + + + The institution or person responsible for collecting, + managing, distributing, or otherwise contributing to the development of + the resource. + + + + + + + + + + + + + + + + + + + The type of contributor of the resource. + + + + + + + + + + + The type of the related item, e.g. journal article, book or chapter. + + + + + Description of the relationship of the resource being registered (A) and the related resource (B). + + + + + + + + + + + + + + + + + + + + + + + Uniquely identifies a creator or contributor, according to various identifier schemes. + + + + + + + + + + + + + + + + + + + + + + + + + + + + Uniquely identifies an affiliation, according to various identifier schemes. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/meta/kernel-4/example/datacite-example-audiovisual-v4.xml b/source/meta/kernel-4/example/datacite-example-audiovisual-v4.xml new file mode 100644 index 0000000..01cd3ee --- /dev/null +++ b/source/meta/kernel-4/example/datacite-example-audiovisual-v4.xml @@ -0,0 +1,42 @@ + + + 10.82433/9jbk-4c28 + + + Garcia, Sofia + Sofia + Garcia + + https://orcid.org/0000-0001-5727-2427 + Arizona State + University + + + + DOIs in Action: Making Presentations More Discoverable + + International Metadata Forum + 2025 + + 2025-08-11 + + Conference presentation recording + + https://example.org/metadata-forum-2025 + 10.82433/v14f-gk24 + + en + + Conference presentations are often + overlooked in discovery and citation systems. This presentation demonstrates practical + workflows for assigning DOIs to presentations, linking them to related datasets and + publications, and embedding identifiers in slide decks for easy sharing. By applying + these strategies, researchers can increase the visibility, impact, and reusability of + their talks beyond the event itself. + + \ No newline at end of file diff --git a/source/meta/kernel-4/example/datacite-example-poster-v4.xml b/source/meta/kernel-4/example/datacite-example-poster-v4.xml new file mode 100644 index 0000000..559e087 --- /dev/null +++ b/source/meta/kernel-4/example/datacite-example-poster-v4.xml @@ -0,0 +1,37 @@ + + + 10.82433/q80x-4z58 + + + Garcia, Sofia + Sofia + Garcia + + https://orcid.org/0000-0001-5727-2427 + Arizona State + University + + + + Persistent Identifiers in Practice: Enhancing Poster Discoverability and Reuse + + International Metadata Forum + 2025 + + 2025 + + Conference poster + + https://example.org/metadata-forum-2025 + + en + + Posters are a key channel for sharing + early research, yet they often disappear after the event. This poster shows how + persistent identifiers (PIDs) can make posters easier to cite, discover, and reuse. + + \ No newline at end of file diff --git a/source/meta/kernel-4/example/datacite-example-presentation-v4.xml b/source/meta/kernel-4/example/datacite-example-presentation-v4.xml new file mode 100644 index 0000000..ed80fc6 --- /dev/null +++ b/source/meta/kernel-4/example/datacite-example-presentation-v4.xml @@ -0,0 +1,46 @@ + + + 10.82433/v14f-gk24 + + + Garcia, Sofia + Sofia + Garcia + + https://orcid.org/0000-0001-5727-2427 + Arizona State + University + + + + DOIs in Action: Making Presentations More Discoverable + + International Metadata Forum + 2025 + + 2025-08-11 + + Conference presentation + + https://example.org/metadata-forum-2025 + 10.82433/9jbk-4c28 + + en + + Creative Commons Attribution 4.0 International + + + Conference presentations are often + overlooked in discovery and citation systems. This presentation demonstrates practical + workflows for assigning DOIs to presentations, linking them to related datasets and + publications, and embedding identifiers in slide decks for easy sharing. By applying + these strategies, researchers can increase the visibility, impact, and reusability of + their talks beyond the event itself. + + \ No newline at end of file diff --git a/source/meta/kernel-4/example/datacite-example-relationtypeinformation-v4.xml b/source/meta/kernel-4/example/datacite-example-relationtypeinformation-v4.xml new file mode 100644 index 0000000..10b2332 --- /dev/null +++ b/source/meta/kernel-4/example/datacite-example-relationtypeinformation-v4.xml @@ -0,0 +1,37 @@ + + + 10.82433/0320-9g16 + + + Garcia, Sofia + Sofia + Garcia + + https://orcid.org/0000-0001-5727-2427 + Arizona State + University + + + + Comment on "Improving Metadata Quality in Scholarly Repositories" + + Global Open Research + 2025 + + + 10.82433/e34e-y143 + + en + + This preprint provides a response to + the article "Improving Metadata Quality in Scholarly Repositories." It discusses + additional considerations for enhancing metadata completeness, consistency, and + interoperability. The authors highlight practical workflows, offer examples of common + metadata challenges, and suggest strategies to improve discoverability and reuse of + repository content. + + \ No newline at end of file diff --git a/source/meta/kernel-4/include/datacite-relatedIdentifierType-v4.xsd b/source/meta/kernel-4/include/datacite-relatedIdentifierType-v4.xsd index 71930fd..87760fd 100644 --- a/source/meta/kernel-4/include/datacite-relatedIdentifierType-v4.xsd +++ b/source/meta/kernel-4/include/datacite-relatedIdentifierType-v4.xsd @@ -27,7 +27,9 @@ + + diff --git a/source/meta/kernel-4/include/datacite-relationType-v4.xsd b/source/meta/kernel-4/include/datacite-relationType-v4.xsd index e7f72c4..40d0358 100644 --- a/source/meta/kernel-4/include/datacite-relationType-v4.xsd +++ b/source/meta/kernel-4/include/datacite-relationType-v4.xsd @@ -7,7 +7,8 @@ 2019-02-14 v4.2: Addition of values "Obsoletes", "IsObsoletedBy" 2021-03-05 v4.4: Addition of value "IsPublishedIn" 2024-01-22 v4.5: Addition of values "Collects, "IsCollectedBy" - 2024-12-05 v4.6: Addition of values "HasTranslation", "IsTranslationOf"--> + 2024-12-05 v4.6: Addition of values "HasTranslation", "IsTranslationOf" + 2026-03-31 v4.7: Addition of value "Other"--> @@ -52,6 +53,7 @@ + diff --git a/source/meta/kernel-4/include/datacite-resourceType-v4.xsd b/source/meta/kernel-4/include/datacite-resourceType-v4.xsd index b3311da..02a0c16 100644 --- a/source/meta/kernel-4/include/datacite-resourceType-v4.xsd +++ b/source/meta/kernel-4/include/datacite-resourceType-v4.xsd @@ -5,7 +5,8 @@ 2020-01-14 v4.4: Addition of values "Book", "Book Chapter", "ComputationalNotebook", "ConferencePaper", "ConferenceProceeding". "Dissertation", "Journal", "JournalArticle", "OutputManagementPlan", "PeerReview", "Preprint", "Report" 2024-01-22 v4.5: Addition of values "Instrument", "StudyRegistration" - 2024-12-05 v4.6: Addition of values "Award", "Project"--> + 2024-12-05 v4.6: Addition of values "Award", "Project" + 2026-03-31 v4.7: Addition of values "Poster", "Presentation"--> @@ -33,7 +34,9 @@ + + diff --git a/source/meta/kernel-4/index.html.md b/source/meta/kernel-4/index.html.md index 3fc7614..c5929b3 100644 --- a/source/meta/kernel-4/index.html.md +++ b/source/meta/kernel-4/index.html.md @@ -1,34 +1,33 @@ --- -title: DataCite Metadata Schema 4.6 -version: 4.6 -date: 2024-12-05 +title: DataCite Metadata Schema 4.7 +version: 4.7 +date: 2026-03-31 layout: schema -schema_url: /meta/kernel-4.6/metadata.xsd -documentation_url: https://datacite-metadata-schema.readthedocs.io/en/4.6/ +schema_url: /meta/kernel-4.7/metadata.xsd +documentation_url: https://datacite-metadata-schema.readthedocs.io/en/4.7/ --- ## Documentation -DataCite Metadata Working Group. (2024). DataCite Metadata Schema Documentation for the Publication and Citation of Research Data and Other Research Outputs. Version 4.6. DataCite e.V. [https://doi.org/10.14454/mzv1-5b55](https://doi.org/10.14454/mzv1-5b55) +DataCite Metadata Working Group. (2026). DataCite Metadata Schema Documentation for the Publication and Citation of Research Data and Other Research Outputs. Version 4.7. DataCite e.V. [https://doi.org/10.14454/qdd3-ps68](https://doi.org/10.14454/qdd3-ps68) - +
- + ## Schema -DataCite Metadata Working Group. (2024). DataCite Metadata Schema for the Publication and Citation of Research Data and Other Research Outputs. Version 4.6. DataCite e.V. [https://doi.org/10.14454/csba-e454](https://doi.org/10.14454/csba-e454) +DataCite Metadata Working Group. (2026). DataCite Metadata Schema for the Publication and Citation of Research Data and Other Research Outputs. Version 4.7. DataCite e.V. [https://doi.org/0.14454/28a4-kd32](https://doi.org/10.14454/28a4-kd32) ## Changes -#### See [Version 4.6 Update](https://datacite-metadata-schema.readthedocs.io/en/4.6/introduction/version-update) for full details. +#### See [Version 4.7 Update](https://datacite-metadata-schema.readthedocs.io/en/4.7/introduction/version-update) for full details. -* Addition of new resourceTypeGeneral values: Award and Project -* Addition of new relatedIdentifierType values: CSTR and RRID -* Addition of new relationType pair: IsTranslationOf and HasTranslation -* Addition of new contributorType: Translator -* Addition of new dateType: Coverage +* Addition of new resourceTypeGeneral values: Poster and Presentation +* Addition of new relatedIdentifierType values: RAiD and SWHID +* Addition of new relationType value: Other +* Addition of new relationTypeInformation sub-property of RelatedIdentifier and RelatedItem ## Examples @@ -37,8 +36,12 @@ Demonstration Examples * Full DataCite metadata example: [XML](example/datacite-example-full-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/B09Z-4K37?publisher=true&affiliation=true) * Example for Dataset resourceTypeGeneral: [XML](example/datacite-example-dataset-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/9184-DY35?publisher=true&affiliation=true) +* Example for Poster resourceTypeGeneral: [XML](example/datacite-example-poster-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/q80x-4z58?publisher=true&affiliation=true) +* Example for Presentation resourceTypeGeneral: [XML](example/datacite-example-presentation-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/v14f-gk24?publisher=true&affiliation=true) +* Example for Audiovisual resourceTypeGeneral: [XML](example/datacite-example-audiovisual-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/9jbk-4c28?publisher=true&affiliation=true) * Example for Award resourceTypeGeneral: [XML](example/datacite-example-award-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/p1zt-4c67?publisher=true&affiliation=true) * Example for Project resourceTypeGeneral: [XML](example/datacite-example-project-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/84dj-am41?publisher=true&affiliation=true) +* Example for relationTypeInformation attribute with relationType "Other": [XML](example/datacite-example-relationtypeinformation-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/0320-9g16?publisher=true&affiliation=true) * Example for Coverage dateType: [XML](example/datacite-example-coverage-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/pgk2-ar97?publisher=true&affiliation=true) * Example connecting a translation to the original work: * Example of a translation: [XML](example/datacite-example-translation-translated-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/45e5-xy14?publisher=true&affiliation=true) diff --git a/source/meta/kernel-4/metadata.xsd b/source/meta/kernel-4/metadata.xsd index 116a1c4..4c20423 100644 --- a/source/meta/kernel-4/metadata.xsd +++ b/source/meta/kernel-4/metadata.xsd @@ -14,7 +14,8 @@ 2019-07-13 v4.3: Addition of new subproperties for Affiliation: "affiliationIdentifier", "affiliationIdentifierScheme", "schemeURI", addition of new sub-property for funderIdentifier: "schemeURI", addition of new funderIdentifierScheme: "ROR", added documentation for nameIdentifier 2021-03-08 v4.4: Addition of new property relatedItem, relationType value "isPublishedIn", subject subproperty "classificationCode", controlled list "numberType", additional 13 properties for controlled list "resourceType" 2024-01-22 v4.5: Addition of new subproperties for publisher: "publisherIdentifier", "publisherIdentifierScheme", and "schemeURI"; addition of new resourceTypeGeneral values "Instrument" and "StudyRegistration"; addition of new relationType values "Collects" and "IsCollectedBy". - 2024-12-05 v4.6: Addition of new resourceTypeGeneral values "Award" and "Project"; addiition of new relatedIdentifierType values "CSTR" and "RRID"; addition of new contributorType "Translator"; addition of new relationTypes "HasTranslation" and "IsTranslationOf"; addition of new dateType "Coverage".--> + 2024-12-05 v4.6: Addition of new resourceTypeGeneral values "Award" and "Project"; addition of new relatedIdentifierType values "CSTR" and "RRID"; addition of new contributorType "Translator"; addition of new relationTypes "HasTranslation" and "IsTranslationOf"; addition of new dateType "Coverage". + 2026-03-31 v4.7: Addition of new resourceTypeGeneral values "Poster" and "Presentation"; addition of new relatedIdentifierType values "RAiD" and "SWHID"; addition of new relationType value "Other"; addition of new sub-property "relationTypeInformation" for RelatedIdentifier and RelatedItem.--> @@ -251,6 +252,7 @@ + @@ -604,6 +606,7 @@ Use the complete title of a license and include version information if applicabl Description of the relationship of the resource being registered (A) and the related resource (B).
+ diff --git a/spec/kernel-4.7/doi_spec.rb b/spec/kernel-4.7/doi_spec.rb new file mode 100644 index 0000000..2a84a47 --- /dev/null +++ b/spec/kernel-4.7/doi_spec.rb @@ -0,0 +1,19 @@ +require 'spec_helper' + +describe "validate DOI" do + let(:root) { File.join(File.dirname(__FILE__), '../../source/meta/kernel-4') } + let(:xsd) { Dir.chdir(root) { Nokogiri::XML::Schema(File.read("metadata.xsd")) }} + let(:doc) { Dir.chdir(root) { Nokogiri::XML(File.read("example/datacite-example-full-v4.xml")) { |c| c.strict }}} + + it '10.5555/123' do + doc.at("identifier").content = "10.5555/123" + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors).to be_empty + end + + it '10.5555/a' do + doc.at("identifier").content = "10.5555/a" + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors).to be_empty + end +end diff --git a/spec/kernel-4.7/example-ancientdates_spec.rb b/spec/kernel-4.7/example-ancientdates_spec.rb new file mode 100644 index 0000000..914728e --- /dev/null +++ b/spec/kernel-4.7/example-ancientdates_spec.rb @@ -0,0 +1,39 @@ +require 'spec_helper' + +describe "ancientdates example" do + let(:root) { File.join(File.dirname(__FILE__), '../../source/meta/kernel-4') } + let(:xsd) { Dir.chdir(root) { Nokogiri::XML::Schema(File.read("metadata.xsd")) }} + let(:doc) { Dir.chdir(root) { Nokogiri::XML(File.read("example/datacite-example-ancientdates-v4.xml")) { |c| c.strict }}} + + it 'validates' do + expect(doc).to pass_validation(xsd) + end + + it 'has resourceTypeGeneral Dataset' do + resource_type = doc.at("resourceType") + expect(resource_type["resourceTypeGeneral"]).to eq("PhysicalObject") + expect(resource_type.text).to eq("Coin") + end + + it 'has dates' do + dates = doc.search("dates") + expect(dates.size).to eq(1) + date = dates.first + expect(date.text.strip).to eq("-0024/-0022") + end + + it 'has givenName, familyName, and affiliations' do + creators = doc.search("creator") + expect(creators.size).to eq(1) + creator = creators.first + expect(creator.elements.size).to eq(2) + + creator_name = creator.elements[0] + expect(creator_name.name).to eq("creatorName") + expect(creator_name.text).to eq("Augustus") + + given_name = creator.elements[1] + expect(given_name.name).to eq("nameIdentifier") + expect(given_name.text).to eq("0000000121227317") + end +end diff --git a/spec/kernel-4.7/example_affiliation_spec.rb b/spec/kernel-4.7/example_affiliation_spec.rb new file mode 100644 index 0000000..f440768 --- /dev/null +++ b/spec/kernel-4.7/example_affiliation_spec.rb @@ -0,0 +1,48 @@ +require 'spec_helper' + +describe "full example" do + let(:root) { File.join(File.dirname(__FILE__), '../../source/meta/kernel-4') } + let(:xsd) { Dir.chdir(root) { Nokogiri::XML::Schema(File.read("metadata.xsd")) }} + let(:doc) { Dir.chdir(root) { Nokogiri::XML(File.read("example/datacite-example-affiliation-v4.xml")) { |c| c.strict }}} + + it 'validates' do + expect(doc).to pass_validation(xsd) + end + + it 'has resourceTypeGeneral Software' do + resource_type = doc.at("resourceType") + expect(resource_type["resourceTypeGeneral"]).to eq("Software") + expect(resource_type.text).to eq("XML") + end + + it 'has givenName, familyName, nameIdentifier and affiliations' do + creators = doc.search("creator") + expect(creators.size).to eq(3) + creator = creators.first + expect(creator.elements.size).to eq(5) + + creator_name = creator.elements[0] + expect(creator_name.name).to eq("creatorName") + expect(creator_name.text).to eq("Miller, Elizabeth") + + given_name = creator.elements[1] + expect(given_name.name).to eq("givenName") + expect(given_name.text).to eq("Elizabeth") + + family_name = creator.elements[2] + expect(family_name.name).to eq("familyName") + expect(family_name.text).to eq("Miller") + + name_identifier = creator.elements[3] + expect(name_identifier.name).to eq("nameIdentifier") + expect(name_identifier["schemeURI"]).to eq("https://orcid.org/") + expect(name_identifier["nameIdentifierScheme"]).to eq("ORCID") + expect(name_identifier.text).to eq("0000-0001-5000-0007") + + affiliation = creator.elements[4] + expect(affiliation.name).to eq("affiliation") + expect(affiliation.text).to eq("DataCite") + expect(affiliation["affiliationIdentifier"]).to eq("https://ror.org/04wxnsj81") + expect(affiliation["affiliationIdentifierScheme"]).to eq("ROR") + end +end diff --git a/spec/kernel-4.7/example_box_date_collected_data_collector_spec.rb b/spec/kernel-4.7/example_box_date_collected_data_collector_spec.rb new file mode 100644 index 0000000..a483bfb --- /dev/null +++ b/spec/kernel-4.7/example_box_date_collected_data_collector_spec.rb @@ -0,0 +1,49 @@ +require 'spec_helper' + +describe "full example" do + let(:root) { File.join(File.dirname(__FILE__), '../../source/meta/kernel-4') } + let(:xsd) { Dir.chdir(root) { Nokogiri::XML::Schema(File.read("metadata.xsd")) }} + let(:doc) { Dir.chdir(root) { Nokogiri::XML(File.read("example/datacite-example-Box_dateCollected_DataCollector-v4.xml")) { |c| c.strict }}} + + it 'validates' do + expect(doc).to pass_validation(xsd) + end + + it 'has dateType Collected' do + dates = doc.search("date") + expect(dates.size).to eq(1) + date = dates.first + expect(date["dateType"]).to eq("Collected") + expect(date.text).to eq("1961-06-01/1962-10-12") + end + + it 'has contributor DataCollector' do + contributors = doc.search("contributor") + expect(contributors.size).to eq(1) + contributor = contributors.first + expect(contributor["contributorType"]).to eq("DataCollector") + contributor_name = contributor.first_element_child + expect(contributor_name.name).to eq("contributorName") + expect(contributor_name.text).to eq("Pomegranate, B.") + end + + it 'has geoLocationBox' do + geo_locations = doc.search("geoLocation") + expect(geo_locations.size).to eq(1) + geo_location = geo_locations.first + expect(geo_location.elements.size).to eq(2) + geo_location_place = geo_location.first_element_child + expect(geo_location_place.name).to eq("geoLocationPlace") + expect(geo_location_place.text).to eq("Ponhook Lake, Nova Scotia") + geo_location_box = geo_location.last_element_child + expect(geo_location_box.name).to eq("geoLocationBox") + expect(geo_location_box.elements[0].name).to eq("westBoundLongitude") + expect(geo_location_box.elements[0].text).to eq("-64.2") + expect(geo_location_box.elements[1].name).to eq("eastBoundLongitude") + expect(geo_location_box.elements[1].text).to eq("-63.8") + expect(geo_location_box.elements[2].name).to eq("southBoundLatitude") + expect(geo_location_box.elements[2].text).to eq("44.7167") + expect(geo_location_box.elements[3].name).to eq("northBoundLatitude") + expect(geo_location_box.elements[3].text).to eq("44.9667") + end +end diff --git a/spec/kernel-4.7/example_complicated_spec.rb b/spec/kernel-4.7/example_complicated_spec.rb new file mode 100644 index 0000000..39736f2 --- /dev/null +++ b/spec/kernel-4.7/example_complicated_spec.rb @@ -0,0 +1,11 @@ +require 'spec_helper' + +describe "full example" do + let(:root) { File.join(File.dirname(__FILE__), '../../source/meta/kernel-4') } + let(:xsd) { Dir.chdir(root) { Nokogiri::XML::Schema(File.read("metadata.xsd")) }} + let(:doc) { Dir.chdir(root) { Nokogiri::XML(File.read("example/datacite-example-complicated-v4.xml")) { |c| c.strict }}} + + it 'validates' do + expect(doc).to pass_validation(xsd) + end +end diff --git a/spec/kernel-4.7/example_dataset_spec.rb b/spec/kernel-4.7/example_dataset_spec.rb new file mode 100644 index 0000000..7d59c53 --- /dev/null +++ b/spec/kernel-4.7/example_dataset_spec.rb @@ -0,0 +1,17 @@ +require 'spec_helper' + +describe "full example" do + let(:root) { File.join(File.dirname(__FILE__), '../../source/meta/kernel-4') } + let(:xsd) { Dir.chdir(root) { Nokogiri::XML::Schema(File.read("metadata.xsd")) }} + let(:doc) { Dir.chdir(root) { Nokogiri::XML(File.read("example/datacite-example-dataset-v4.xml")) { |c| c.strict }}} + + it 'validates' do + expect(doc).to pass_validation(xsd) + end + + it 'has resourceTypeGeneral Dataset' do + resource_type = doc.at("resourceType") + expect(resource_type["resourceTypeGeneral"]).to eq("Dataset") + expect(resource_type.text).to eq("Environmental data") + end +end diff --git a/spec/kernel-4.7/example_dissertation_spec.rb b/spec/kernel-4.7/example_dissertation_spec.rb new file mode 100644 index 0000000..8f49d55 --- /dev/null +++ b/spec/kernel-4.7/example_dissertation_spec.rb @@ -0,0 +1,17 @@ +require 'spec_helper' + +describe "full example" do + let(:root) { File.join(File.dirname(__FILE__), '../../source/meta/kernel-4') } + let(:xsd) { Dir.chdir(root) { Nokogiri::XML::Schema(File.read("metadata.xsd")) }} + let(:doc) { Dir.chdir(root) { Nokogiri::XML(File.read("example/datacite-example-dissertation-v4.xml")) { |c| c.strict }}} + + it 'validates' do + expect(doc).to pass_validation(xsd) + end + + it 'has resourceTypeGeneral Dissertation' do + resource_type = doc.at("resourceType") + expect(resource_type["resourceTypeGeneral"]).to eq("Dissertation") + expect(resource_type.text).to eq("") + end +end diff --git a/spec/kernel-4.7/example_full_spec.rb b/spec/kernel-4.7/example_full_spec.rb new file mode 100644 index 0000000..c824bcb --- /dev/null +++ b/spec/kernel-4.7/example_full_spec.rb @@ -0,0 +1,36 @@ +require 'spec_helper' + +describe "full example" do + let(:root) { File.join(File.dirname(__FILE__), '../../source/meta/kernel-4') } + let(:xsd) { Dir.chdir(root) { Nokogiri::XML::Schema(File.read("metadata.xsd")) }} + let(:doc) { Dir.chdir(root) { Nokogiri::XML(File.read("example/datacite-example-full-v4.xml")) { |c| c.strict }}} + + it 'validates' do + expect(doc).to pass_validation(xsd) + end + + it 'has givenName and familyName' do + creators = doc.search("/xmlns:resource/xmlns:creators/xmlns:creator") + expect(creators.size).to eq(2) + creator = creators.first + expect(creator.elements.size).to eq(5) + + creator_name = creator.elements[0] + expect(creator_name.name).to eq("creatorName") + expect(creator_name.text).to eq("ExampleFamilyName, ExampleGivenName") + + given_name = creator.elements[1] + expect(given_name.name).to eq("givenName") + expect(given_name.text).to eq("ExampleGivenName") + + family_name = creator.elements[2] + expect(family_name.name).to eq("familyName") + expect(family_name.text).to eq("ExampleFamilyName") + + name_identifier = creator.elements[3] + expect(name_identifier.name).to eq("nameIdentifier") + expect(name_identifier["schemeURI"]).to eq("https://orcid.org") + expect(name_identifier["nameIdentifierScheme"]).to eq("ORCID") + expect(name_identifier.text).to eq("https://orcid.org/0000-0001-5727-2427") + end +end diff --git a/spec/kernel-4.7/example_funding_reference_spec.rb b/spec/kernel-4.7/example_funding_reference_spec.rb new file mode 100644 index 0000000..0251751 --- /dev/null +++ b/spec/kernel-4.7/example_funding_reference_spec.rb @@ -0,0 +1,17 @@ +require 'spec_helper' + +describe "full example" do + let(:root) { File.join(File.dirname(__FILE__), '../../source/meta/kernel-4') } + let(:xsd) { Dir.chdir(root) { Nokogiri::XML::Schema(File.read("metadata.xsd")) }} + let(:doc) { Dir.chdir(root) { Nokogiri::XML(File.read("example/datacite-example-fundingReference-v4.xml")) { |c| c.strict }}} + + it 'validates' do + expect(doc).to pass_validation(xsd) + end + + # it 'has funderReference' do + # doc.at("funderReferences").first = "" + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors).to be_empty + end + + it 'empty fundingReference tag' do + element = doc.at("fundingReferences") + element.replace (<<-EOT) + + + + EOT + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(1) + expect(errors.first).to include("Missing child element(s). Expected is one of ( {http://datacite.org/schema/kernel-4}funderName, {http://datacite.org/schema/kernel-4}funderIdentifier, {http://datacite.org/schema/kernel-4}awardNumber, {http://datacite.org/schema/kernel-4}awardTitle )") + end + + it 'only funderName' do + element = doc.at("fundingReferences") + element.replace (<<-EOT) + + + European Commission + + + EOT + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors).to be_empty + end + + it 'empty funderName' do + element = doc.at("fundingReferences") + element.replace (<<-EOT) + + + + + + EOT + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(1) + expect(errors.first).to include("Element '{http://datacite.org/schema/kernel-4}funderName': [facet 'minLength'] The value has a length of '0'; this underruns the allowed minimum length of '1'.") + end + + it 'funderIdentifier' do + element = doc.at("fundingReferences") + element.replace (<<-EOT) + + + European Commission + http://doi.org/10.13039/501100000780 + + + EOT + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors).to be_empty + end + + it 'funderIdentifier without funderIdentifierType' do + element = doc.at("fundingReferences") + element.replace (<<-EOT) + + + European Commission + http://doi.org/10.13039/501100000780 + + + EOT + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(1) + expect(errors.first).to include("The attribute 'funderIdentifierType' is required but missing.") + end + + it 'funderIdentifier unknown funderIdentifierType' do + element = doc.at("fundingReferences") + element.replace (<<-EOT) + + + European Commission + http://doi.org/10.13039/501100000780 + + + EOT + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(1) + expect(errors.first).to include("The value 'ABC' is not an element of the set {'ISNI', 'GRID', 'ROR', 'Crossref Funder ID', 'Other'}.") + end + + it 'awardNumber' do + element = doc.at("fundingReferences") + element.replace (<<-EOT) + + + European Commission + 284382 + + + EOT + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors).to be_empty + end +end diff --git a/spec/kernel-4.7/geolocation_spec.rb b/spec/kernel-4.7/geolocation_spec.rb new file mode 100644 index 0000000..5d67d2e --- /dev/null +++ b/spec/kernel-4.7/geolocation_spec.rb @@ -0,0 +1,188 @@ +require 'spec_helper' + +describe "validate geoLocation" do + let(:root) { File.join(File.dirname(__FILE__), '../../source/meta/kernel-4') } + let(:xsd) { Dir.chdir(root) { Nokogiri::XML::Schema(File.read("metadata.xsd")) }} + let(:doc) { Dir.chdir(root) { Nokogiri::XML(File.read("example/datacite-example-GeoLocation-v4.xml")) { |c| c.strict }}} + + it 'empty geoLocations tag' do + element = doc.at("geoLocations") + element.replace "" + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors).to be_empty + end + + it 'geoLocationPoint' do + element = doc.at("geoLocations") + element.replace (<<-EOT) + + + + -52.000000 + 69.000000 + + + + EOT + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors).to be_empty + end + + it 'multiple geoLocationPoint' do + element = doc.at("geoLocations") + element.replace (<<-EOT) + + + + -52.000000 + 69.000000 + + + -43.000000 + 78.000000 + + + + EOT + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors).to be_empty + end + + it 'geoLocationPoint missing latitude' do + element = doc.at("geoLocations") + element.replace (<<-EOT) + + + + -52.000000 + + + + EOT + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(1) + expect(errors.first).to include("Element '{http://datacite.org/schema/kernel-4}geoLocationPoint': Missing child element(s). Expected is ( {http://datacite.org/schema/kernel-4}pointLatitude ).") + end + + it 'geoLocationPoint out of range' do + element = doc.at("geoLocations") + element.replace (<<-EOT) + + + + -52.000000 + 110.000000 + + + + EOT + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(1) + expect(errors.first).to include("Element '{http://datacite.org/schema/kernel-4}pointLatitude': [facet 'maxInclusive'] The value '110.000000' is greater than the maximum value allowed ('90').") + end + + it 'pointLatitude out of range' do + element = doc.at("geoLocations") + element.replace (<<-EOT) + + + + -52.000000 + Disko Bay + + + + EOT + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(1) + expect(errors.first).to include("Element '{http://datacite.org/schema/kernel-4}pointLatitude': 'Disko Bay' is not a valid value of the atomic type '{http://datacite.org/schema/kernel-4}latitudeType'.") + end + + it 'geoLocationPolygon' do + element = doc.at("geoLocations") + element.replace (<<-EOT) + + + + + -52 + 69 + + + -52 + 67 + + + -54 + 67 + + + -54 + 69 + + + + + EOT + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors).to be_empty + end + + it 'geoLocationPolygon not enough points' do + element = doc.at("geoLocations") + element.replace (<<-EOT) + + + + + -52 + 69 + + + -52 + 67 + + + + + EOT + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(1) + expect(errors.first).to include("Element '{http://datacite.org/schema/kernel-4}geoLocationPolygon': Missing child element(s). Expected is ( {http://datacite.org/schema/kernel-4}polygonPoint ).") + end + + it 'geoLocationBox' do + element = doc.at("geoLocations") + element.replace (<<-EOT) + + + + -71.032 + -68.211 + 41.090 + 42.893 + + + + EOT + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors).to be_empty + end + + it 'geoLocationBox missing points' do + element = doc.at("geoLocations") + element.replace (<<-EOT) + + + + -71.032 + 41.090 + + + + EOT + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(1) + expect(errors.first).to include("Element '{http://datacite.org/schema/kernel-4}geoLocationBox': Missing child element(s). Expected is one of ( {http://datacite.org/schema/kernel-4}eastBoundLongitude, {http://datacite.org/schema/kernel-4}northBoundLatitude ).") + end +end diff --git a/spec/kernel-4.7/other_spec.rb b/spec/kernel-4.7/other_spec.rb new file mode 100644 index 0000000..a50aa88 --- /dev/null +++ b/spec/kernel-4.7/other_spec.rb @@ -0,0 +1,333 @@ +require 'spec_helper' + +describe "validate other elements" do + let(:root) { File.join(File.dirname(__FILE__), '../../source/meta/kernel-4') } + let(:xsd) { Dir.chdir(root) { Nokogiri::XML::Schema(File.read("metadata.xsd")) }} + let(:doc) { Dir.chdir(root) { Nokogiri::XML(File.read("example/datacite-example-full-v4.xml")) { |c| c.strict }}} + + describe "resourceType" do + it 'missing resourceType' do + element = doc.at("resourceType") + element.replace "" + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(1) + expect(errors.first).to include("Missing child element(s). Expected is ( {http://datacite.org/schema/kernel-4}resourceType ).") + end + + it 'missing resourceTypeGeneral' do + element = doc.at("resourceType") + element.replace "" + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(1) + expect(errors.first).to include("Element '{http://datacite.org/schema/kernel-4}resourceType': The attribute 'resourceTypeGeneral' is required but missing.") + end + + it 'missing resourceTypeGeneral with resourceType' do + element = doc.at("resourceType") + element.replace 'Dataset' + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(1) + expect(errors.first).to include("Element '{http://datacite.org/schema/kernel-4}resourceType': The attribute 'resourceTypeGeneral' is required but missing.") + end + + it 'empty resourceTypeGeneral with resourceType' do + element = doc.at("resourceType") + element.replace 'Dataset' + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(1) + expect(errors.last).to include("26:0: ERROR: Element '{http://datacite.org/schema/kernel-4}resourceType', attribute 'resourceTypeGeneral': [facet 'enumeration'] The value '' is not an element of the set {'Audiovisual', 'Award', 'Book', 'BookChapter', 'Collection', 'ComputationalNotebook', 'ConferencePaper', 'ConferenceProceeding', 'DataPaper', 'Dataset', 'Dissertation', 'Event', 'Image', 'Instrument', 'InteractiveResource', 'Journal', 'JournalArticle', 'Model', 'OutputManagementPlan', 'PeerReview', 'PhysicalObject', 'Poster', 'Preprint', 'Presentation', 'Project', 'Report', 'Service', 'Software', 'Sound', 'Standard', 'StudyRegistration', 'Text', 'Workflow', 'Other'}.") + end + + it 'empty resourceType' do + element = doc.at("resourceType") + element.replace '' + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors).to be_empty + end + + it 'unknown resourceTypeGeneral' do + element = doc.at("resourceType") + element.replace 'Dataset' + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(1) + expect(errors.first).to include("26:0: ERROR: Element '{http://datacite.org/schema/kernel-4}resourceType', attribute 'resourceTypeGeneral': [facet 'enumeration'] The value 'Conference' is not an element of the set {'Audiovisual', 'Award', 'Book', 'BookChapter', 'Collection', 'ComputationalNotebook', 'ConferencePaper', 'ConferenceProceeding', 'DataPaper', 'Dataset', 'Dissertation', 'Event', 'Image', 'Instrument', 'InteractiveResource', 'Journal', 'JournalArticle', 'Model', 'OutputManagementPlan', 'PeerReview', 'PhysicalObject', 'Poster', 'Preprint', 'Presentation', 'Project', 'Report', 'Service', 'Software', 'Sound', 'Standard', 'StudyRegistration', 'Text', 'Workflow', 'Other'}.") + end + + it 'resourceTypeGeneral Book' do + element = doc.at("resourceType") + element.replace '' + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'resourceTypeGeneral BookChapter' do + element = doc.at("resourceType") + element.replace '' + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'resourceTypeGeneral ComputationalNotebook' do + element = doc.at("resourceType") + element.replace '' + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'resourceTypeGeneral ConferencePaper' do + element = doc.at("resourceType") + element.replace '' + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'resourceTypeGeneral ConferenceProceeding' do + element = doc.at("resourceType") + element.replace '' + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'resourceTypeGeneral Dissertation' do + element = doc.at("resourceType") + element.replace '' + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'resourceTypeGeneral Journal' do + element = doc.at("resourceType") + element.replace '' + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'resourceTypeGeneral JournalArticle' do + element = doc.at("resourceType") + element.replace '' + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'resourceTypeGeneral OutputManagementPlan' do + element = doc.at("resourceType") + element.replace '' + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'resourceTypeGeneral PeerReview' do + element = doc.at("resourceType") + element.replace '' + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'resourceTypeGeneral Preprint' do + element = doc.at("resourceType") + element.replace '' + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'resourceTypeGeneral Report' do + element = doc.at("resourceType") + element.replace '' + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'resourceTypeGeneral Standard' do + element = doc.at("resourceType") + element.replace '' + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'resourceTypeGeneral Instrument' do + element = doc.at("resourceType") + element.replace '' + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'resourceTypeGeneral StudyRegistration' do + element = doc.at("resourceType") + element.replace '' + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'resourceTypeGeneral Poster' do + element = doc.at("resourceType") + element.replace '' + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'resourceTypeGeneral Presentation' do + element = doc.at("resourceType") + element.replace '' + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + end + + describe "relatedItemType" do + it 'relatedItemType Instrument' do + related_item = doc.search("relatedItems/relatedItem").first + related_item["relatedItemType"] = "Instrument" + element = doc.at("relatedItems/relatedItem") + element.replace related_item.to_s + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'relatedItemType StudyRegistration' do + related_item = doc.search("relatedItems/relatedItem").first + related_item["relatedItemType"] = "StudyRegistration" + element = doc.at("relatedItems/relatedItem") + element.replace related_item.to_s + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'relatedItemType Poster' do + related_item = doc.search("relatedItems/relatedItem").first + related_item["relatedItemType"] = "Poster" + element = doc.at("relatedItems/relatedItem") + element.replace related_item.to_s + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'relatedItemType Presentation' do + related_item = doc.search("relatedItems/relatedItem").first + related_item["relatedItemType"] = "Presentation" + element = doc.at("relatedItems/relatedItem") + element.replace related_item.to_s + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + end + + describe "relatedIdentifier resourceTypeGeneral" do + it 'relatedIdentifier resourceTypeGeneral Instrument' do + related_item = doc.search("relatedIdentifiers/relatedIdentifier").first + related_item["resourceTypeGeneral"] = "Instrument" + element = doc.at("relatedIdentifiers/relatedIdentifier") + element.replace related_item.to_s + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'relatedIdentifier resourceTypeGeneral StudyRegistration' do + related_item = doc.search("relatedIdentifiers/relatedIdentifier").first + related_item["resourceTypeGeneral"] = "StudyRegistration" + element = doc.at("relatedIdentifiers/relatedIdentifier") + element.replace related_item.to_s + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'relatedIdentifier resourceTypeGeneral Poster' do + related_item = doc.search("relatedIdentifiers/relatedIdentifier").first + related_item["resourceTypeGeneral"] = "Poster" + element = doc.at("relatedIdentifiers/relatedIdentifier") + element.replace related_item.to_s + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'relatedIdentifier resourceTypeGeneral Presentation' do + related_item = doc.search("relatedIdentifiers/relatedIdentifier").first + related_item["resourceTypeGeneral"] = "Presentation" + element = doc.at("relatedIdentifiers/relatedIdentifier") + element.replace related_item.to_s + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + end + + describe "relatedIdentifier relatedIdentifierType" do + it 'RAiD' do + related_identifier = doc.search("relatedIdentifiers/relatedIdentifier").first + related_identifier["relatedIdentifierType"] = "RAiD" + element = doc.at("relatedIdentifiers/relatedIdentifier") + element.replace related_identifier.to_s + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'SWHID' do + related_identifier = doc.search("relatedIdentifiers/relatedIdentifier").first + related_identifier["relatedIdentifierType"] = "SWHID" + element = doc.at("relatedIdentifiers/relatedIdentifier") + element.replace related_identifier.to_s + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + end + + describe 'relatedItem' do + it 'with relationTypeInformation and relationType Other' do + related_item = doc.search("relatedItems/relatedItem").first + related_item['relationType'] = 'Other' + related_item['relationTypeInformation'] = 'is output of' + element = doc.at("relatedItems/relatedItem") + element.replace related_item.to_s + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + end + + describe 'relatedItem relatedItemIdentifierType' do + it 'RAiD' do + related_item = doc.search("relatedItems/relatedItem").first + related_item_identifier = related_item.at("relatedItemIdentifier") + related_item_identifier['relatedItemIdentifierType'] = 'RAiD' + element = doc.at("relatedItems/relatedItem") + element.replace related_item.to_s + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'SWHID' do + related_item = doc.search("relatedItems/relatedItem").first + related_item_identifier = related_item.at("relatedItemIdentifier") + related_item_identifier['relatedItemIdentifierType'] = 'SWHID' + element = doc.at("relatedItems/relatedItem") + element.replace related_item.to_s + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + end + + describe "description" do + it 'empty descriptions tag' do + element = doc.at("descriptions") + element.replace "" + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors).to be_empty + end + end + + describe "publisher with attributes" do + it 'publisher with attributes' do + element = doc.at("publisher") + expect(element.name).to eq("publisher") + expect(element.text).to eq("Example Publisher") + expect(element["xml:lang"]).to eq("en") + expect(element["publisherIdentifier"]).to eq("https://ror.org/04z8jg394") + expect(element["publisherIdentifierScheme"]).to eq("ROR") + expect(element["schemeURI"]).to eq("https://ror.org/") + end + + it 'publisher without attributes' do + element = doc.at("publisher") + element.replace 'Example Publisher' + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors).to be_empty + end + end +end diff --git a/spec/kernel-4.7/pure_example_spec.rb b/spec/kernel-4.7/pure_example_spec.rb new file mode 100644 index 0000000..7b34094 --- /dev/null +++ b/spec/kernel-4.7/pure_example_spec.rb @@ -0,0 +1,40 @@ +require 'spec_helper' + +describe "pure example" do + let(:root) { File.join(File.dirname(__FILE__), '../../source/meta/kernel-4') } + let(:xsd) { Dir.chdir(root) { Nokogiri::XML::Schema(File.read("metadata.xsd")) }} + let(:doc) { Dir.chdir(RSPEC_ROOT) {Nokogiri::XML(File.read("fixtures/pure-example.xml")) { |c| c.strict }}} + + it 'validates' do + expect(doc).to pass_validation(xsd) + end + + it 'has resourceTypeGeneral Dataset' do + resource_type = doc.at("resourceType") + expect(resource_type["resourceTypeGeneral"]).to eq("Dataset") + expect(resource_type.text).to eq("Dataset") + end + + it 'has givenName, familyName, and affiliations' do + creators = doc.search("creator") + expect(creators.size).to eq(1) + creator = creators.first + expect(creator.elements.size).to eq(4) + + creator_name = creator.elements[0] + expect(creator_name.name).to eq("creatorName") + expect(creator_name.text).to eq("Barbosa, Miguel") + + given_name = creator.elements[1] + expect(given_name.name).to eq("givenName") + expect(given_name.text).to eq("Miguel") + + family_name = creator.elements[2] + expect(family_name.name).to eq("familyName") + expect(family_name.text).to eq("Barbosa") + + affiliation = creator.elements[3] + expect(affiliation.name).to eq("affiliation") + expect(affiliation.text).to eq("School of Biology") + end +end diff --git a/spec/kernel-4.7/schema_spec.rb b/spec/kernel-4.7/schema_spec.rb new file mode 100644 index 0000000..c3e1c56 --- /dev/null +++ b/spec/kernel-4.7/schema_spec.rb @@ -0,0 +1,10 @@ +require 'spec_helper' + +describe "full example" do + let(:root) { File.join(File.dirname(__FILE__), '../../source/meta/kernel-4') } + let(:xsd) { Dir.chdir(root) { Nokogiri::XML::Schema(File.read("metadata.xsd")) { |c| c.strict }}} + + it 'is valid' do + expect(xsd.errors).to be_empty + end +end diff --git a/spec/kernel-4.7/user_example_spec.rb b/spec/kernel-4.7/user_example_spec.rb new file mode 100644 index 0000000..0a6fc11 --- /dev/null +++ b/spec/kernel-4.7/user_example_spec.rb @@ -0,0 +1,11 @@ +require 'spec_helper' + +describe "full example" do + let(:doc) { Dir.chdir(RSPEC_ROOT) {Nokogiri::XML(File.read("fixtures/_10.23650.xml")) { |c| c.strict }}} + let(:root) { File.join(File.dirname(__FILE__), '../../source/meta/kernel-4') } + let(:xsd) { Dir.chdir(root) { Nokogiri::XML::Schema(File.read("metadata.xsd")) }} + + it 'does not validate' do + expect(doc).to pass_validation(xsd) + end +end diff --git a/spec/kernel-4/example_poster_spec.rb b/spec/kernel-4/example_poster_spec.rb new file mode 100644 index 0000000..c1c5396 --- /dev/null +++ b/spec/kernel-4/example_poster_spec.rb @@ -0,0 +1,23 @@ +require 'spec_helper' + +describe "poster example" do + let(:root) { File.join(File.dirname(__FILE__), '../../source/meta/kernel-4') } + let(:xsd) { Dir.chdir(root) { Nokogiri::XML::Schema(File.read("metadata.xsd")) }} + let(:doc) { Dir.chdir(root) { Nokogiri::XML(File.read("example/datacite-example-poster-v4.xml")) { |c| c.strict }}} + + it 'validates' do + expect(doc).to pass_validation(xsd) + end + + it 'has resourceTypeGeneral Poster' do + resource_type = doc.at("resourceType") + expect(resource_type["resourceTypeGeneral"]).to eq("Poster") + expect(resource_type.text).to eq("Conference poster") + end + + it 'has relatedIdentifier with relationType Other and relationTypeInformation' do + related_identifier = doc.search("relatedIdentifiers/relatedIdentifier").first + expect(related_identifier['relationType']).to eq('Other') + expect(related_identifier['relationTypeInformation']).to eq('was presented at') + end +end diff --git a/spec/kernel-4/example_presentation_spec.rb b/spec/kernel-4/example_presentation_spec.rb new file mode 100644 index 0000000..2369fe8 --- /dev/null +++ b/spec/kernel-4/example_presentation_spec.rb @@ -0,0 +1,23 @@ +require 'spec_helper' + +describe "presentation example" do + let(:root) { File.join(File.dirname(__FILE__), '../../source/meta/kernel-4') } + let(:xsd) { Dir.chdir(root) { Nokogiri::XML::Schema(File.read("metadata.xsd")) }} + let(:doc) { Dir.chdir(root) { Nokogiri::XML(File.read("example/datacite-example-presentation-v4.xml")) { |c| c.strict }}} + + it 'validates' do + expect(doc).to pass_validation(xsd) + end + + it 'has resourceTypeGeneral Poster' do + resource_type = doc.at("resourceType") + expect(resource_type["resourceTypeGeneral"]).to eq("Presentation") + expect(resource_type.text).to eq("Conference presentation") + end + + it 'has relatedIdentifier with relationType Other and relationTypeInformation' do + related_identifier = doc.search("relatedIdentifiers/relatedIdentifier").first + expect(related_identifier['relationType']).to eq('Other') + expect(related_identifier['relationTypeInformation']).to eq('was presented at') + end +end diff --git a/spec/kernel-4/other_spec.rb b/spec/kernel-4/other_spec.rb index 8868a84..a50aa88 100644 --- a/spec/kernel-4/other_spec.rb +++ b/spec/kernel-4/other_spec.rb @@ -35,7 +35,7 @@ element.replace 'Dataset' errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } expect(errors.length).to eq(1) - expect(errors.last).to include("26:0: ERROR: Element '{http://datacite.org/schema/kernel-4}resourceType', attribute 'resourceTypeGeneral': [facet 'enumeration'] The value '' is not an element of the set {'Audiovisual', 'Award', 'Book', 'BookChapter', 'Collection', 'ComputationalNotebook', 'ConferencePaper', 'ConferenceProceeding', 'DataPaper', 'Dataset', 'Dissertation', 'Event', 'Image', 'Instrument', 'InteractiveResource', 'Journal', 'JournalArticle', 'Model', 'OutputManagementPlan', 'PeerReview', 'PhysicalObject', 'Preprint', 'Project', 'Report', 'Service', 'Software', 'Sound', 'Standard', 'StudyRegistration', 'Text', 'Workflow', 'Other'}") + expect(errors.last).to include("26:0: ERROR: Element '{http://datacite.org/schema/kernel-4}resourceType', attribute 'resourceTypeGeneral': [facet 'enumeration'] The value '' is not an element of the set {'Audiovisual', 'Award', 'Book', 'BookChapter', 'Collection', 'ComputationalNotebook', 'ConferencePaper', 'ConferenceProceeding', 'DataPaper', 'Dataset', 'Dissertation', 'Event', 'Image', 'Instrument', 'InteractiveResource', 'Journal', 'JournalArticle', 'Model', 'OutputManagementPlan', 'PeerReview', 'PhysicalObject', 'Poster', 'Preprint', 'Presentation', 'Project', 'Report', 'Service', 'Software', 'Sound', 'Standard', 'StudyRegistration', 'Text', 'Workflow', 'Other'}.") end it 'empty resourceType' do @@ -50,7 +50,7 @@ element.replace 'Dataset' errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } expect(errors.length).to eq(1) - expect(errors.first).to include("26:0: ERROR: Element '{http://datacite.org/schema/kernel-4}resourceType', attribute 'resourceTypeGeneral': [facet 'enumeration'] The value 'Conference' is not an element of the set {'Audiovisual', 'Award', 'Book', 'BookChapter', 'Collection', 'ComputationalNotebook', 'ConferencePaper', 'ConferenceProceeding', 'DataPaper', 'Dataset', 'Dissertation', 'Event', 'Image', 'Instrument', 'InteractiveResource', 'Journal', 'JournalArticle', 'Model', 'OutputManagementPlan', 'PeerReview', 'PhysicalObject', 'Preprint', 'Project', 'Report', 'Service', 'Software', 'Sound', 'Standard', 'StudyRegistration', 'Text', 'Workflow', 'Other'}.") + expect(errors.first).to include("26:0: ERROR: Element '{http://datacite.org/schema/kernel-4}resourceType', attribute 'resourceTypeGeneral': [facet 'enumeration'] The value 'Conference' is not an element of the set {'Audiovisual', 'Award', 'Book', 'BookChapter', 'Collection', 'ComputationalNotebook', 'ConferencePaper', 'ConferenceProceeding', 'DataPaper', 'Dataset', 'Dissertation', 'Event', 'Image', 'Instrument', 'InteractiveResource', 'Journal', 'JournalArticle', 'Model', 'OutputManagementPlan', 'PeerReview', 'PhysicalObject', 'Poster', 'Preprint', 'Presentation', 'Project', 'Report', 'Service', 'Software', 'Sound', 'Standard', 'StudyRegistration', 'Text', 'Workflow', 'Other'}.") end it 'resourceTypeGeneral Book' do @@ -157,6 +157,20 @@ errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } expect(errors.length).to eq(0) end + + it 'resourceTypeGeneral Poster' do + element = doc.at("resourceType") + element.replace '' + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'resourceTypeGeneral Presentation' do + element = doc.at("resourceType") + element.replace '' + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end end describe "relatedItemType" do @@ -177,6 +191,24 @@ errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } expect(errors.length).to eq(0) end + + it 'relatedItemType Poster' do + related_item = doc.search("relatedItems/relatedItem").first + related_item["relatedItemType"] = "Poster" + element = doc.at("relatedItems/relatedItem") + element.replace related_item.to_s + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'relatedItemType Presentation' do + related_item = doc.search("relatedItems/relatedItem").first + related_item["relatedItemType"] = "Presentation" + element = doc.at("relatedItems/relatedItem") + element.replace related_item.to_s + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end end describe "relatedIdentifier resourceTypeGeneral" do @@ -197,6 +229,78 @@ errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } expect(errors.length).to eq(0) end + + it 'relatedIdentifier resourceTypeGeneral Poster' do + related_item = doc.search("relatedIdentifiers/relatedIdentifier").first + related_item["resourceTypeGeneral"] = "Poster" + element = doc.at("relatedIdentifiers/relatedIdentifier") + element.replace related_item.to_s + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'relatedIdentifier resourceTypeGeneral Presentation' do + related_item = doc.search("relatedIdentifiers/relatedIdentifier").first + related_item["resourceTypeGeneral"] = "Presentation" + element = doc.at("relatedIdentifiers/relatedIdentifier") + element.replace related_item.to_s + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + end + + describe "relatedIdentifier relatedIdentifierType" do + it 'RAiD' do + related_identifier = doc.search("relatedIdentifiers/relatedIdentifier").first + related_identifier["relatedIdentifierType"] = "RAiD" + element = doc.at("relatedIdentifiers/relatedIdentifier") + element.replace related_identifier.to_s + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'SWHID' do + related_identifier = doc.search("relatedIdentifiers/relatedIdentifier").first + related_identifier["relatedIdentifierType"] = "SWHID" + element = doc.at("relatedIdentifiers/relatedIdentifier") + element.replace related_identifier.to_s + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + end + + describe 'relatedItem' do + it 'with relationTypeInformation and relationType Other' do + related_item = doc.search("relatedItems/relatedItem").first + related_item['relationType'] = 'Other' + related_item['relationTypeInformation'] = 'is output of' + element = doc.at("relatedItems/relatedItem") + element.replace related_item.to_s + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + end + + describe 'relatedItem relatedItemIdentifierType' do + it 'RAiD' do + related_item = doc.search("relatedItems/relatedItem").first + related_item_identifier = related_item.at("relatedItemIdentifier") + related_item_identifier['relatedItemIdentifierType'] = 'RAiD' + element = doc.at("relatedItems/relatedItem") + element.replace related_item.to_s + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end + + it 'SWHID' do + related_item = doc.search("relatedItems/relatedItem").first + related_item_identifier = related_item.at("relatedItemIdentifier") + related_item_identifier['relatedItemIdentifierType'] = 'SWHID' + element = doc.at("relatedItems/relatedItem") + element.replace related_item.to_s + errors = xsd.validate(Nokogiri::XML(doc.to_xml)).map { |error| error.to_s } + expect(errors.length).to eq(0) + end end describe "description" do