private void Prepare() {
foreach (XmlSchemaElement element in this.schema.Elements.Values) {
if (!element.SubstitutionGroup.IsEmpty) {
XmlSchemaSubstitutionGroup substitutionGroup = (XmlSchemaSubstitutionGroup)this.examplars[element.SubstitutionGroup];
if (substitutionGroup == null) {
substitutionGroup = new XmlSchemaSubstitutionGroupV1Compat();
substitutionGroup.Examplar = element.SubstitutionGroup;
examplars.Add(element.SubstitutionGroup, substitutionGroup);
}
ArrayList members = substitutionGroup.Members;
Debug.Assert(!members.Contains(element));
members.Add(element);
}
}
}