<staff>

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.
Module
Attributes
@label, @n, @type, @xml:id
@label(optional)Captures text to be used to generate a label for the element to which it’s attached, a "tool tip" or prefatory text, for example. Should not be used to record document content. Value conforms to XML Schema string datatype.
@n(optional)Provides a numeric designation that indicates an element’s position in a sequence of similar elements. Its value must be a non-negative integer. Value conforms to XML Schema nonNegativeInteger datatype.
@type(optional)Designation which characterizes the element in some sense, using any convenient classification scheme or typology that employs single-token labels. Value conforms to 1 or more space-separated values of XML Schema NMTOKEN datatype.
@xml:id(optional)Regularizes the naming of an element and thus facilitates building links between it and other resources. Each id attribute within a document must have a unique value. Value conforms to XML Schema ID datatype.
(MEI.shared) Attributes that form the basis of the att.common class.
(MEI.shared) Attributes that uniquely identify an element.
@xml:id(optional)Regularizes the naming of an element and thus facilitates building links between it and other resources. Each id attribute within a document must have a unique value. Value conforms to XML Schema ID datatype.
(MEI.shared)
@label(optional)Captures text to be used to generate a label for the element to which it’s attached, a "tool tip" or prefatory text, for example. Should not be used to record document content. Value conforms to XML Schema string datatype.
(MEI.shared) Attributes used to supply an integer number designation for an element.
@n(optional)Provides a numeric designation that indicates an element’s position in a sequence of similar elements. Its value must be a non-negative integer. Value conforms to XML Schema nonNegativeInteger datatype.
(MEI.shared) Attributes which can be used to classify features.
@type(optional)Designation which characterizes the element in some sense, using any convenient classification scheme or typology that employs single-token labels. Value conforms to 1 or more space-separated values of XML Schema NMTOKEN datatype.
(MEI.visual) Visual domain attributes.
@label(optional)Captures text to be used to generate a label for the element to which it’s attached, a "tool tip" or prefatory text, for example. Should not be used to record document content. Value conforms to XML Schema string datatype.
@n(optional)Provides a numeric designation that indicates an element’s position in a sequence of similar elements. Its value must be a non-negative integer. Value conforms to XML Schema nonNegativeInteger datatype.
@type(optional)Designation which characterizes the element in some sense, using any convenient classification scheme or typology that employs single-token labels. Value conforms to 1 or more space-separated values of XML Schema NMTOKEN datatype.
@xml:id(optional)Regularizes the naming of an element and thus facilitates building links between it and other resources. Each id attribute within a document must have a unique value. Value conforms to XML Schema ID datatype.
Member of
model.staffLikeGroups elements that function like staves.
Contained By
(MEI.shared) Groups elements that function like staves.
(MEI.cmn) Groups elements that may appear within a CMN measure.
May Contain
(MEI.shared) Groups annotation-like elements.
(MEI.shared) Groups milestone-style elements found in music notation.
<sb>An empty formatting element that forces musical notation to begin on a new line.
(MEI.shared) Groups page beginning-like elements.
<pb>An empty formatting element that forces text to begin on a new page.
(MEI.shared) Collects elements that express a relationship.
(MEI.shared) Groups elements that permit declaration of staff properties.
<staffDef>Container for staff meta-information.
(MEI.shared) Groups elements that are components of a staff.
(MEI.cmn) Groups elements that function like ossia.
(MEI.shared) Groups elements that function as notational layers within a staff.
<layer>An independent stream of events on a staff.
<layer>An independent stream of events on a staff.
<pb>An empty formatting element that forces text to begin on a new page.
<sb>An empty formatting element that forces musical notation to begin on a new line.
<staffDef>Container for staff meta-information.
Remarks

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.

Constraints

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.

Declaration
<elementSpec xmlns="http://www.tei-c.org/ns/1.0" rend="add" ident="staff" module="MEI.shared">
<desc xml:lang="en">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.labelled"/>
<memberOf key="att.nInteger"/>
<memberOf key="att.typed"/>
<memberOf key="att.staff.vis"/>
<memberOf key="model.staffLike"/>
</classes>
<content>
<alternate minOccurs="0" maxOccurs="unbounded">
<classRef key="model.annotLike"/>
<classRef key="model.appLike"/>
<classRef key="model.editLike"/>
<classRef key="model.graphicPrimitiveLike"/>
<classRef key="model.milestoneLike.music"/>
<classRef key="model.relationLike"/>
<classRef key="model.staffDefLike"/>
<classRef key="model.staffPart"/>
<classRef key="model.transcriptionLike"/>
</alternate>
</content>
<constraintSpec ident="checkStaff_n" scheme="schematron">
<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 xml:lang="en">
<p>The <att>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>n</att> attribute may be used as a reference to a <gi scheme="MEI">staffDef</gi> element with the same value in its <att>n</att> attribute or the staff may contain a staffDef element that defines it. If neither <att>def</att> nor <att>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>