public override ArrayList ExpectedElements(ValidationState context, bool isRequiredOnly) {
ArrayList names = null;
BitSet curpos = context.CurPos[context.CurrentState.CurPosIndex];
for (int pos = curpos.NextSet(-1); pos != -1; pos = curpos.NextSet(pos)) {
if (names == null) {
names = new ArrayList();
}
XmlSchemaParticle p = (XmlSchemaParticle)positions[pos].particle;
if (p == null) {
string s = symbols.NameOf(positions[pos].symbol);
if (s.Length != 0) {
names.Add(s);
}
}
else {
string s = p.NameString;
if (!names.Contains(s)) {
names.Add(s);
}
}
}
return names;
}