public static XmlQueryType Create(XmlSchemaSimpleType schemaType, bool isStrict) {
Debug.Assert(schemaType.Datatype.Variety == XmlSchemaDatatypeVariety.Atomic, "List or Union Xsd types should have been handled by caller.");
XmlTypeCode code = schemaType.Datatype.TypeCode;
// If schemaType is a built-in type,
if (schemaType == XmlSchemaType.GetBuiltInSimpleType(code)) {
// Then use statically allocated type
return Create(code, isStrict);
}
// Otherwise, create a new type
return new ItemType(code, XmlQualifiedNameTest.Wildcard, schemaType, false, isStrict, true);
}