Bolognese handling of relatedItems has a couple of problems:
1) Accessing subproperties of relatedItemIdentifier, even though it is optional, causing nilClass errors when relatedItemIdentifier is absent - #139
2) Including all optional properties even when they have no data (i.e as self-terminated keys <firstPage />) - #140
3) Knock on effect of causing schema validation to fail when optional property publicationYear is absent, as it gets included as a blank element, and thus fails the datetype requirement in the XSD - https://github.com/datacite/lupo/issues/782
This PR fixes the above, and adds a test
closes: #139
closes: #140
Approach
Open Questions and Pre-Merge TODOs
Learning
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Be humble in the language and feedback you give, ask don't tell.
Consider using positive language as opposed to neutral when offering feedback. This is to avoid the negative bias that can occur with neutral language appearing negative.
Offer suggestions on how to improve code e.g. simplification or expanding clarity.
Ensure you give reasons for the changes you are proposing.
Purpose
Bolognese handling of
relatedItems
has a couple of problems: 1) Accessing subproperties ofrelatedItemIdentifier
, even though it is optional, causingnilClass
errors whenrelatedItemIdentifier
is absent - #139 2) Including all optional properties even when they have no data (i.e as self-terminated keys<firstPage />
) - #140 3) Knock on effect of causing schema validation to fail when optional propertypublicationYear
is absent, as it gets included as a blank element, and thus fails thedatetype
requirement in the XSD - https://github.com/datacite/lupo/issues/782This PR fixes the above, and adds a test
closes: #139 closes: #140
Approach
Open Questions and Pre-Merge TODOs
Learning
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Reviewer, please remember our guidelines: