src/Misc/EFTools/XmlCore/Model/Validation/AttributeContentValidator.cs
/// <summary>
///     Returns the XmlSchemaAttributeGroup specified by the given XmlSchemaAttributeGroupRef from the instance's XmlSchemaSet.
/// </summary>
/// <param name="xsagr"></param>
/// <returns></returns>
Returns the XmlSchemaAttributeGroup specified by the given XmlSchemaAttributeGroupRef from the instance's XmlSchemaSet.
Returns the XmlSchemaAttributeGroup specified by the given XmlSchemaAttributeGroupRef from the instance ' s XmlSchemaSet .
private XmlSchemaAttributeGroup GetXmlSchemaAttributeGroupFromAttributeGroupRef(XmlSchemaAttributeGroupRef xsagr)
        {
            var schema = GetSchemaFromSchemaSet(xsagr.RefName.Namespace);
            XmlSchemaAttributeGroup xsag = null;
            if (schema != null)
            {
                if (schema.AttributeGroups.Contains(xsagr.RefName))
                {
                    xsag = schema.AttributeGroups[xsagr.RefName] as XmlSchemaAttributeGroup;
                }
            }
            else
            {
                foreach (XmlSchema s in SchemaSet.Schemas())
                {
                    if (s.AttributeGroups.Contains(xsagr.RefName))
                    {
                        xsag = s.AttributeGroups[xsagr.RefName] as XmlSchemaAttributeGroup;
                        break;
                    }
                }
            }
            Debug.Assert(xsag != null, "didn't find XmlSchemaAttributeGroup " + xsagr.RefName + " in schema " + xsagr.RefName.Namespace);
            return xsag;
        }
private XmlSchemaAttributeGroup GetXmlSchemaAttributeGroupFromAttributeGroupRef ( XmlSchemaAttributeGroupRef xsagr ) { var schema = GetSchemaFromSchemaSet ( xsagr . RefName . Namespace ) ; XmlSchemaAttributeGroup xsag = null ; if ( schema != null ) { if ( schema . AttributeGroups . Contains ( xsagr . RefName ) ) { xsag = schema . AttributeGroups [ xsagr . RefName ] as XmlSchemaAttributeGroup ; } } else { foreach ( XmlSchema s in SchemaSet . Schemas ( ) ) { if ( s . AttributeGroups . Contains ( xsagr . RefName ) ) { xsag = s . AttributeGroups [ xsagr . RefName ] as XmlSchemaAttributeGroup ; break ; } } } Debug . Assert ( xsag != null , " " + xsagr . RefName + " " + xsagr . RefName . Namespace ) ; return xsag ; }
Returns the XmlSchemaAttributeGroup specified by the given XmlSchemaAttributeGroupRef from the instance's XmlSchemaSet.
Returns the XmlSchemaAttributeGroup specified by the given XmlSchemaAttributeGroupRef from the instance ' s XmlSchemaSet .
// couldn't find specific schema, so scan all schemas' atribute groups.
None
xsagr
XmlSchemaAttributeGroupRef
None