The def attribute may be used to create a connection with a staffDef element where logical and visual information about the staff is recorded. Alternatively, the n attribute may be used as a reference to a staffDef element with the same value in its n attribute or the staff may contain a staffDef element that defines it. If neither def nor n attributes are present, then the encoding order of the staves is presumed to match the encoding order of the staff definitions.
<sch:rule context="mei:staff[@n]">
<sch:let name="thisstaff" value="@n"/>
<sch:assert test="preceding::mei:staffDef[@n=$thisstaff] or preceding::mei:staff[@n=$thisstaff]/mei:staffDef
or mei:staffDef">There must be a preceding staffDef with a matching value of @n, a preceding staff
with
a matching @n value containing a staffDef, or a staffDef child element.</sch:assert>
</sch:rule>
<elementSpec ident="staff" module="MEI.shared">
<desc>A group of equidistant horizontal lines on which notes are placed in order to represent
pitch or a grouping element for individual 'strands' of notes, rests, etc. that may
or may not
actually be rendered on staff lines; that is, both diastematic and non-diastematic
signs.</desc>
<classes>
<memberOf
key="att.basic"/>
<memberOf
key="att.facsimile"/>
<memberOf
key="att.labelled"/>
<memberOf
key="att.linking"/>
<memberOf
key="att.metadataPointing"/>
<memberOf
key="att.nInteger"/>
<memberOf
key="att.responsibility"/>
<memberOf
key="att.typed"/>
<memberOf
key="att.staff.log"/>
<memberOf
key="att.staff.vis"/>
<memberOf
key="att.staff.ges"/>
<memberOf
key="att.staff.anl"/>
<memberOf
key="model.staffLike"/>
</classes>
<content>
<rng:zeroOrMore>
<rng:choice>
<rng:ref
name="model.annotLike"
/>
<rng:ref
name="model.appLike"
/>
<rng:ref
name="model.editLike"
/>
<rng:ref
name="model.graphicPrimitiveLike"
/>
<rng:ref
name="model.milestoneLike.music"
/>
<rng:ref
name="model.relationLike"
/>
<rng:ref
name="model.staffDefLike"
/>
<rng:ref
name="model.staffPart"
/>
<rng:ref
name="model.transcriptionLike"
/>
</rng:choice>
</rng:zeroOrMore>
</content>
<constraintSpec ident="checkStaff_n" scheme="isoschematron">
<constraint>
<sch:rule context="mei:staff[@n]">
<sch:let name="thisstaff" value="@n"/>
<sch:assert test="preceding::mei:staffDef[@n=$thisstaff] or preceding::mei:staff[@n=$thisstaff]/mei:staffDef
or mei:staffDef">There must be a preceding staffDef with a matching value of @n, a preceding staff
with
a matching @n value containing a staffDef, or a staffDef child element.</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
<remarks>
<p part="N">The
<att scheme="TEI">def</att> attribute may be used to create a connection with a
<gi scheme="MEI">staffDef</gi> element where logical and visual information about the staff is recorded.
Alternatively, the
<att scheme="TEI">n</att> attribute may be used as a reference to a
<gi scheme="MEI">staffDef</gi> element with the same value in its
<att scheme="TEI">n</att> attribute or the staff may
contain a staffDef element that defines it. If neither
<att scheme="TEI">def</att> nor
<att scheme="TEI">n</att>
attributes are present, then the encoding order of the staves is presumed to match
the
encoding order of the staff definitions.</p>
</remarks>
</elementSpec>