TraverseSchema.ComplexTypeInfo aComplexType = sGrammar.getElementComplexTypeInfo(anElementIndex);
// elementIndex contains the index of the substitutionGroup head
int exemplarBlockSet = sGrammar.getElementDeclBlockSet(elementIndex);
if(aComplexType == null) {
// check on simpleType case
XMLElementDecl anElementDecl = new XMLElementDecl();
sGrammar.getElementDecl(anElementIndex, anElementDecl);
DatatypeValidator anElementDV = anElementDecl.datatypeValidator;
XMLElementDecl exemplarDecl = new XMLElementDecl();
sGrammar.getElementDecl(elementIndex, exemplarDecl);
DatatypeValidator exemplarDV = exemplarDecl.datatypeValidator;
return((anElementDV == null) ||
((anElementDV == exemplarDV) ||
((exemplarBlockSet & SchemaSymbols.RESTRICTION) == 0)));