tei-for-special-collections / consolidated-schema

0 stars 2 forks source link

author, persName, placeName, orgName, country, settlement: schematron rule to ensure certain instances of author have @key #20

Open mjhawkins opened 1 year ago

mjhawkins commented 1 year ago

All these items have the similar triggers applied to them on sch:rule's context attribute and similar constraints on the value of their key attribute. The only difference is the name of the element in question in the rule (i.e. author, persName, etc). It's probably best to debate them all at once since I believe they all belong in MC.

There are two separate issues with the changes to this element:

  1. The intention that author elements in certain contexts - namely ancestor::msItem and ancestor::fileDesc//idno[@type='catalogue'] = 'Western' - must have key atribute
  2. key attribute, if required, must have the format person_\d+ (or place_id if the name-like element refers to a place)

The regex on the assertion (person\d+ or place\d+) is too lax. It would match:

^person_\d+$ would likely work better.

mjhawkins commented 1 year ago

Warning in GS for absence of key - but no constraints on contents.

Move current rules to MC and make warnings not errors.

mjhawkins commented 1 year ago

Right now, schematron only complains when the naming element occurs

Do we want to keep one or both of these constraints?

That is, do we want the general schema only to complain

or

or