internal void SetMinMaxOccurs(XmlSchemaElement el, bool setMaxOccurs)
{
if (this.Occurrence == InferenceOption.Relaxed)
{
if (setMaxOccurs || el.MaxOccurs > 1)
{
el.MaxOccurs = decimal.MaxValue; //set it to unbounded
}
el.MinOccurs = 0;
}
else if (el.MinOccurs > 1)
{
el.MinOccurs = 1;
}
}