<classSpec ident="att.stems" module="MEI.shared" type="atts">
<desc xml:lang="en">Attributes that describe the properties of stemmed features; that is, chords and
notes.</desc>
<attList>
<attDef ident="stem.dir" usage="opt">
<desc xml:lang="en">Describes the direction of a stem.</desc>
</attDef>
<attDef ident="stem.len" usage="opt">
<desc xml:lang="en">Encodes the stem length.</desc>
</attDef>
<attDef ident="stem.mod" usage="opt">
<desc xml:lang="en">Encodes any stem "modifiers"; that is, symbols rendered on the stem, such as tremolo
or Sprechstimme indicators.</desc>
</attDef>
<attDef ident="stem.pos" usage="opt">
<desc xml:lang="en">Records the position of the stem in relation to the note head(s).</desc>
</attDef>
<attDef ident="stem.sameas" usage="opt">
<desc xml:lang="en">Points to a note element in a different layer whose stem is shared.
The linked notes should be rendered like a chord though they are part of different
layers.
</desc>
<constraintSpec ident="check_stem.sameasTarget" scheme="schematron">
<constraint>
<sch:rule context="@stem.sameas">
<sch:let name="layer.n" value="self::node()/ancestor::mei:layer/@n"/>
<sch:let name="ref.id" value="substring(.,2)"/>
<sch:assert role="warning" test="not(normalize-space(.) eq '')">@stem.sameas attribute
should have content.</sch:assert>
<sch:assert role="warning" test="substring(.,2)=//mei:note[not(ancestor::mei:layer/@n=$layer.n)]/@xml:id">
The value in @stem.sameas should correspond to the @xml:id attribute of the linked
note
element of a different layer.</sch:assert>
<sch:assert role="warning" test="../@dur=//mei:note[@xml:id=$ref.id]/@dur">
The linked notes by @stem.sameas should have the same @dur values.
</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
</attDef>
<attDef ident="stem.visible" usage="opt">
<desc xml:lang="en">Determines whether a stem should be displayed.</desc>
</attDef>
<attDef ident="stem.x" usage="opt">
<desc xml:lang="en">Records the output x coordinate of the stem’s attachment point.</desc>
<datatype>
<rng:data type="decimal"/>
</datatype>
</attDef>
<attDef ident="stem.y" usage="opt">
<desc xml:lang="en">Records the output y coordinate of the stem’s attachment point.</desc>
<datatype>
<rng:data type="decimal"/>
</datatype>
</attDef>
</attList>
</classSpec>