public static XmlSchemaForm FormResolved(this XmlSchemaAttribute attribute)
        {
            XmlSchemaForm xmlSchemaForm;
            XmlSchemaForm form = attribute.Form;

            xmlSchemaForm = (form != XmlSchemaForm.None ? form : SOMQueryExtensions.GetParentSchema(attribute).AttributeFormDefault);
            return(xmlSchemaForm);
        }
        public static XmlSchemaForm FormResolved(this XmlSchemaElement elem)
        {
            XmlSchemaForm xmlSchemaForm;

            if (elem.RefName.IsEmpty)
            {
                XmlSchemaForm form = elem.Form;
                xmlSchemaForm = (form != XmlSchemaForm.None ? form : SOMQueryExtensions.GetParentSchema(elem).ElementFormDefault);
            }
            else
            {
                xmlSchemaForm = XmlSchemaForm.Qualified;
            }
            return(xmlSchemaForm);
        }