<sch:rule context="mei:graceGrp[not(@copyof)]">
<sch:assert test="count(descendant::*[local-name()='note' or local-name()='rest' or local-name()='chord'
or local-name()='space']) > 1">A graceGrp without a copyof attribute must have at least 2 note, rest, chord, or space
descendants.</sch:assert>
</sch:rule>
<sch:rule context="mei:graceGrp[@grace]">
<sch:assert test="not(descendant::mei:*[@grace])">The grace attribute is not allowed on
descendants of a graceGrp with a grace attribute.</sch:assert>
</sch:rule>
<elementSpec ident="graceGrp" module="MEI.cmn">
<desc>A container for a sequence of grace notes.</desc>
<classes>
<memberOf
key="att.common"/>
<memberOf
key="att.facsimile"/>
<memberOf
key="att.graceGrp.log"/>
<memberOf
key="att.graceGrp.vis"/>
<memberOf
key="att.graceGrp.ges"/>
<memberOf
key="att.graceGrp.anl"/>
<memberOf
key="model.eventLike.cmn"/>
</classes>
<content>
<rng:zeroOrMore>
<rng:choice>
<rng:ref
name="model.eventLike"
/>
<rng:ref
name="model.eventLike.cmn"
/>
<rng:ref
name="model.appLike"
/>
<rng:ref
name="model.editLike"
/>
<rng:ref
name="model.transcriptionLike"
/>
</rng:choice>
</rng:zeroOrMore>
</content>
<constraintSpec ident="When_not_copyof_graceGrp_content" scheme="isoschematron">
<constraint>
<sch:rule context="mei:graceGrp[not(@copyof)]">
<sch:assert test="count(descendant::*[local-name()='note' or local-name()='rest' or local-name()='chord'
or local-name()='space']) > 1">A graceGrp without a copyof attribute must have at least 2 note, rest, chord, or space
descendants.</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
<constraintSpec ident="When_graced" scheme="isoschematron">
<constraint>
<sch:rule context="mei:graceGrp[@grace]">
<sch:assert test="not(descendant::mei:*[@grace])">The grace attribute is not allowed on
descendants of a graceGrp with a grace attribute.</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
</elementSpec>