mpaluch / datacite-metadata-generator

This is a single HTML form which can be used to generate DataCite Metadata Kernel 4.0 XML
MIT License
28 stars 14 forks source link

Switch order of givenName and familyName (creator/contributor) #3

Closed ioverka closed 7 years ago

ioverka commented 7 years ago

Thanks so much for the new version, Marcin! I just executed some tests and found that the elements in creator/contributor need to follow a specific order, i.e.:

<?xml version="1.0" encoding="UTF-8"?>
<resource xmlns="http://datacite.org/schema/kernel-4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4/metadata.xsd">
<identifier identifierType="DOI">10.17872/556</identifier>
<titles>
    <title>Test title</title>
</titles>
<creators>
    <creator>
        <creatorName>Tester, Testi</creatorName>
        <givenName>Testi</givenName>
        <familyName>Tester</familyName>
        <affiliation>Test Institute</affiliation>
    </creator>
</creators>
<publisher>Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V.</publisher>
<publicationYear>2017</publicationYear>
<resourceType resourceTypeGeneral="Text">Yearbook article</resourceType>
<contributors>
    <contributor contributorType="ProjectLeader">
        <contributorName>Tester, Testo</contributorName>
        <familyName>Tester</familyName>
        <givenName>Testo</givenName>
        <affiliation>Test Institute</affiliation>
    </contributor>
</contributors>
</resource>

returns following error: [xml] xml error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'givenName'. One of '{"http://datacite.org/schema/kernel-4":nameIdentifier, "http://datacite.org/schema/kernel-4":affiliation}' is expected.

mpaluch commented 7 years ago

Tag order has been fixed.