Broken content models when some elements are not included
When including elements, e.g. via moduleRef/@include, some RNG content models may be broken if all elements references within a content child (e.g. alternate or sequence) are excluded.
For example:
<moduleRef key="textcrit" include="app rdg rdgGrp"/>
Will cause the definition of rdgGrp to be broken:
<oneOrMore>
<choice>
<group>
<ref name="rdgGrp"/>
</group>
<zeroOrMore>
<group>
<optional>
<!-- NOT VALID -->
</optional>
<group>
<ref name="model.rdgLike"/>
</group>
</group>
</zeroOrMore>
<zeroOrMore>
<ref name="model.noteLike"/>
</zeroOrMore>
</choice>
</oneOrMore>
In short: if all elementRefs are dropped from a sequence or alternate, do not ouput the corresponding RNG element.
This is a generic problem, I think. When a grouping element such as <sequence> or alternate has no children because they have been deleted, the grouping element itself should also be deleted. It matters less if a child is a class reference, even if that class has no members, because RNG is more forgiving of that situation.