internal static XmlQualifiedName BaseTypeName(XmlSchemaSimpleType dataType)
{
XmlSchemaSimpleTypeContent content = dataType.Content;
if (content is XmlSchemaSimpleTypeRestriction)
{
return ((XmlSchemaSimpleTypeRestriction)content).BaseTypeName;
}
else if (content is XmlSchemaSimpleTypeList)
{
XmlSchemaSimpleTypeList list = (XmlSchemaSimpleTypeList)content;
if (list.ItemTypeName != null && !list.ItemTypeName.IsEmpty)
return list.ItemTypeName;
if (list.ItemType != null)
{
return BaseTypeName(list.ItemType);
}
}
return new XmlQualifiedName("string", XmlSchema.Namespace);
}