private void Output(SchemaInfo schemaInfo) {
foreach (XmlSchemaElement element in this.schema.Elements.Values) {
schemaInfo.TargetNamespaces[element.QualifiedName.Namespace] = true;
schemaInfo.ElementDecls.Add(element.QualifiedName, element.ElementDecl);
}
foreach (XmlSchemaAttribute attribute in this.schema.Attributes.Values) {
schemaInfo.TargetNamespaces[attribute.QualifiedName.Namespace] = true;
schemaInfo.AttributeDecls.Add(attribute.QualifiedName, attribute.AttDef);
}
foreach (XmlSchemaType type in this.schema.SchemaTypes.Values) {
schemaInfo.TargetNamespaces[type.QualifiedName.Namespace] = true;
XmlSchemaComplexType complexType = type as XmlSchemaComplexType;
if (complexType == null || (!complexType.IsAbstract && type != XmlSchemaComplexType.AnyType)) {
schemaInfo.ElementDeclsByType.Add(type.QualifiedName, type.ElementDecl);
}
}
foreach (XmlSchemaNotation notation in this.schema.Notations.Values) {
schemaInfo.TargetNamespaces[notation.QualifiedName.Namespace] = true;
SchemaNotation no = new SchemaNotation(notation.QualifiedName);
no.SystemLiteral = notation.System;
no.Pubid = notation.Public;
if (schemaInfo.Notations[no.Name.Name] == null) {
schemaInfo.Notations.Add(no.Name.Name, no);
}
}
}