}
else if (childName.equals(SchemaSymbols.ELT_SEQUENCE)) {
particle = traverseSequence(complexContentChild,schemaDoc,grammar,
NOT_ALL_CONTEXT,fComplexTypeDecl);
if (particle != null) {
XSModelGroupImpl group = (XSModelGroupImpl)particle.fValue;
if (group.fParticleCount == 0)
emptyParticle = true;
}
attrNode = DOMUtil.getNextSiblingElement(complexContentChild);
}
else if (childName.equals(SchemaSymbols.ELT_CHOICE)) {
particle = traverseChoice(complexContentChild,schemaDoc,grammar,
NOT_ALL_CONTEXT,fComplexTypeDecl);
if (particle != null && particle.fMinOccurs == 0) {
XSModelGroupImpl group = (XSModelGroupImpl)particle.fValue;
if (group.fParticleCount == 0)
emptyParticle = true;
}
attrNode = DOMUtil.getNextSiblingElement(complexContentChild);
}
else if (childName.equals(SchemaSymbols.ELT_ALL)) {
particle = traverseAll(complexContentChild,schemaDoc,grammar,
PROCESSING_ALL_GP,fComplexTypeDecl);
if (particle != null) {
XSModelGroupImpl group = (XSModelGroupImpl)particle.fValue;
if (group.fParticleCount == 0)
emptyParticle = true;
}
attrNode = DOMUtil.getNextSiblingElement(complexContentChild);
}
else {
// Should be attributes here - will check below...
attrNode = complexContentChild;
}
}
// if the particle is empty because there is no non-annotation chidren,
// we need to make the particle itself null (so that the effective
// content is empty).
if (emptyParticle) {
// get the first child
Element child = DOMUtil.getFirstChildElement(complexContentChild);
// if it's annotation, get the next one
if (child != null) {
if (DOMUtil.getLocalName(child).equals(SchemaSymbols.ELT_ANNOTATION)) {
child = DOMUtil.getNextSiblingElement(child);
}
}
// if there is no (non-annotation) children, mark particle empty
if (child == null)
particle = null;
// child != null means we might have seen an element with
// minOccurs == maxOccurs == 0
}
if (particle == null && isMixed) {
if (fEmptyParticle == null) {
XSModelGroupImpl group = new XSModelGroupImpl();
group.fCompositor = XSModelGroupImpl.MODELGROUP_SEQUENCE;
group.fParticleCount = 0;
group.fParticles = null;
fEmptyParticle = new XSParticleDecl();
fEmptyParticle.fType = XSParticleDecl.PARTICLE_MODELGROUP;