iljackb / Mixtepec_Mixtec

Mostly XML (TEI) markup of Mixtepec-Mixtec Language resources
3 stars 1 forks source link

role= attribute with comma? #111

Open sydb opened 3 years ago

sydb commented 3 years ago

In MIX-People.xml there are 2 @role values of "speaker, collaborator"; in MIX-Lexicon-TEI-Dict.xml there are 2 @role values of "speaker collaborator" (and 1 of "editor researcher").

The Lexicon file is correct. Because COMMA (U+002C, ‘,’) is (unwisely IMHO) a legal character in teidata.word, and thus in teidata.enumerated, this is not a validity error. But since the values of @role are space-separated, in MIX-People.xml the two roles are “collaborator” and “speaker,”.

The following (untested) ODD snippet would allow this (and all sorts of other @role errors) to be caught in the initial validation phase.

    <elementSpec ident="person" module="namesdates" mode="change">
      <attList>
        <attDef ident="role" mode="change">
          <valList type="closed">
        <valItem ident="speaker"/>
        <valItem ident="collaborator"/>
        <valItem ident="editor"/>
        <valItem ident="researcher"/> 
        <valItem ident="expert"/>
          </valList>
        </attDef>
      </attList>
    </elementSpec>
iljackb commented 3 years ago

Hey Sid, Thanks for the feedback! I haven't had time to work on this lately, but I'll adjust the documents and add this to the ODD also. The ODD has quite a bit of work to be done on it actually.