internal void CompileMinLengthFacet(XmlSchemaFacet facet) {
CheckProhibitedFlag(facet, RestrictionFlags.MinLength, Res.Sch_MinLengthFacetProhibited);
CheckDupFlag(facet, RestrictionFlags.MinLength, Res.Sch_DupMinLengthFacet);
derivedRestriction.MinLength = XmlBaseConverter.DecimalToInt32((decimal)ParseFacetValue(nonNegativeInt, facet, Res.Sch_MinLengthFacetInvalid, null, null));
if ((baseFixedFlags & RestrictionFlags.MinLength) != 0) {
if (!datatype.IsEqual(datatype.Restriction.MinLength, derivedRestriction.MinLength)) {
throw new XmlSchemaException(Res.Sch_FacetBaseFixed, facet);
}
}
if ((baseFlags & RestrictionFlags.MinLength) != 0) {
if (datatype.Restriction.MinLength > derivedRestriction.MinLength) {
throw new XmlSchemaException(Res.Sch_MinLengthGtBaseMinLength, facet);
}
}
if ((baseFlags & RestrictionFlags.Length) != 0) {
if (datatype.Restriction.Length < derivedRestriction.MinLength) {
throw new XmlSchemaException(Res.Sch_MaxMinLengthBaseLength, facet);
}
}
SetFlag(facet, RestrictionFlags.MinLength);
}