private void Output(SchemaInfo schemaInfo) {
string tns;
foreach(XmlSchema schema in schemasToCompile.Values) {
tns = schema.TargetNamespace;
if (tns == null) {
tns = string.Empty;
}
schemaInfo.TargetNamespaces[tns] = tns;
}
foreach (XmlSchemaElement element in elements.Values) {
schemaInfo.ElementDecls.Add(element.QualifiedName, element.ElementDecl);
}
foreach (XmlSchemaAttribute attribute in attributes.Values) {
schemaInfo.AttributeDecls.Add(attribute.QualifiedName, attribute.AttDef);
}
foreach (XmlSchemaType type in schemaTypes.Values) {
schemaInfo.ElementDeclsByType.Add(type.QualifiedName, type.ElementDecl);
}
foreach (XmlSchemaNotation notation in notations.Values) {
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);
}
}
}