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

Specify value of regex capturing groups #34

Open
nichtich opened this issue Oct 26, 2023 · 0 comments
Open

Specify value of regex capturing groups #34

nichtich opened this issue Oct 26, 2023 · 0 comments
Labels
enhancement New feature or request question Further information is requested
Milestone

Comments

@nichtich
Copy link
Member

If a value is specified by a pattern with regex capturing groups, the value of groups could further be defined with a new key groups. Example is control subfield $8 with pattern:

([0-9]+)(.([0-9]+))?(\\(.))?

So groups could be:

{
  "1": { "label": "Linking number" },
  "3": { "label": "Sequence number" },
  "5": {
    "label": "Field link type",
    "codes": {
      "a": { "label": "Action" },
      ...
    }
  }
}
@nichtich nichtich added enhancement New feature or request question Further information is requested labels Oct 27, 2023
@nichtich nichtich added this to the 1.0.0 milestone Oct 27, 2023
@nichtich nichtich modified the milestones: 1.0.0, 1.1.0 Nov 30, 2023
nichtich added a commit that referenced this issue Jan 19, 2024
pkiraly pushed a commit to pkiraly/qa-catalogue that referenced this issue Jan 20, 2024
* Adjust UNIMARC Schema

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.

* Adjust UNIMARC Schema with ISO 639-2 codelist

The codelists contained invalid ISO 639-2 codes and was repeated. Better
use a referenced codelist.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant