SchemaParticle[] derivedParticleArray = derivedModel.getParticleChildren();
SchemaParticle[] baseParticleArray = baseModel.getParticleChildren();
int i = 0, j = 0;
for (; i < derivedParticleArray.length && j < baseParticleArray.length;) {
SchemaParticle derivedParticle = derivedParticleArray[i];
SchemaParticle baseParticle = baseParticleArray[j];
// try to match the two particles by recursing
if (isParticleValidRestriction(baseParticle, derivedParticle, errors, context)) {
// cool found a match, increment both indexes
i++;
j++;
} else {
// did not match, increment the base particle array index only
// that's ok if the base particle is skippable
if (baseParticle.isSkippable()) {
// Ok, let's skip this base particle, increment base particle array index only
j++;
} else {
// whoa, particles are not valid restrictions and base is not skippable - ERROR
recurseValid = false;