private XmlSchemas Export (Type type, XmlAttributeOverrides overrides, string defaultNamespace)
{
XmlReflectionImporter ri = new XmlReflectionImporter (overrides, defaultNamespace);
XmlSchemas schemas = new XmlSchemas ();
XmlSchemaExporter sx = new XmlSchemaExporter (schemas);
XmlTypeMapping tm = ri.ImportTypeMapping (type);
sx.ExportTypeMapping (tm);
return schemas;
}