gbv / format.gbv.de

Formatdatenbank
https://format.gbv.de/
GNU General Public License v3.0
7 stars 4 forks source link

Avram: support keys deprecated-fields and deprecated-subfields #25

Closed cKlee closed 6 years ago

cKlee commented 6 years ago

Deprecated (sub)fields should be made explicit. Then a deprecated-warning can be created. If the description-key would be applicable in a (sub)field-definitions and code-definition then this warning could be more verbose.

fields:
  [...]
    deprecated-subfields:
      a:
        code: a
        label: xxx
        description: wird mit Umstieg auf RDA nicht mehr verwendet
    subfields:
      b:
        deprecated-codes:
            sm:
              label: sekundäre Mikroform
              description: wird mit dem Umstieg auf RDA nicht mehr verwendet
deprecated-fields:
  011B:
    tag: 011B
    pica3: 1109
    label: Erscheinungsjahr der Sekundärausgabe
    description: wird mit Umstieg auf RDA nicht mehr verwendet

The keyword description should also be applicable in all definitions.

nichtich commented 6 years ago

The description in your example is always the same and it does not describes the data element but the context of its deprecation. I'll add deprecated-fields and deprecated-subfields. Note there can only be one deprecated form of if a field/subfield/code.

cKlee commented 6 years ago

I have second thoughts if this was a good idea. Problem is, for every (sub)field you have to check twice: is field in schema->fields or in schema->deprecated-fields, is subfield in schema->fields->subfields or schema->fields->deprecated-subfields.

I suggest to support a keyword deprecated with a boolean value.