Adjust UNIMARC Schema to Avram 0.9.6 #408
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replace several
codes
withflags
when codes can be repeated and replace ranges such as0-9
with patterns or explicit lists of codes. This makes the schema valid Avram 0.9.6 as tested with avram-js 0.6.6.@gegic This requires to also extend
UnimarcSchemaReader
methodgetPositions
to support:pattern
to specify a position (121$b/02-03
and135$a/05-07
)flags
alternative tocodes
when a code must be repeated to fill a position (extendgetPositions
)groups
to document pattern groups (this can be ignored as it is only for documentation, not for validation)and
codes
with string value referencing a codelist defined via root elementcodelists
)By the way in qa-catalogue MARC validaton
flags
are internally stored likecodes
with an additional boolean flagrepeatableContents
.