// create an all content model. the parameter indicates whether
// the <all> itself is optional
XSAllCM allContent = new XSAllCM(particle.fMinOccurs == 0);
// get the model group, and add all children of it to the content model
XSModelGroupImpl group = (XSModelGroupImpl)particle.fValue;
for (int i = 0; i < group.fParticleCount; i++) {
// for all non-empty particles
if (group.fParticles[i].fType != XSParticleDecl.PARTICLE_EMPTY &&
group.fParticles[i].fMaxOccurs != 0)
// add the element decl to the all content model