XSCMValidator createAllCM(XSParticleDecl particle) { if (particle.fMaxOccurs == 0) return null; // get the model group, and add all children of it to the content model XSModelGroupImpl group = (XSModelGroupImpl)particle.fValue; // create an all content model. the parameter indicates whether // the <all> itself is optional XSAllCM allContent = new XSAllCM(particle.fMinOccurs == 0, group.fParticleCount, fSchemaVersion); for (int i = 0; i < group.fParticleCount; i++) { // add the element decl to the all content model allContent.addElement((XSElementDecl)group.fParticles[i].fValue, group.fParticles[i].fMinOccurs == 0); } return allContent; }
return findMatchingDecl(elementName, subGroupHandler); return findMatchingDecl(elementName, subGroupHandler);