EAD3 serialisation yields multiple fromdate & todate elements inside single daterange
Created by: yytosi
EAD3 serialisation generates multiple fromdate & todate elements inside a single daterange element. It should repeat the daterange element for each from & to -pair.
POST http://localhost:6001/v0/studies
Content-Type: application/json
{
"study_number": "test_1",
"collection_periods": [
{"collection_period": "2017-01-20",
"language": "fi",
"event": "start"},
{"collection_period": "2018-01-20",
"language": "fi",
"event": "end"},
{"collection_period": "2016-01-02",
"language": "fi",
"event": "start"},
{"collection_period": "2017-01-02",
"language": "fi",
"event": "end"}]
}
GET http://localhost:6003/v0/oai?verb=GetRecord&metadataPrefix=ead3&identifier=test_1
[...]
<unitdatestructured datechar="collection">
<daterange lang="fi">
<fromdate lang="fi" standarddate="2017-01-20">2017-01-20</fromdate>
<todate lang="fi" standarddate="2018-01-20">2018-01-20</todate>
<fromdate lang="fi" standarddate="2016-01-02">2016-01-02</fromdate>
<todate lang="fi" standarddate="2017-01-02">2017-01-02</todate>
</daterange>
</unitdatestructured>