void Write1_XmlSchemaAttribute(XmlSchemaAttribute o) {
if ((object)o == null) return;
WriteStartElement("attribute");
WriteAttribute(@"id", @"", ((System.String)o.@Id));
WriteAttributes((XmlAttribute[])o.@UnhandledAttributes, o);
WriteAttribute(@"default", @"", ((System.String)o.@DefaultValue));
WriteAttribute(@"fixed", @"", ((System.String)o.@FixedValue));
if (o.Parent != null && !(o.Parent is XmlSchema)) {
if (o.QualifiedName != null && !o.QualifiedName.IsEmpty && o.QualifiedName.Namespace != null && o.QualifiedName.Namespace.Length != 0) {
WriteAttribute(@"form", @"", "qualified");
}
else {
WriteAttribute(@"form", @"", "unqualified");
}
}
WriteAttribute(@"name", @"", ((System.String)o.@Name));
if (!o.RefName.IsEmpty) {
WriteAttribute("ref", "", o.RefName);
}
else if (!o.SchemaTypeName.IsEmpty) {
WriteAttribute("type", "", o.SchemaTypeName);
}
XmlSchemaUse use = o.Use == XmlSchemaUse.None ? XmlSchemaUse.Optional : o.Use;
WriteAttribute(@"use", @"", Write30_XmlSchemaUse(use));
Write5_XmlSchemaAnnotation((XmlSchemaAnnotation)o.@Annotation);
Write9_XmlSchemaSimpleType((XmlSchemaSimpleType)o.@SchemaType);
WriteEndElement();
}