Log in

HCMC Journal

Using classSpec to create a valList shared between multiple elements

: Illya Nokhrin
Minutes: 60

DNI uses a valList to restrict the types of names allowed for forename and surname elements. I had previously talked to Martin about coming up with an elegant way to encode this in the ODD. He suggested using macroSpec, but macroSpec cannot take a valList. I have opted to use a classSpec instead, since classSpec can take a valList.

At the moment, the classSpec declaration looks like this:
<classSpec ident="att.nameTypes" type="atts" module="namesdates"> <attList> <attDef ident="type"> <desc>List of allowed types for forename and surname elements</desc> <valList type="closed"> <valItem ident="indigenous"> <gloss>Indigenous surname</gloss> </valItem> <valItem ident="colonial"> <gloss>Colonial surname in any non-Indigenous language (English, German, etc)</gloss> </valItem> </valList> </attDef> </attList> </classSpec>

And the relevant elementSpecs look like this:
<elementSpec ident="surname" mode="change"> <classes mode="change"> <memberOf key="att.typed" mode="delete"/> <memberOf key="att.nameTypes" mode="add"/> </classes> </elementSpec>