data.STAFFREL

Location of musical material relative to a staff.
Module
Used by
These class-based attributes use data.STAFFREL
att.placementRelEvent/@placeCaptures the placement of the item with respect to the event with which it is associated.
att.placementRelStaff/@placeCaptures the placement of the item with respect to the staff with which it is associated.
These other Data Types reference data.STAFFREL
data.PLACEMENTLocation information.
Constraints

The @staff attribute must contain 2 numerically-adjacent integer values.
Staves and are not adjacent.

Declaration
<macroSpec ident="data.STAFFREL" module="MEI" type="dt">
<desc xml:lang="en">Location of musical material relative to a staff.</desc>
<content>
<rng:choice>
<rng:ref name="data.STAFFREL.basic"/>
<rng:ref name="data.STAFFREL.extended"/>
</rng:choice>
</content>
<constraintSpec ident="between_requires_adjacent_staves" scheme="schematron">
<constraint>
<sch:rule context="mei:*[@place eq 'between']">
<sch:assert test="count(tokenize(normalize-space(string(@staff)), '\s+')) = 2">The @staff attribute must contain 2 numerically-adjacent integer values.</sch:assert>
<sch:let name="tokenizedStaff" value="tokenize(normalize-space(string(@staff)), '\s+')"/>
<sch:let name="maxValue" value="max((number($tokenizedStaff[1]), number($tokenizedStaff[2])))"/>
<sch:let name="minValue" value="min((number($tokenizedStaff[1]), number($tokenizedStaff[2])))"/>
<sch:assert test="$maxValue - $minValue = 1">Staves
<sch:value-of select="$minValue"/>
and
<sch:value-of select="$maxValue"/>
are not adjacent.</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
</macroSpec>