diff --git a/.ruby-version b/.ruby-version
new file mode 100644
index 00000000..a5c51e13
--- /dev/null
+++ b/.ruby-version
@@ -0,0 +1 @@
+2.5.8
\ No newline at end of file
diff --git a/Gemfile b/Gemfile
index 8a49b347..bdbb3f5f 100644
--- a/Gemfile
+++ b/Gemfile
@@ -11,3 +11,4 @@ gem 'rspec'
gem 'rspec-xsd'
gem 'nokogiri', '~> 1.10'
gem 'html-proofer', '~> 3.7', '>= 3.7.6'
+gem 'pry', '~> 0.14.2'
diff --git a/Gemfile.lock b/Gemfile.lock
index 6a8b2754..1dc87264 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -17,6 +17,7 @@ GEM
public_suffix (>= 2.0.2, < 5.0)
backports (3.18.2)
borrower (0.10.0)
+ coderay (1.1.3)
coffee-script (2.4.1)
coffee-script-source
execjs
@@ -60,6 +61,7 @@ GEM
rb-inotify (~> 0.9, >= 0.9.7)
memoist (0.16.2)
mercenary (0.4.0)
+ method_source (1.1.0)
middleman (4.2.1)
coffee-script (~> 2.2)
compass-import-once (= 1.0.5)
@@ -118,6 +120,9 @@ GEM
activesupport (>= 3.1)
pandoc-ruby (2.1.4)
parallel (1.20.0)
+ pry (0.14.2)
+ coderay (~> 1.1)
+ method_source (~> 1.0)
public_suffix (4.0.6)
rack (2.2.3)
rack-livereload (0.3.17)
@@ -168,6 +173,7 @@ DEPENDENCIES
middleman-livereload
nokogiri (~> 1.10)
pandoc-ruby (~> 2.0)
+ pry (~> 0.14.2)
rspec
rspec-xsd
tilt (~> 2.0)!
diff --git a/source/_four.html.md.erb b/source/_four.html.md.erb
index c056455b..1b3df180 100644
--- a/source/_four.html.md.erb
+++ b/source/_four.html.md.erb
@@ -1,9 +1,11 @@
-## Metadata Schema 4.5
+## Metadata Schema 4.6
-Released <%= Date.parse("2024-01-22").strftime("%-d %b %Y") %>. Changes in this version include:
+Released <%= Date.parse("2024-12-05").strftime("%-d %b %Y") %>. Changes in this version include:
-* Addition of new values to the resourceTypeGeneral property: Instrument and StudyRegistration
-* Addition of new relationType pair: IsCollectedBy and Collects
-* Addition of new sub-properties in the Publisher property
+* New resourceTypeGeneral values: Award and Project
+* New relatedIdentifierType values: CSTR and RRID
+* New relationType pair: IsTranslationOf and HasTranslation
+* New contributorType: Translator
+* New dateType: Coverage
-More info
+More info
diff --git a/source/_versions.html.md.erb b/source/_versions.html.md.erb
index 90658725..675a781a 100644
--- a/source/_versions.html.md.erb
+++ b/source/_versions.html.md.erb
@@ -1,5 +1,27 @@
## DataCite Metadata Schema 4
+### [DataCite Metadata Schema 4.6](/meta/kernel-4.6/)
+
+Released <%= Date.parse("2024-12-05").strftime("%-d %b %Y") %>. Changes in this version include:
+
+* 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
+
+
- - <%= link_to "Schema 4.5", "/meta/kernel-4.5/"%>
- - <%= link_to "Older Versions", "/versions.html"%>
+ - <%= link_to "Schema 4.6", "/meta/kernel-4.6/"%>
+ - <%= link_to "Release History", "/versions.html"%>
- <%= link_to "Contribute", "/contribute.html"%>
- <%= link_to "Support ↗", "http://support.datacite.org" %>
diff --git a/source/meta/kernel-4.6/example/datacite-example-award-v4.xml b/source/meta/kernel-4.6/example/datacite-example-award-v4.xml
new file mode 100644
index 00000000..b014281e
--- /dev/null
+++ b/source/meta/kernel-4.6/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.6/example/datacite-example-coverage-v4.xml b/source/meta/kernel-4.6/example/datacite-example-coverage-v4.xml
new file mode 100644
index 00000000..91e7faf8
--- /dev/null
+++ b/source/meta/kernel-4.6/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.6/example/datacite-example-dataset-v4.xml b/source/meta/kernel-4.6/example/datacite-example-dataset-v4.xml
new file mode 100644
index 00000000..dcb320f0
--- /dev/null
+++ b/source/meta/kernel-4.6/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.6/example/datacite-example-full-v4.xml b/source/meta/kernel-4.6/example/datacite-example-full-v4.xml
new file mode 100644
index 00000000..8456b4e0
--- /dev/null
+++ b/source/meta/kernel-4.6/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.6/example/datacite-example-instrument-v4.xml b/source/meta/kernel-4.6/example/datacite-example-instrument-v4.xml
new file mode 100644
index 00000000..9b1054b6
--- /dev/null
+++ b/source/meta/kernel-4.6/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.6/example/datacite-example-multilingual-v4.xml b/source/meta/kernel-4.6/example/datacite-example-multilingual-v4.xml
new file mode 100644
index 00000000..c244e10c
--- /dev/null
+++ b/source/meta/kernel-4.6/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.6/example/datacite-example-parallel-languages-v4.xml b/source/meta/kernel-4.6/example/datacite-example-parallel-languages-v4.xml
new file mode 100644
index 00000000..5cfff9a6
--- /dev/null
+++ b/source/meta/kernel-4.6/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.6/example/datacite-example-project-v4.xml b/source/meta/kernel-4.6/example/datacite-example-project-v4.xml
new file mode 100644
index 00000000..73767559
--- /dev/null
+++ b/source/meta/kernel-4.6/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.6/example/datacite-example-relateditem1-v4.xml b/source/meta/kernel-4.6/example/datacite-example-relateditem1-v4.xml
new file mode 100644
index 00000000..fbb5551f
--- /dev/null
+++ b/source/meta/kernel-4.6/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.6/example/datacite-example-relateditem2-v4.xml b/source/meta/kernel-4.6/example/datacite-example-relateditem2-v4.xml
new file mode 100644
index 00000000..933509fb
--- /dev/null
+++ b/source/meta/kernel-4.6/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.6/example/datacite-example-relateditem3-v4.xml b/source/meta/kernel-4.6/example/datacite-example-relateditem3-v4.xml
new file mode 100644
index 00000000..bb11ef77
--- /dev/null
+++ b/source/meta/kernel-4.6/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.6/example/datacite-example-translation-original-v4.xml b/source/meta/kernel-4.6/example/datacite-example-translation-original-v4.xml
new file mode 100644
index 00000000..ffb2cd9c
--- /dev/null
+++ b/source/meta/kernel-4.6/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.6/example/datacite-example-translation-translated-v4.xml b/source/meta/kernel-4.6/example/datacite-example-translation-translated-v4.xml
new file mode 100644
index 00000000..c8b5b640
--- /dev/null
+++ b/source/meta/kernel-4.6/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.6/include/datacite-contributorType-v4.xsd b/source/meta/kernel-4.6/include/datacite-contributorType-v4.xsd
new file mode 100644
index 00000000..686ee576
--- /dev/null
+++ b/source/meta/kernel-4.6/include/datacite-contributorType-v4.xsd
@@ -0,0 +1,37 @@
+
+
+
+
+
+ The type of contributor of the resource.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/source/meta/kernel-4.6/include/datacite-dateType-v4.xsd b/source/meta/kernel-4.6/include/datacite-dateType-v4.xsd
new file mode 100644
index 00000000..17db9921
--- /dev/null
+++ b/source/meta/kernel-4.6/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.6/include/datacite-descriptionType-v4.xsd b/source/meta/kernel-4.6/include/datacite-descriptionType-v4.xsd
new file mode 100644
index 00000000..4f5e5f47
--- /dev/null
+++ b/source/meta/kernel-4.6/include/datacite-descriptionType-v4.xsd
@@ -0,0 +1,19 @@
+
+
+
+
+
+ The type of the description.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/source/meta/kernel-4.6/include/datacite-funderIdentifierType-v4.xsd b/source/meta/kernel-4.6/include/datacite-funderIdentifierType-v4.xsd
new file mode 100644
index 00000000..754c9724
--- /dev/null
+++ b/source/meta/kernel-4.6/include/datacite-funderIdentifierType-v4.xsd
@@ -0,0 +1,16 @@
+
+
+
+
+
+ The type of the funderIdentifier.
+
+
+
+
+
+
+
+
+
+
diff --git a/source/meta/kernel-4.6/include/datacite-nameType-v4.xsd b/source/meta/kernel-4.6/include/datacite-nameType-v4.xsd
new file mode 100644
index 00000000..bf54922f
--- /dev/null
+++ b/source/meta/kernel-4.6/include/datacite-nameType-v4.xsd
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/source/meta/kernel-4.6/include/datacite-numberType-v4.xsd b/source/meta/kernel-4.6/include/datacite-numberType-v4.xsd
new file mode 100644
index 00000000..0de90c70
--- /dev/null
+++ b/source/meta/kernel-4.6/include/datacite-numberType-v4.xsd
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/source/meta/kernel-4.6/include/datacite-relatedIdentifierType-v4.xsd b/source/meta/kernel-4.6/include/datacite-relatedIdentifierType-v4.xsd
new file mode 100644
index 00000000..71930fd8
--- /dev/null
+++ b/source/meta/kernel-4.6/include/datacite-relatedIdentifierType-v4.xsd
@@ -0,0 +1,37 @@
+
+
+
+
+
+ The type of the RelatedIdentifier.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/source/meta/kernel-4.6/include/datacite-relationType-v4.xsd b/source/meta/kernel-4.6/include/datacite-relationType-v4.xsd
new file mode 100644
index 00000000..e7f72c44
--- /dev/null
+++ b/source/meta/kernel-4.6/include/datacite-relationType-v4.xsd
@@ -0,0 +1,57 @@
+
+
+
+
+
+ Description of the relationship of the resource being registered (A) and the related resource (B).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/source/meta/kernel-4.6/include/datacite-resourceType-v4.xsd b/source/meta/kernel-4.6/include/datacite-resourceType-v4.xsd
new file mode 100644
index 00000000..b3311da1
--- /dev/null
+++ b/source/meta/kernel-4.6/include/datacite-resourceType-v4.xsd
@@ -0,0 +1,49 @@
+
+
+
+
+
+ The general type of a resource.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/source/meta/kernel-4.6/include/datacite-titleType-v4.xsd b/source/meta/kernel-4.6/include/datacite-titleType-v4.xsd
new file mode 100644
index 00000000..18efc0da
--- /dev/null
+++ b/source/meta/kernel-4.6/include/datacite-titleType-v4.xsd
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/source/meta/kernel-4.6/include/xml.xsd b/source/meta/kernel-4.6/include/xml.xsd
new file mode 100644
index 00000000..bd291f3d
--- /dev/null
+++ b/source/meta/kernel-4.6/include/xml.xsd
@@ -0,0 +1,286 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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".
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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.
+
+
+
+
+
+
+
+
+
+
+
+
+ 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.6/index.html.md b/source/meta/kernel-4.6/index.html.md
new file mode 100644
index 00000000..5c6b006f
--- /dev/null
+++ b/source/meta/kernel-4.6/index.html.md
@@ -0,0 +1,65 @@
+---
+title: DataCite Metadata Schema 4.6
+version: 4.6
+date: 2024-12-05
+layout: schema
+schema_url: /meta/kernel-4.6/metadata.xsd
+documentation_url: https://datacite-metadata-schema.readthedocs.io/en/4.6/
+---
+
+## 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)
+
+
+
+
+
+## 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)
+
+
+
+## Changes
+
+#### See [Version 4.6 Update](https://datacite-metadata-schema.readthedocs.io/en/4.6/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
+
+
+## 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 Award resourceTypeGeneral: [XML](example/datacite-example-award-v4.xml), [JSON]()
+* 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 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.6/metadata.xsd b/source/meta/kernel-4.6/metadata.xsd
new file mode 100644
index 00000000..116a1c4f
--- /dev/null
+++ b/source/meta/kernel-4.6/metadata.xsd
@@ -0,0 +1,712 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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-award-v4.xml b/source/meta/kernel-4/example/datacite-example-award-v4.xml
new file mode 100644
index 00000000..b014281e
--- /dev/null
+++ b/source/meta/kernel-4/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/example/datacite-example-coverage-v4.xml b/source/meta/kernel-4/example/datacite-example-coverage-v4.xml
new file mode 100644
index 00000000..91e7faf8
--- /dev/null
+++ b/source/meta/kernel-4/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/example/datacite-example-full-v4.xml b/source/meta/kernel-4/example/datacite-example-full-v4.xml
index ec51d4fa..8456b4e0 100644
--- a/source/meta/kernel-4/example/datacite-example-full-v4.xml
+++ b/source/meta/kernel-4/example/datacite-example-full-v4.xml
@@ -1,8 +1,6 @@
-
+
10.82433/B09Z-4K37
@@ -24,7 +22,7 @@
Example AlternativeTitle
Example Publisher
- 2023
+ 2024
Example ResourceType
FOS: Computer and information sciences
@@ -146,6 +144,13 @@
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
@@ -159,17 +164,18 @@
- 2023-01-01
- 2023-01-01
- 2023-01-01
- 2022-01-01/2022-12-31
- 2023-01-01
- 2023-01-01
- 2023-01-01
- 2023-01-01
- 2023-01-01
- 2023-01-01
- 2023-01-01
+ 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
@@ -177,34 +183,34 @@
ark:/13030/tqb3kh97gh8w
- arXiv:0706.0001
- 2018AGUFM.A24K..07S
- 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
- 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
+ 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
@@ -212,6 +218,8 @@
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
@@ -310,4 +318,3 @@
-
\ No newline at end of file
diff --git a/source/meta/kernel-4/example/datacite-example-instrument-v4.xml b/source/meta/kernel-4/example/datacite-example-instrument-v4.xml
index e810f2e4..9b1054b6 100644
--- a/source/meta/kernel-4/example/datacite-example-instrument-v4.xml
+++ b/source/meta/kernel-4/example/datacite-example-instrument-v4.xml
@@ -1,8 +1,6 @@
-
+
10.82433/08QF-EE96
diff --git a/source/meta/kernel-4/example/datacite-example-multilingual-v4.xml b/source/meta/kernel-4/example/datacite-example-multilingual-v4.xml
index e74472b9..c244e10c 100644
--- a/source/meta/kernel-4/example/datacite-example-multilingual-v4.xml
+++ b/source/meta/kernel-4/example/datacite-example-multilingual-v4.xml
@@ -1,8 +1,6 @@
-
+
10.82433/BYT7-2G42
Advances in Chemistry
@@ -31,7 +29,7 @@
2024-01-01
- This chapter reviews selected landmarks ocurred in Chemistry basic research in the last 5 years
+ 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年中在化学基础研究中发生的一些里程碑式的事件
diff --git a/source/meta/kernel-4/example/datacite-example-parallel-languages-v4.xml b/source/meta/kernel-4/example/datacite-example-parallel-languages-v4.xml
new file mode 100644
index 00000000..5cfff9a6
--- /dev/null
+++ b/source/meta/kernel-4/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/example/datacite-example-project-v4.xml b/source/meta/kernel-4/example/datacite-example-project-v4.xml
new file mode 100644
index 00000000..73767559
--- /dev/null
+++ b/source/meta/kernel-4/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/example/datacite-example-translation-original-v4.xml b/source/meta/kernel-4/example/datacite-example-translation-original-v4.xml
new file mode 100644
index 00000000..ffb2cd9c
--- /dev/null
+++ b/source/meta/kernel-4/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/example/datacite-example-translation-translated-v4.xml b/source/meta/kernel-4/example/datacite-example-translation-translated-v4.xml
new file mode 100644
index 00000000..c8b5b640
--- /dev/null
+++ b/source/meta/kernel-4/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/include/datacite-contributorType-v4.xsd b/source/meta/kernel-4/include/datacite-contributorType-v4.xsd
index f264e07e..686ee576 100644
--- a/source/meta/kernel-4/include/datacite-contributorType-v4.xsd
+++ b/source/meta/kernel-4/include/datacite-contributorType-v4.xsd
@@ -2,7 +2,8 @@
+ 2015-05-14 v4.0 dropped value "Funder", use new "funderReference"
+ 2024-12-05 v4.6: Addition of value "Translator" -->
@@ -29,6 +30,7 @@
+
diff --git a/source/meta/kernel-4/include/datacite-dateType-v4.xsd b/source/meta/kernel-4/include/datacite-dateType-v4.xsd
index 1f201287..17db9921 100644
--- a/source/meta/kernel-4/include/datacite-dateType-v4.xsd
+++ b/source/meta/kernel-4/include/datacite-dateType-v4.xsd
@@ -2,7 +2,8 @@
+ 2019-02-14 v4.2: Addition of value "Withdrawn"
+ 2024-12-05 v4.6: Addition of value "Coverage"-->
@@ -13,6 +14,7 @@
+
diff --git a/source/meta/kernel-4/include/datacite-relatedIdentifierType-v4.xsd b/source/meta/kernel-4/include/datacite-relatedIdentifierType-v4.xsd
index 80ab3dab..71930fd8 100644
--- a/source/meta/kernel-4/include/datacite-relatedIdentifierType-v4.xsd
+++ b/source/meta/kernel-4/include/datacite-relatedIdentifierType-v4.xsd
@@ -2,8 +2,9 @@
+ 2015-02-12 v4.0: Addition of value "IGSN"
+ 2019-02-14 v4.2: Addition of value "w3id"
+ 2024-12-05 v4.5: Addition of values "CSTR", "RRID" -->
@@ -13,6 +14,7 @@
+
@@ -25,6 +27,7 @@
+
diff --git a/source/meta/kernel-4/include/datacite-relationType-v4.xsd b/source/meta/kernel-4/include/datacite-relationType-v4.xsd
index 5ed3333a..e7f72c44 100644
--- a/source/meta/kernel-4/include/datacite-relationType-v4.xsd
+++ b/source/meta/kernel-4/include/datacite-relationType-v4.xsd
@@ -3,9 +3,11 @@
2011-01-13 v1.0 - FZ, TIB, Germany
2013-05 v3.0: Addition of ID to simpleType element, addition of values "IsIdenticalTo", "HasMetadata" & "IsMetadataFor"
2014-08-20 v3.1: Addition of values "Reviews" & "IsReviewedBy" and "IsDerivedFrom" & "IsSourceOf"
- 2017-10-23 v.4.1: Addition of values "Describes", "IsDescribedBy", "HasVersion", "IsVersionOf", "Requires", "IsRequiredBy"
- 2019-02-14 v.4.2: Addition of values "Obsoletes", "IsObsoletedBy"
- 2021-03-05 v.4.4: Addition of value "IsPublishedIn" -->
+ 2017-10-23 v4.1: Addition of values "Describes", "IsDescribedBy", "HasVersion", "IsVersionOf", "Requires", "IsRequiredBy"
+ 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"-->
@@ -48,6 +50,8 @@
+
+
diff --git a/source/meta/kernel-4/include/datacite-resourceType-v4.xsd b/source/meta/kernel-4/include/datacite-resourceType-v4.xsd
index 623fe479..b3311da1 100644
--- a/source/meta/kernel-4/include/datacite-resourceType-v4.xsd
+++ b/source/meta/kernel-4/include/datacite-resourceType-v4.xsd
@@ -3,7 +3,9 @@
2013-05 v3.0: Addition of ID to simpleType element; added values "Audiovisual", "Workflow" & "Other"; deleted value "Film"
2017-10-23 v4.1: Addition of value "DataPaper"
2020-01-14 v4.4: Addition of values "Book", "Book Chapter", "ComputationalNotebook", "ConferencePaper", "ConferenceProceeding".
- "Dissertation", "Journal", "JournalArticle", "OutputManagementPlan", "PeerReview", "Preprint", "Report" -->
+ "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"-->
@@ -11,6 +13,7 @@
+
@@ -31,6 +34,7 @@
+
diff --git a/source/meta/kernel-4/include/datacite-titleType-v4.xsd b/source/meta/kernel-4/include/datacite-titleType-v4.xsd
index df8ae3a4..18efc0da 100644
--- a/source/meta/kernel-4/include/datacite-titleType-v4.xsd
+++ b/source/meta/kernel-4/include/datacite-titleType-v4.xsd
@@ -1,7 +1,7 @@
+ 2015-02-12 v4.0: Added value "Other" -->
diff --git a/source/meta/kernel-4/index.html.md b/source/meta/kernel-4/index.html.md
index 49b9387a..5c6b006f 100644
--- a/source/meta/kernel-4/index.html.md
+++ b/source/meta/kernel-4/index.html.md
@@ -1,42 +1,34 @@
---
-title: DataCite Metadata Schema 4.5
-version: 4.5
-date: 2024-01-22
+title: DataCite Metadata Schema 4.6
+version: 4.6
+date: 2024-12-05
layout: schema
-schema_url: /meta/kernel-4.5/metadata.xsd
-documentation_url: https://datacite-metadata-schema.readthedocs.io/en/4.5/
+schema_url: /meta/kernel-4.6/metadata.xsd
+documentation_url: https://datacite-metadata-schema.readthedocs.io/en/4.6/
---
## Documentation
-DataCite Metadata Working Group. (2024). DataCite Metadata Schema Documentation for the Publication and Citation of Research Data and Other Research Outputs. Version 4.5. DataCite e.V. [https://doi.org/10.14454/g8e5-6293](https://doi.org/10.14454/g8e5-6293)
+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)
-
+
-
+
## Schema
-DataCite Metadata Working Group. (2024). DataCite Metadata Schema for the Publication and Citation of Research Data and Other Research Outputs. Version 4.5. DataCite e.V. [https://doi.org/10.14454/znvd-6q68](https://doi.org/10.14454/znvd-6q68)
+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)
## Changes
-#### See [Version 4.5 Update](https://datacite-metadata-schema.readthedocs.io/en/4.5/introduction/version-update) for full details.
+#### See [Version 4.6 Update](https://datacite-metadata-schema.readthedocs.io/en/4.6/introduction/version-update) for full details.
-* Addition of new values to the resourceTypeGeneral property:
- * Instrument
- * StudyRegistration
-* Addition of new relationType pair: IsCollectedBy and Collects
-* Addition of new sub-properties in the Publisher property:
- * publisherIdentifier
- * publisherIdentifierScheme
- * schemeURI
-* Documentation changes:
- * Changes and additions to definitions support of instruments, and addition of a new mapping
- * Change to the definition of PhysicalObject in support of samples
- * Changes and additions to the sub-property definitions of RelatedItem
- * Other changes and corrections: see [Version 4.5 Update](https://datacite-metadata-schema.readthedocs.io/en/4.5/introduction/version-update/#other-changes-and-corrections)
+* 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
## Examples
@@ -45,7 +37,13 @@ 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 Instrument resourceTypeGeneral: [XML](example/datacite-example-instrument-v4.xml), [JSON](https://api.test.datacite.org/dois/10.82433/08qf-ee96?publisher=true&affiliation=true)
+* Example for Award resourceTypeGeneral: [XML](example/datacite-example-award-v4.xml), [JSON]()
+* 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 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)
@@ -62,4 +60,6 @@ Live Examples (real DOIs - metadata may change)
* 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/metadata.xsd b/source/meta/kernel-4/metadata.xsd
index 67702c10..116a1c4f 100644
--- a/source/meta/kernel-4/metadata.xsd
+++ b/source/meta/kernel-4/metadata.xsd
@@ -13,7 +13,8 @@
2019-02-14 v4.2: Addition of dateType value "Withdrawn", relationType values "Obsoletes", "isObsoletedBy", addition of new subproperties for Rights: rightsIdentifier, rightsIdentifierScheme, schemeURI, addition of the XML language attribute to the properties Creator, Contributor and Publisher for organizational names, don't check format of DOI
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-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".-->
diff --git a/source/versions.html.erb b/source/versions.html.erb
index 186d2845..2fbd7c8e 100644
--- a/source/versions.html.erb
+++ b/source/versions.html.erb
@@ -1,6 +1,6 @@
---
-title: Older Versions
-description: Older versions of the DataCite Metadata Schema
+title: Release History
+description: All versions of the DataCite Metadata Schema
---
diff --git a/spec/kernel-4.5/other_spec.rb b/spec/kernel-4.5/other_spec.rb
index bb153bd4..1eb5804b 100644
--- a/spec/kernel-4.5/other_spec.rb
+++ b/spec/kernel-4.5/other_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe "validate other elements" do
- let(:root) { File.join(File.dirname(__FILE__), '../../source/meta/kernel-4') }
+ let(:root) { File.join(File.dirname(__FILE__), '../../source/meta/kernel-4.5') }
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 }}}
@@ -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("Element '{http://datacite.org/schema/kernel-4}resourceType', attribute 'resourceTypeGeneral': [facet 'enumeration'] The value '' is not an element of the set {'Audiovisual', 'Book', 'BookChapter', 'Collection', 'ComputationalNotebook', 'ConferencePaper', 'ConferenceProceeding', 'DataPaper', 'Dataset', 'Dissertation', 'Event', 'Image', 'Instrument', 'InteractiveResource', 'Journal', 'JournalArticle', 'Model', 'OutputManagementPlan', 'PeerReview', 'PhysicalObject', 'Preprint', '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', 'Book', 'BookChapter', 'Collection', 'ComputationalNotebook', 'ConferencePaper', 'ConferenceProceeding', 'DataPaper', 'Dataset', 'Dissertation', 'Event', 'Image', 'Instrument', 'InteractiveResource', 'Journal', 'JournalArticle', 'Model', 'OutputManagementPlan', 'PeerReview', 'PhysicalObject', 'Preprint', '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("The value 'Conference' is not an element of the set {'Audiovisual', 'Book', 'BookChapter', 'Collection', 'ComputationalNotebook', 'ConferencePaper', 'ConferenceProceeding', 'DataPaper', 'Dataset', 'Dissertation', 'Event', 'Image', 'Instrument', 'InteractiveResource', 'Journal', 'JournalArticle', 'Model', 'OutputManagementPlan', 'PeerReview', 'PhysicalObject', 'Preprint', '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', 'Book', 'BookChapter', 'Collection', 'ComputationalNotebook', 'ConferencePaper', 'ConferenceProceeding', 'DataPaper', 'Dataset', 'Dissertation', 'Event', 'Image', 'Instrument', 'InteractiveResource', 'Journal', 'JournalArticle', 'Model', 'OutputManagementPlan', 'PeerReview', 'PhysicalObject', 'Preprint', 'Report', 'Service', 'Software', 'Sound', 'Standard', 'StudyRegistration', 'Text', 'Workflow', 'Other'}.")
end
it 'resourceTypeGeneral Book' do
diff --git a/spec/kernel-4.6/doi_spec.rb b/spec/kernel-4.6/doi_spec.rb
new file mode 100644
index 00000000..2a84a47d
--- /dev/null
+++ b/spec/kernel-4.6/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.6/example-ancientdates_spec.rb b/spec/kernel-4.6/example-ancientdates_spec.rb
new file mode 100644
index 00000000..914728ea
--- /dev/null
+++ b/spec/kernel-4.6/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.6/example_affiliation_spec.rb b/spec/kernel-4.6/example_affiliation_spec.rb
new file mode 100644
index 00000000..f440768b
--- /dev/null
+++ b/spec/kernel-4.6/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.6/example_all_fields_spec.rb b/spec/kernel-4.6/example_all_fields_spec.rb
new file mode 100644
index 00000000..540f08e6
--- /dev/null
+++ b/spec/kernel-4.6/example_all_fields_spec.rb
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "all fields 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/all-fields-v4.4.xml")) { |c| c.strict }}}
+
+ it 'validates' do
+ expect(doc).to pass_validation(xsd)
+ end
+end
diff --git a/spec/kernel-4.6/example_complicated_spec.rb b/spec/kernel-4.6/example_complicated_spec.rb
new file mode 100644
index 00000000..39736f2f
--- /dev/null
+++ b/spec/kernel-4.6/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.6/example_dataset_spec.rb b/spec/kernel-4.6/example_dataset_spec.rb
new file mode 100644
index 00000000..7d59c53a
--- /dev/null
+++ b/spec/kernel-4.6/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.6/example_dissertation_spec.rb b/spec/kernel-4.6/example_dissertation_spec.rb
new file mode 100644
index 00000000..8f49d552
--- /dev/null
+++ b/spec/kernel-4.6/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.6/example_documentation_spec.rb b/spec/kernel-4.6/example_documentation_spec.rb
new file mode 100644
index 00000000..fc0baad0
--- /dev/null
+++ b/spec/kernel-4.6/example_documentation_spec.rb
@@ -0,0 +1,22 @@
+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("../../../spec/fixtures/example-schema-documentation.xml")) { |c| c.strict }}}
+
+ it 'validates' do
+ expect(doc).to pass_validation(xsd)
+ end
+
+ it 'has one creator' do
+ creators = doc.search("creator")
+ expect(creators.size).to eq(1)
+ creator = creators.first
+ expect(creator.elements.size).to eq(1)
+
+ creator_name = creator.elements[0]
+ expect(creator_name.name).to eq("creatorName")
+ expect(creator_name.text).to eq("DataCite Metadata Working Group")
+ end
+end
diff --git a/spec/kernel-4.6/example_full_spec.rb b/spec/kernel-4.6/example_full_spec.rb
new file mode 100644
index 00000000..c824bcb2
--- /dev/null
+++ b/spec/kernel-4.6/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.6/example_funding_reference_spec.rb b/spec/kernel-4.6/example_funding_reference_spec.rb
new file mode 100644
index 00000000..02517518
--- /dev/null
+++ b/spec/kernel-4.6/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 = "
and other elements exist
+ expect(creator_name).not_to be_nil, "Creator name not found"
+ expect(creator_name.text.strip).to eq("ExampleFamilyName, ExampleGivenName")
+
+ # Validate givenName and familyName
+ expect(given_name).not_to be_nil, "Given name not found"
+ expect(given_name.text.strip).to eq("ExampleGivenName")
+
+ expect(family_name).not_to be_nil, "Family name not found"
+ expect(family_name.text.strip).to eq("ExampleFamilyName")
+
+ # Validate ORCID
+ expect(orcid).not_to be_nil, "ORCID not found"
+ expect(orcid.text.strip).to eq("https://orcid.org/0000-0001-5727-2427")
+
+ # Validate Affiliation
+ expect(affiliation).not_to be_nil, "Affiliation not found"
+ expect(affiliation.text.strip).to eq("ExampleAffiliation")
+
+ end
+ end
+
+ describe "titles" do
+ # Check the titles and attributes
+ it 'has titles with correct attributes and values' do
+ titles = doc.xpath("/*[local-name()='resource']/*[local-name()='titles']/*[local-name()='title']")
+
+ expect(titles.size).to eq(4)
+
+ expected_titles = [
+ { value: "Example Title", lang: "en", titleType: nil },
+ { value: "Example Subtitle", lang: "en", titleType: "Subtitle" },
+ { value: "Example TranslatedTitle", lang: "fr", titleType: "TranslatedTitle" },
+ { value: "Example AlternativeTitle", lang: "en", titleType: "AlternativeTitle" }
+ ]
+
+ expected_titles.each_with_index do |expected, index|
+ title_node = titles[index]
+ expect(title_node.text).to eq(expected[:value]), "Title value mismatch at index #{index}"
+
+ if expected[:titleType]
+ expect(title_node["titleType"]).to eq(expected[:titleType]), "Missing or incorrect titleType for title at index #{index}"
+ end
+
+ if expected[:lang]
+ expect(title_node["xml:lang"]).to eq(expected[:lang]), "Missing or incorrect xml:lang for title at index #{index}"
+ end
+ end
+ end
+ end
+
+ describe "publisher" do
+ # Check the publisher and publication year
+ it 'has the correct publisher and publication year' do
+ publisher = doc.xpath("/*[local-name()='resource']/*[local-name()='publisher']").first
+
+ expect(publisher.text).to eq("Example Publisher")
+ expect(publisher["publisherIdentifier"]).to eq("https://ror.org/04z8jg394")
+ expect(publisher["publisherIdentifierScheme"]).to eq("ROR")
+ expect(publisher["xml:lang"]).to eq("en")
+
+ publication_year = doc.xpath("/*[local-name()='resource']/*[local-name()='publicationYear']").first
+ expect(publication_year).not_to be_nil
+ expect(publication_year.text).to eq("2024")
+ end
+ end
+
+ describe "subjects" do
+ # Check the subjects
+ it 'has the correct subjects and subject schemes' do
+ subjects = doc.xpath("//*[local-name()='subject']")
+ expect(subjects.size).to eq(3)
+
+ expected_subjects = [
+ { value: "FOS: Computer and information sciences", subjectScheme: "Fields of Science and Technology (FOS)", schemeURI: "http://www.oecd.org/science/inno", valueURI: "http://www.oecd.org/science/inno/38235147.pdf" },
+ { value: "Digital curation and preservation", subjectScheme: "Australian and New Zealand Standard Research Classification (ANZSRC), 2020", classificationCode: "461001", schemeURI: "https://www.abs.gov.au/statistics/classifications/australian-and-new-zealand-standard-research-classification-anzsrc" },
+ { value: "Example Subject" }
+ ]
+
+ expected_subjects.each_with_index do |expected, index|
+ subject_node = subjects[index]
+
+ expect(subject_node.text).to eq(expected[:value]), "Subject value mismatch at index #{index}"
+
+ if expected[:subjectScheme]
+ expect(subject_node["subjectScheme"]).to eq(expected[:subjectScheme]), "Subject scheme mismatch at index #{index}"
+ end
+
+ if expected[:schemeURI]
+ expect(subject_node["schemeURI"]).to eq(expected[:schemeURI]), "Subject schemeURI mismatch at index #{index}"
+ end
+
+ if expected[:valueURI]
+ expect(subject_node["valueURI"]).to eq(expected[:valueURI]), "Subject valueURI mismatch at index #{index}"
+ end
+ end
+ end
+ end
+
+ describe "alternateIdentifier" do
+ # Alternate Identifiers validation
+ it 'has the alternateIdentifiers with correct attributes and values' do
+ alt_identifiers = doc.xpath("//*[local-name()='alternateIdentifier']")
+ expect(alt_identifiers.size).to eq(1)
+ expect(alt_identifiers.first["alternateIdentifierType"]).to eq("Local accession number")
+ expect(alt_identifiers.first.text).to eq("12345")
+ end
+ end
+
+ describe "rightsList" do
+ # Check rights list for correct attributes and values
+ it 'has rights with correct attributes and values' do
+ # Ignore namespaces and find the element
+ rights_list = doc.xpath("//*[local-name()='rightsList']/*[local-name()='rights']")
+
+ # Ensure there is exactly one element within
+ expect(rights_list.size).to eq(1), "Expected 1 rights element, found #{rights_list.size}"
+
+ # Access the first (and only) element within
+ rights_node = rights_list.first
+
+ # Verify text content inside
+ expect(rights_node.text.strip).to eq("Creative Commons Attribution 4.0 International")
+
+ # Verify each attribute of
+ expect(rights_node["rightsIdentifier"]).to eq("CC-BY-4.0"), "Mismatch in rightsIdentifier"
+ expect(rights_node["rightsURI"]).to eq("https://creativecommons.org/licenses/by/4.0/"), "Mismatch in rightsURI"
+ expect(rights_node["rightsIdentifierScheme"]).to eq("SPDX"), "Mismatch in rightsIdentifierScheme"
+ expect(rights_node["schemeURI"]).to eq("https://spdx.org/licenses/"), "Mismatch in schemeURI"
+ expect(rights_node["xml:lang"]).to eq("en"), "Mismatch in xml:lang"
+ end
+ end
+
+ describe "fundingReferences" do
+ # Funding References validation
+ it 'has fundingReferences with correct attributes and values' do
+ # Using local-name() to ignore namespaces
+ funding_references = doc.xpath("/*[local-name()='resource']/*[local-name()='fundingReferences']/*[local-name()='fundingReference']")
+
+ # Check that there is exactly one fundingReference element
+ expect(funding_references.size).to eq(1), "Expected 1 fundingReference, got #{funding_references.size}"
+
+ funding_ref = funding_references.first
+
+ # Use local-name() to find child elements within the
+ funder_name = funding_ref.at_xpath("*[local-name()='funderName']")
+ funder_identifier = funding_ref.at_xpath("*[local-name()='funderIdentifier']")
+ award_number = funding_ref.at_xpath("*[local-name()='awardNumber']")
+ award_title = funding_ref.at_xpath("*[local-name()='awardTitle']")
+
+ # Ensure the elements exist and their texts match the expected values
+ expect(funder_name).not_to be_nil, "Funder name not found"
+ expect(funder_name.text.strip).to eq("Example Funder")
+
+ expect(funder_identifier).not_to be_nil, "Funder identifier not found"
+ expect(funder_identifier.text.strip).to eq("https://doi.org/10.13039/501100000780")
+
+ expect(award_number).not_to be_nil, "Award number not found"
+ expect(award_number.text.strip).to eq("12345")
+
+ expect(award_title).not_to be_nil, "Award title not found"
+ expect(award_title.text.strip).to eq("Example AwardTitle")
+ end
+ end
+
+ describe "relatedItems" do
+ # RelatedItem validation
+ it 'has relatedItems with correct attributes and values' do
+ # Using local-name() to ignore namespaces and find the elements
+ related_items = doc.xpath("//*[local-name()='relatedItem']")
+
+ # Ensure exactly one relatedItem is found
+ expect(related_items.size).to eq(1), "Expected 1 relatedItem, but found #{related_items.size}"
+
+ # Get the first (and only) relatedItem element
+ related_item = related_items.first
+
+ # Check the attributes of
+ expect(related_item["relatedItemType"]).to eq("Text"), "Expected relatedItemType to be 'Text'"
+ expect(related_item["relationType"]).to eq("Cites"), "Expected relationType to be 'Cites'"
+
+ # Find relatedItemIdentifier within relatedItem and check attributes
+ related_identifier = related_item.at_xpath("*[local-name()='relatedItemIdentifier']")
+ expect(related_identifier).not_to be_nil, "relatedItemIdentifier is missing"
+ expect(related_identifier["relatedItemIdentifierType"]).to eq("ISSN"), "Expected relatedItemIdentifierType to be 'ISSN'"
+ expect(related_identifier.text.strip).to eq("1234-5678"), "Expected relatedItemIdentifier to be '1234-5678'"
+
+ # Find the first inside and check its text
+ title = related_item.at_xpath("*[local-name()='titles']/*[local-name()='title']")
+ expect(title).not_to be_nil, "Title inside related item is missing"
+ expect(title.text.strip).to eq("Example RelatedItem Title"), "Title text mismatch"
+
+ # Find the translated title and check its text
+ translated_title = related_item.at_xpath("*[local-name()='titles']/*[local-name()='title'][@titleType='TranslatedTitle']")
+ expect(translated_title).not_to be_nil, "Translated title is missing"
+ expect(translated_title.text.strip).to eq("Example RelatedItem TranslatedTitle"), "Translated title mismatch"
+ end
+ end
+
+ describe "contributors" do
+ # Check each contributor for correct attributes and values
+ it 'has contributors with specified attributes and values' do
+ # Use local-name() to avoid namespaces
+ contributors = doc.xpath("//*[local-name()='contributor']")
+
+ # Ensure exact number of contributors as expected
+ expect(contributors.size).to eq(23), "Expected 23 contributors, but found #{contributors.size}"
+
+ # List of expected contributors with their attributes and values
+ expected_contributors = [
+ { contributorType: "ContactPerson", name: "ExampleFamilyName, ExampleGivenName", orcid: "https://orcid.org/0000-0001-5727-2427", affiliation: "ExampleAffiliation" },
+ { contributorType: "DataCollector", name: "ExampleFamilyName, ExampleGivenName", orcid: "https://orcid.org/0000-0001-5727-2427", affiliation: "ExampleAffiliation" },
+ { contributorType: "DataCurator", name: "ExampleFamilyName, ExampleGivenName", orcid: "https://orcid.org/0000-0001-5727-2427", affiliation: "ExampleAffiliation" },
+ { contributorType: "DataManager", name: "ExampleFamilyName, ExampleGivenName", orcid: "https://orcid.org/0000-0001-5727-2427", affiliation: "ExampleAffiliation" },
+ { contributorType: "Distributor", name: "ExampleOrganization", ror: "https://ror.org/03yrm5c26" },
+ { contributorType: "Editor", name: "ExampleFamilyName, ExampleGivenName", orcid: "https://orcid.org/0000-0001-5727-2427", affiliation: "ExampleAffiliation" },
+ { contributorType: "HostingInstitution", name: "ExampleOrganization", ror: "https://ror.org/03yrm5c26" },
+ { contributorType: "Producer", name: "ExampleFamilyName, ExampleGivenName", orcid: "https://orcid.org/0000-0001-5727-2427", affiliation: "ExampleAffiliation" },
+ { contributorType: "ProjectLeader", name: "ExampleFamilyName, ExampleGivenName", orcid: "https://orcid.org/0000-0001-5727-2427", affiliation: "ExampleAffiliation" },
+ { contributorType: "ProjectManager", name: "ExampleFamilyName, ExampleGivenName", orcid: "https://orcid.org/0000-0001-5727-2427", affiliation: "ExampleAffiliation" },
+ { contributorType: "ProjectMember", name: "ExampleFamilyName, ExampleGivenName", orcid: "https://orcid.org/0000-0001-5727-2427", affiliation: "ExampleAffiliation" },
+ { contributorType: "RegistrationAgency", name: "DataCite", ror: "https://ror.org/04wxnsj81" },
+ { contributorType: "RegistrationAuthority", name: "International DOI Foundation" },
+ { contributorType: "RelatedPerson", name: "ExampleFamilyName, ExampleGivenName", orcid: "https://orcid.org/0000-0001-5727-2427", affiliation: "ExampleAffiliation" },
+ { contributorType: "Researcher", name: "ExampleFamilyName, ExampleGivenName", orcid: "https://orcid.org/0000-0001-5727-2427", affiliation: "ExampleAffiliation" },
+ { contributorType: "ResearchGroup", name: "ExampleContributor", affiliation: "ExampleOrganization" }, # Notice, no ROR expected here
+ { contributorType: "RightsHolder", name: "ExampleFamilyName, ExampleGivenName", orcid: "https://orcid.org/0000-0001-5727-2427", affiliation: "ExampleAffiliation" },
+ { contributorType: "Sponsor", name: "ExampleContributor", affiliation: "https://ror.org/03yrm5c26" },
+ { contributorType: "Supervisor", name: "ExampleFamilyName, ExampleGivenName", orcid: "https://orcid.org/0000-0001-5727-2427", affiliation: "ExampleAffiliation" },
+ { contributorType: "Translator", name: "ExampleFamilyName, ExampleGivenName", orcid: "https://orcid.org/0000-0001-5727-2427", affiliation: "ExampleAffiliation" },
+ { contributorType: "WorkPackageLeader", name: "ExampleOrganization", ror: "https://ror.org/03yrm5c26" },
+ { contributorType: "Other", name: "ExampleFamilyName, ExampleGivenName", orcid: "https://orcid.org/0000-0001-5727-2427", affiliation: "ExampleAffiliation" }
+ ]
+
+ # Loop through the contributors and check their attributes
+ expected_contributors.each_with_index do |expected, index|
+ contributor_node = contributors[index]
+
+ # Validate contributorType attribute
+ expect(contributor_node["contributorType"]).to eq(expected[:contributorType]), "Contributor Type mismatch at index #{index}"
+
+ # Check for contributorName
+ name_node = contributor_node.at_xpath("*[local-name()='contributorName']")
+ expect(name_node).not_to be_nil, "Contributor Name missing at index #{index}"
+ expect(name_node.text.strip).to eq(expected[:name]), "Contributor Name mismatch at index #{index}"
+
+ # If ORCID is expected, check the ORCID
+ if expected[:orcid]
+ orcid_node = contributor_node.at_xpath("*[local-name()='nameIdentifier'][@nameIdentifierScheme='ORCID']")
+ expect(orcid_node).not_to be_nil, "ORCID missing at index #{index}"
+ expect(orcid_node.text.strip).to eq(expected[:orcid]), "ORCID mismatch at index #{index}"
+ end
+
+ # If ROR is expected, check for ROR
+ if expected[:ror]
+ ror_node = contributor_node.at_xpath("*[local-name()='nameIdentifier'][@nameIdentifierScheme='ROR']")
+ expect(ror_node).not_to be_nil, "ROR missing at index #{index}"
+ expect(ror_node.text.strip).to eq(expected[:ror]), "ROR mismatch at index #{index}"
+ end
+
+ # If an affiliation is expected, check it
+ if expected[:affiliation]
+ affiliation_node = contributor_node.at_xpath("*[local-name()='affiliation']")
+ expect(affiliation_node).not_to be_nil, "Affiliation missing at index #{index}"
+ expect(affiliation_node.text.strip).to eq(expected[:affiliation]), "Affiliation mismatch at index #{index}"
+ end
+ end
+ end
+ end
+
+ describe "dates" do
+ # Check all dates and their attributes
+ it 'has dates with correct attributes and values' do
+ # Using local-name() to ignore namespaces
+ dates = doc.xpath("//*[local-name()='date']")
+
+ # Ensure the number of date elements matches the real count
+ expect(dates.size).to eq(12), "Expected 12 date elements, but found #{dates.size}"
+
+ expected_dates = [
+ { dateType: "Accepted", value: "2024-01-01" },
+ { dateType: "Available", value: "2024-01-01" },
+ { dateType: "Copyrighted", value: "2024-01-01" },
+ { dateType: "Collected", value: "2024-01-01/2024-12-31" },
+ { dateType: "Coverage", value: "2024-01-01/2024-12-31" },
+ { dateType: "Created", value: "2024-01-01" },
+ { dateType: "Issued", value: "2024-01-01" },
+ { dateType: "Submitted", value: "2024-01-01" },
+ { dateType: "Updated", value: "2024-01-01" },
+ { dateType: "Valid", value: "2024-01-01" },
+ { dateType: "Withdrawn", value: "2024-01-01" },
+ { dateType: "Other", dateInformation: "ExampleDateInformation", value: "2024-01-01" }
+ ]
+
+ expected_dates.each_with_index do |expected, index|
+ # Find the element by dateType attribute
+ date_node = dates.find { |d| d["dateType"] == expected[:dateType] }
+
+ # Ensure the node was found
+ expect(date_node).not_to be_nil, "Could not find date with dateType '#{expected[:dateType]}'"
+
+ # Check the date value
+ expect(date_node.text.strip).to eq(expected[:value]), "Date value mismatch for dateType '#{expected[:dateType]}'"
+
+ # Check the dateInformation attribute if it exists
+ if expected[:dateInformation]
+ expect(date_node["dateInformation"]).to eq(expected[:dateInformation])
+ end
+ end
+ end
+ end
+
+ describe "relatedIdentifierType" do
+ # Check related IDs for correct identifier and relation type
+ it 'has related identifiers with correct attributes and values' do
+ related_identifiers = doc.xpath("//*[local-name()='relatedIdentifier']")
+
+ expected_related_ids = [
+ { relatedIdentifierType: "ARK", relationType: "IsCitedBy", value: "ark:/13030/tqb3kh97gh8w" },
+ { relatedIdentifierType: "arXiv", relationType: "Cites", value: "arXiv:0706.0001" },
+ { relatedIdentifierType: "bibcode", relationType: "IsSupplementTo", value: "2018AGUFM.A24K..07S" },
+ { relatedIdentifierType: "CSTR", relationType: "IsSupplementedBy", value: "31253.11.sciencedb.13238" },
+ { relatedIdentifierType: "DOI", relationType: "IsContinuedBy", value: "10.1016/j.epsl.2011.11.037" },
+ { relatedIdentifierType: "EAN13", relationType: "Continues", value: "9783468111242" },
+ { relatedIdentifierType: "EISSN", relationType: "Describes", value: "1562-6865" },
+ { relatedIdentifierType: "Handle", relationType: "IsDescribedBy", value: "10013/epic.10033" },
+ { relatedIdentifierType: "IGSN", relationType: "HasMetadata", value: "IECUR0097" },
+ { relatedIdentifierType: "ISBN", relationType: "IsMetadataFor", value: "978-3-905673-82-1" },
+ { relatedIdentifierType: "ISSN", relationType: "HasVersion", value: "0077-5606" },
+ { relatedIdentifierType: "ISTC", relationType: "IsVersionOf", value: "0A9 2002 12B4A105 7" },
+ { relatedIdentifierType: "LISSN", relationType: "IsNewVersionOf", value: "1188-1534" },
+ { relatedIdentifierType: "LSID", relationType: "IsPreviousVersionOf", value: "urn:lsid:ubio.org:namebank:11815" },
+ { relatedIdentifierType: "PMID", relationType: "IsPartOf", value: "12082125" },
+ { relatedIdentifierType: "PURL", relationType: "HasPart", value: "http://purl.oclc.org/foo/bar" },
+ { relatedIdentifierType: "RRID", relationType: "IsPublishedIn", value: "RRID:SCR_014641" },
+ { relatedIdentifierType: "UPC", relationType: "IsReferencedBy", value: "123456789999" },
+ { relatedIdentifierType: "URL", relationType: "References", value: "http://www.heatflow.und.edu/index2.html" },
+ { relatedIdentifierType: "URN", relationType: "IsDocumentedBy", value: "urn:nbn:de:101:1-201102033592" },
+ { relatedIdentifierType: "w3id", relationType: "Documents", value: "https://w3id.org/games/spec/coil#Coil_Bomb_Die_Of_Age" },
+ { relatedIdentifierType: "DOI", relationType: "IsCompiledBy", value: "10.1016/j.epsl.2011.11.037" },
+ { relatedIdentifierType: "DOI", relationType: "Compiles", value: "10.1016/j.epsl.2011.11.037" },
+ { relatedIdentifierType: "DOI", relationType: "IsVariantFormOf", value: "10.1016/j.epsl.2011.11.037" },
+ { relatedIdentifierType: "DOI", relationType: "IsOriginalFormOf", value: "10.1016/j.epsl.2011.11.037" },
+ { relatedIdentifierType: "DOI", relationType: "IsIdenticalTo", value: "10.1016/j.epsl.2011.11.037" },
+ { relatedIdentifierType: "DOI", relationType: "IsReviewedBy", value: "10.1016/j.epsl.2011.11.037" },
+ { relatedIdentifierType: "DOI", relationType: "Reviews", value: "10.1016/j.epsl.2011.11.037" },
+ { relatedIdentifierType: "DOI", relationType: "IsDerivedFrom", value: "10.1016/j.epsl.2011.11.037" },
+ { relatedIdentifierType: "DOI", relationType: "IsSourceOf", value: "10.1016/j.epsl.2011.11.037" },
+ { relatedIdentifierType: "DOI", relationType: "IsRequiredBy", value: "10.1016/j.epsl.2011.11.037" },
+ { relatedIdentifierType: "DOI", relationType: "Requires", value: "10.1016/j.epsl.2011.11.037" },
+ { relatedIdentifierType: "DOI", relationType: "Obsoletes", value: "10.1016/j.epsl.2011.11.037" },
+ { relatedIdentifierType: "DOI", relationType: "IsObsoletedBy", value: "10.1016/j.epsl.2011.11.037" },
+ { relatedIdentifierType: "DOI", relationType: "Collects", value: "10.1016/j.epsl.2011.11.037" },
+ { relatedIdentifierType: "DOI", relationType: "IsCollectedBy", value: "10.1016/j.epsl.2011.11.037" },
+ { relatedIdentifierType: "DOI", relationType: "HasTranslation", value: "10.1016/j.epsl.2011.11.037" },
+ { relatedIdentifierType: "DOI", relationType: "IsTranslationOf", value: "10.1016/j.epsl.2011.11.037" }
+ ]
+
+ expect(related_identifiers.size).to eq(expected_related_ids.size)
+
+ expected_related_ids.each_with_index do |expected, index|
+ related_id_node = related_identifiers[index]
+
+ expect(related_id_node["relatedIdentifierType"]).to eq(expected[:relatedIdentifierType]), "relatedIdentifierType mismatch at index #{index}"
+ expect(related_id_node["relationType"]).to eq(expected[:relationType]), "relationType mismatch at index #{index}"
+ expect(related_id_node.text).to eq(expected[:value]), "Identifier value mismatch at index #{index}"
+ end
+ end
+ end
+
+ describe "geoLocation" do
+ # Check geoLocation and its associated attributes
+ it 'has geoLocation with correct attributes and values' do
+ # Use local-name() to ignore namespaces and find the elements
+ geo_location = doc.xpath("//*[local-name()='geoLocation']").first
+
+ # Ensure we found the element
+ expect(geo_location).not_to be_nil
+
+ # Find and validate
+ geo_location_place = geo_location.at_xpath("*[local-name()='geoLocationPlace']")
+ expect(geo_location_place.text.strip).to eq("Vancouver, British Columbia, Canada"), "geoLocationPlace mismatch"
+
+ # Find and validate
+ geo_location_box = geo_location.at_xpath("*[local-name()='geoLocationBox']")
+ expect(geo_location_box).not_to be_nil, "geoLocationBox is missing"
+
+ # Expect correct coordinates within
+ expect(geo_location_box.at_xpath("*[local-name()='westBoundLongitude']").text.strip).to eq("-123.27")
+ expect(geo_location_box.at_xpath("*[local-name()='eastBoundLongitude']").text.strip).to eq("-123.02")
+ expect(geo_location_box.at_xpath("*[local-name()='southBoundLatitude']").text.strip).to eq("49.195")
+ expect(geo_location_box.at_xpath("*[local-name()='northBoundLatitude']").text.strip).to eq("49.315")
+ end
+ end
+
+ describe "formats" do
+ # Check for sizes and formats
+ it 'has the correct sizes and formats' do
+ # Use local-name() to ignore namespaces and find the elements
+ sizes = doc.xpath("//*[local-name()='size']")
+ expected_sizes = ["1 MB", "90 pages"]
+
+ # Ensure we found the correct number of elements
+ expect(sizes.size).to eq(expected_sizes.size), "Mismatch in number of sizes"
+
+ sizes.each_with_index do |size_node, index|
+ expect(size_node.text.strip).to eq(expected_sizes[index]), "Size mismatch at index #{index}"
+ end
+
+ # Use local-name() to ignore namespaces and find the elements
+ formats = doc.xpath("//*[local-name()='format']")
+ expected_formats = ["application/xml", "text/plain"]
+
+ # Ensure we found the correct number of elements
+ expect(formats.size).to eq(expected_formats.size), "Mismatch in number of formats"
+
+ formats.each_with_index do |format_node, index|
+ expect(format_node.text.strip).to eq(expected_formats[index]), "Format mismatch at index #{index}"
+ end
+ end
+ end
+
+ # Check descriptions (Abstract, Methods, etc.)
+ it 'has descriptions with correct values' do
+ descriptions = doc.xpath("//*[local-name()='description']")
+
+ # Expected descriptions
+ expected_descriptions = [
+ { descriptionType: "Abstract", value: "Example Abstract" },
+ { descriptionType: "Methods", value: "Example Methods" },
+ { descriptionType: "TechnicalInfo", value: "Example TechnicalInfo" },
+ { descriptionType: "SeriesInformation", value: "Example SeriesInformation" },
+ { descriptionType: "TableOfContents", value: "Example TableOfContents" },
+ { descriptionType: "Other", value: "Example Other" }
+ ]
+
+ # Ensure the document has at least 1 description
+ expect(descriptions.size).not_to eq(0), "No description elements found in the XML"
+
+ # Check that each expected description is present in the XML
+ expected_descriptions.each do |expected|
+ description_node = descriptions.find { |d| d["descriptionType"] == expected[:descriptionType] }
+ expect(description_node).not_to be_nil, "Could not find description of type '#{expected[:descriptionType]}'"
+ expect(description_node.text.strip).to eq(expected[:value]), "Description text mismatch for type '#{expected[:descriptionType]}'"
+ end
+ end
+end
\ No newline at end of file
diff --git a/spec/kernel-4.6/example_workflow_spec.rb b/spec/kernel-4.6/example_workflow_spec.rb
new file mode 100644
index 00000000..418ea772
--- /dev/null
+++ b/spec/kernel-4.6/example_workflow_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-workflow-v4.xml")) { |c| c.strict }}}
+
+ it 'validates' do
+ expect(doc).to pass_validation(xsd)
+ end
+
+ it 'has resourceTypeGeneral Workflow' do
+ resource_type = doc.at("resourceType")
+ expect(resource_type["resourceTypeGeneral"]).to eq("Workflow")
+ expect(resource_type.text).to eq("Software")
+ end
+end
diff --git a/spec/kernel-4.6/funding_reference_spec.rb b/spec/kernel-4.6/funding_reference_spec.rb
new file mode 100644
index 00000000..650ea782
--- /dev/null
+++ b/spec/kernel-4.6/funding_reference_spec.rb
@@ -0,0 +1,111 @@
+require 'spec_helper'
+
+describe "validate funderReference" 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 'empty fundingReferences tag' do
+ element = doc.at("fundingReferences")
+ element.replace ""
+ 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.6/geolocation_spec.rb b/spec/kernel-4.6/geolocation_spec.rb
new file mode 100644
index 00000000..5d67d2e3
--- /dev/null
+++ b/spec/kernel-4.6/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.6/other_spec.rb b/spec/kernel-4.6/other_spec.rb
new file mode 100644
index 00000000..6974fcf4
--- /dev/null
+++ b/spec/kernel-4.6/other_spec.rb
@@ -0,0 +1,243 @@
+require 'spec_helper'
+
+describe "validate other elements" do
+ let(:root) { File.join(File.dirname(__FILE__), '../../source/meta/kernel-4.6') }
+ 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("26:0: ERROR: 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', 'Preprint', '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', 'Preprint', '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 Award' 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 Project' 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
+ 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
+ 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
+ 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.6/pure_example_spec.rb b/spec/kernel-4.6/pure_example_spec.rb
new file mode 100644
index 00000000..7b34094f
--- /dev/null
+++ b/spec/kernel-4.6/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.6/schema_spec.rb b/spec/kernel-4.6/schema_spec.rb
new file mode 100644
index 00000000..c3e1c56d
--- /dev/null
+++ b/spec/kernel-4.6/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.6/user_example_spec.rb b/spec/kernel-4.6/user_example_spec.rb
new file mode 100644
index 00000000..0a6fc115
--- /dev/null
+++ b/spec/kernel-4.6/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/other_spec.rb b/spec/kernel-4/other_spec.rb
index bb153bd4..8868a845 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("Element '{http://datacite.org/schema/kernel-4}resourceType', attribute 'resourceTypeGeneral': [facet 'enumeration'] The value '' is not an element of the set {'Audiovisual', 'Book', 'BookChapter', 'Collection', 'ComputationalNotebook', 'ConferencePaper', 'ConferenceProceeding', 'DataPaper', 'Dataset', 'Dissertation', 'Event', 'Image', 'Instrument', 'InteractiveResource', 'Journal', 'JournalArticle', 'Model', 'OutputManagementPlan', 'PeerReview', 'PhysicalObject', 'Preprint', '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', 'Preprint', '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("The value 'Conference' is not an element of the set {'Audiovisual', 'Book', 'BookChapter', 'Collection', 'ComputationalNotebook', 'ConferencePaper', 'ConferenceProceeding', 'DataPaper', 'Dataset', 'Dissertation', 'Event', 'Image', 'Instrument', 'InteractiveResource', 'Journal', 'JournalArticle', 'Model', 'OutputManagementPlan', 'PeerReview', 'PhysicalObject', 'Preprint', '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', 'Preprint', 'Project', 'Report', 'Service', 'Software', 'Sound', 'Standard', 'StudyRegistration', 'Text', 'Workflow', 'Other'}.")
end
it 'resourceTypeGeneral Book' do
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index fbf729de..120a76ee 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -3,6 +3,7 @@
require 'rspec'
require 'rspec/xsd'
require 'nokogiri'
+require 'pry'
RSpec.configure do |config|
config.order = :random