`<classRef>` drops member classes when `@expand` present
notes
- This issue is definitely related to #140, is probably related to #221, and may be related to #220 (but I doubt it).
- This issue strikes me as HIGH priority, as it is a pretty egregious error. That said, it has been around since at least 2021, and probably years before, and no one has mentioned it. So maybe it is LOW priority.
history (ignorable)
I spent several hours yesterday and early this morning working on a customization ODD for testing our new <interleave> element. What I have found, so far, is that <interleave> seems to work fine, but processing of <classRef> is pretty messed up.
problem (description, which may not help much)
When a model class is a member of another model class, the expansion of the class of which it is a member fails to include it iff the reference includes an explicit @expand.
problem (abstract example, probably more helpful)
Say that class model.LITTLE is a member of class model.BIG. If you have a reference to model.BIG that uses the @expand attribute, the result will not include those elements that are members of model.LITTLE.
problem (concrete example)
Presuming the namesdates module is NOT included, the model.nameLike.agent class has only one member, <name>. It (model.nameLike.agent), in turn, is a member of model.nameLike. A <classRef key="model.nameLike"> does the right thing (<name> is included in the output RELAX NG), but when a <classRef key="model.nameLike" expand="[whatever]"> is used, the <name> element is not included in the output RELAX NG. I am all but convinced this occurs regardless of the values of @minOccurs and @maxOccurs, but have not actually tested that many possibilities.
problem (demonstration ODD)
The prose in this little demonstration ODD (uploaded as cebd.zip, which contains both cebd.odd and cebd.rnc) is meant to be helpful, particularly the descriptions of the new elements. I have tested this ODD against at least the release-7.52.0, release-7.53.0, release-7.54.0, release-7.55.0, release-7.56.0, release-7.57.0, release-7.57.1, release-7.58.0, and dev branches with the same results (in this area).