internal XmlSchemaDatatype DeriveByList(int minSize, XmlSchemaType schemaType) { if (variety == XmlSchemaDatatypeVariety.List) { throw new XmlSchemaException(Res.Sch_ListFromNonatomic, string.Empty); } else if (variety == XmlSchemaDatatypeVariety.Union && !((Datatype_union)this).HasAtomicMembers()) { throw new XmlSchemaException(Res.Sch_ListFromNonatomic, string.Empty); } DatatypeImplementation dt = new Datatype_List(this, minSize); dt.variety = XmlSchemaDatatypeVariety.List; dt.restriction = null; dt.baseType = c_anySimpleType; //Base type of a union is anySimpleType dt.parentSchemaType = schemaType; return dt; }