<elementSpec ident="keySig" module="MEI.shared">
<gloss versionDate="2022-05-18" xml:lang="en">key signature</gloss>
<desc xml:lang="en">Written key signature.</desc>
<classes>
<memberOf key="att.common"/>
<memberOf key="att.facsimile"/>
<memberOf key="att.keySig.anl"/>
<memberOf key="att.keySig.ges"/>
<memberOf key="att.keySig.log"/>
<memberOf key="att.keySig.vis"/>
<memberOf key="model.keySigLike"/>
</classes>
<content>
<rng:zeroOrMore>
<rng:choice>
<rng:ref name="model.keyAccidLike"/>
<rng:ref name="model.transcriptionLike"/>
</rng:choice>
</rng:zeroOrMore>
</content>
<constraintSpec ident="check_keyAccid_oct" scheme="schematron">
<constraint>
<sch:rule context="mei:keySig[mei:keyAccid[@oct]]">
<sch:assert test="count(mei:keyAccid[@oct]) = count(mei:keyAccid)">If the @oct attribute
appears on any keyAccid element, it must be provided on all keyAccid
elements.</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
<constraintSpec ident="check_keySig_editorial" scheme="schematron">
<constraint>
<sch:rule context="mei:keySig/mei:*[local-name() eq 'add' or local-name() eq 'corr' or local-name()
eq 'damage' or local-name() eq 'del' or local-name() eq 'orig' or local-name()
eq 'reg' or local-name() eq 'restore' or local-name() eq 'sic' or local-name()
eq 'supplied' or local-name() eq 'unclear']">
<sch:assert test="count(mei:keyAccid) = count(mei:*)">Only keyAccid elements are allowed
here.</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
</elementSpec>