Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust UNIMARC Schema to Avram 0.9.6 #408

Merged
merged 2 commits into from
Jan 20, 2024
Merged

Adjust UNIMARC Schema to Avram 0.9.6 #408

merged 2 commits into from
Jan 20, 2024

Conversation

nichtich
Copy link
Collaborator

@nichtich nichtich commented Jan 19, 2024

Replace several codes with flags when codes can be repeated and replace ranges such as 0-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 method getPositions to support:

  • pattern to specify a position (121$b/02-03 and 135$a/05-07)
  • flags alternative to codes when a code must be repeated to fill a position (extend getPositions)
  • groups to document pattern groups (this can be ignored as it is only for documentation, not for validation)

and

  • support referenced codelists (codes with string value referencing a codelist defined via root element codelists)

By the way in qa-catalogue MARC validaton flags are internally stored like codes with an additional boolean flag repeatableContents.

The following positions have been changed from `codes` to `flags` because they contain repeatable flags, filled with blanks:

- `100$a/17-19`
- `110$a/4-6`
- `120$a/3-6`, `120$a/9-16`
- `105$a/0-3`, `105$a/4-7`
- `115$a/11-14`
- `116$a/4-9`, `116$a/10-15`
- `117$a/2-7`
- `121$a/1-2`,
- `126$a/7-12`
- `140$a/0-3`, `140$a/4-7`, `140$a/9-16`
- `141$a/0-2`, `141$a/6-7`, `141$d/0-2`, `141$e/0-2`, `141$e/3-5`
- `145$b/5-6`, `145$c/5-6`, `145$d/5-6`
- `181$b/3-5`

In addition codes like "0-9", "1-9" must be made explicit as [0,]1,2,3,4,5,6,7,8,9:

- `145$b/7`, `145$c/7`, `145$d/7` and  `121$b/6`

In these cases the number of distinct codes is better be expressed with a pattern:

- `121$b/2-3`
- `135$a/5-9`

Additional documentation of the pattern requires <dini-ag-kim/avram#34> to be included in Avram specification.
The codelists contained invalid ISO 639-2 codes and was repeated. Better
use a referenced codelist.
@pkiraly pkiraly merged commit 62b099b into pkiraly:main Jan 20, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants