This element can be used as an alternative to the staff element's clef.* attributes. It should be used when specific display info, such as size or color, needs to be recorded for the clef or when multiple, simultaneous clefs occur on a single staff. This element may also be used within the staff context to indicate changes of clef.
<elementSpec ident="clef" module="MEI.shared">
<desc>Indication of the exact location of a particular note on the staff and, therefore,
the
other notes as well.</desc>
<classes>
<memberOf key="att.common"/>
<memberOf key="att.event"/>
<memberOf key="att.facsimile"/>
<memberOf key="att.clef.anl"/>
<memberOf key="att.clef.ges"/>
<memberOf key="att.clef.log"/>
<memberOf key="att.clef.vis"/>
<memberOf key="model.eventLike"/>
<memberOf key="model.staffDefPart"/>
</classes>
<content>
<rng:empty/>
</content>
<constraintSpec ident="Clef_position_lines" scheme="isoschematron">
<constraint>
<sch:rule context="mei:clef[matches(@shape, '[FCG]')][ancestor::mei:staffDef[@lines]]">
<sch:let name="thisstaff" value="ancestor::mei:staffDef/@n"/>
<sch:assert test="number(@line) <= number(ancestor::mei:staffDef[@n=$thisstaff and @lines][1]/@lines)">The clef position must be less than or equal to the number of lines of an ancestor
staff.</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
<constraintSpec ident="Clef_position_nolines" scheme="isoschematron">
<constraint>
<sch:rule context="mei:clef[ancestor::mei:staffDef[not(@lines)]]">
<sch:let name="thisstaff" value="ancestor::mei:staffDef/@n"/>
<sch:assert test="number(@line) <= number(preceding::mei:staffDef[@n=$thisstaff and @lines][1]/@lines)">The clef position must be less than or equal to the number of lines of a preceding
staff.</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
<remarks>
<p>This element can be used as an alternative to the <gi scheme="MEI">staff</gi> element's
clef.* attributes. It should be used when specific display info, such as size or color,
needs to be recorded for the clef or when multiple, simultaneous clefs occur on a
single
staff. This element may also be used within the staff context to indicate changes
of
clef.</p>
</remarks>
</elementSpec>