<sch:rule context="mei:beam[@place eq 'mixed' and not(descendant::mei:*[local-name() eq 'note' or local-name()
eq 'chord'][@staff != ./@staff] or descendant::mei:*[local-name() eq 'note' or local-name()
eq 'chord'][@staff != ancestor::mei:staff/@n])]">
<sch:assert test="count(descendant::mei:*[local-name() eq 'note' or local-name() eq 'chord'][@stem.dir])
= count(descendant::mei:*[local-name() eq 'note' or local-name() eq 'chord'])">Stem direction must be specified for all notes and chords under the
beam.</sch:assert>
<sch:assert test="count(distinct-values(descendant::mei:*[local-name() eq 'note' or local-name() eq
'chord']/@stem.dir)) > 1">Opposing stem directions are required for a beam with @place="mixed".</sch:assert>
</sch:rule>
<sch:rule context="mei:beam[@place eq 'mixed' and (descendant::mei:*[local-name() eq 'note' or local-name()
eq 'chord'][@staff != ./@staff] or descendant::mei:*[local-name() eq 'note' or local-name()
eq 'chord'][@staff != ancestor::mei:staff/@n]) and count(descendant::mei:*[local-name()
eq 'note' or local-name() eq 'chord'][@stem.dir]) = count(descendant::mei:*[local-name()
eq 'note' or local-name() eq 'chord'])]">
<sch:assert test="count(distinct-values(descendant::mei:*[local-name() eq 'note' or local-name() eq
'chord']/@stem.dir)) > 1">Opposing stem directions are required for a beam with @place="mixed".</sch:assert>
</sch:rule>
<classSpec ident="att.beamRend" module="MEI.cmn" type="atts">
<desc>Attributes that record the visual rendition of beams.</desc>
<attList org="group">
<attDef ident="form" usage="opt">
<desc>Captures whether a beam is "feathered" and in which direction.</desc>
<valList type="closed">
<valItem ident="acc">
<desc>(accelerando) indicates that the secondary beams get progressively closer together
toward the end of the beam.</desc>
</valItem>
<valItem ident="mixed">
<desc>(mixed acc and rit) for beams that are "feathered" in both directions.</desc>
</valItem>
<valItem ident="rit">
<desc>(ritardando) means that the secondary beams become progressively more distant
toward the end of the beam.</desc>
</valItem>
<valItem ident="norm">
<desc>(normal) indicates that the secondary beams are equidistant along the course of
the beam.</desc>
</valItem>
</valList>
</attDef>
<attDef ident="place" usage="opt">
<desc>Records the placement of the beam relative to the events it affects.</desc>
<constraintSpec ident="check_beam_place" scheme="isoschematron">
<constraint>
<sch:rule context="mei:beam[@place eq 'mixed' and not(descendant::mei:*[local-name() eq 'note' or local-name()
eq 'chord'][@staff != ./@staff] or descendant::mei:*[local-name() eq 'note' or local-name()
eq 'chord'][@staff != ancestor::mei:staff/@n])]">
<sch:assert test="count(descendant::mei:*[local-name() eq 'note' or local-name() eq 'chord'][@stem.dir])
= count(descendant::mei:*[local-name() eq 'note' or local-name() eq 'chord'])">Stem direction must be specified for all notes and chords under the
beam.</sch:assert>
<sch:assert test="count(distinct-values(descendant::mei:*[local-name() eq 'note' or local-name() eq
'chord']/@stem.dir)) > 1">Opposing stem directions are required for a beam with @place="mixed".</sch:assert>
</sch:rule>
<sch:rule context="mei:beam[@place eq 'mixed' and (descendant::mei:*[local-name() eq 'note' or local-name()
eq 'chord'][@staff != ./@staff] or descendant::mei:*[local-name() eq 'note' or local-name()
eq 'chord'][@staff != ancestor::mei:staff/@n]) and count(descendant::mei:*[local-name()
eq 'note' or local-name() eq 'chord'][@stem.dir]) = count(descendant::mei:*[local-name()
eq 'note' or local-name() eq 'chord'])]">
<sch:assert test="count(distinct-values(descendant::mei:*[local-name() eq 'note' or local-name() eq
'chord']/@stem.dir)) > 1">Opposing stem directions are required for a beam with @place="mixed".</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
</attDef>
<attDef ident="slash" usage="opt">
<desc>Indicates presence of slash through the beam.</desc>
</attDef>
<attDef ident="slope" usage="opt">
<desc>Records the slope of the beam.</desc>
<datatype maxOccurs="1" minOccurs="1">
<rng:data type="decimal"/>
</datatype>
</attDef>
</attList>
</classSpec>