private void GenerateSchemaTopic(Topic topic) { var schema = (XmlSchema)topic.SchemaObject; var contentFinder = new SchemaContentFinder(schema); contentFinder.Traverse(schema); using (var stream = File.Create(topic.FileName)) using (var writer = new MamlWriter(stream)) { writer.StartTopic(topic.Id); writer.WriteIntroductionForSchema(_context, schema); writer.WriteRemarksSectionForObject(_context, schema); writer.WriteExamplesSectionForObject(_context, schema); writer.WriteElementsSection(_context, contentFinder.Elements); writer.WriteAttributesSection(_context, contentFinder.Attributes); writer.WriteGroupsSection(_context, contentFinder.Groups); writer.WriteAttributeGroupsSection(_context, contentFinder.AttributeGroups); writer.WriteSimpleTypesSection(_context, contentFinder.SimpleTypes); writer.WriteComplexTypesSection(_context, contentFinder.ComplexTypes); writer.EndTopic(); } }