///<summary>
        ///</summary>
        ///<param name="abieComplexType">
        ///</param>
        ///<param name="allElementDefinitions">
        ///</param>
        ///<returns>
        ///</returns>
        public static IList <AsbieSpec> CumulateAbiesSpecsFromComplexType(ComplexType abieComplexType, IDictionary <string, string> allElementDefinitions)
        {
            IList <AsbieSpec> newAsbieSpecs = new List <AsbieSpec>();

            string abieName = abieComplexType.Name.Substring(0, abieComplexType.Name.Length - 4);

            foreach (Element element in abieComplexType.Items)
            {
                if (!(element.Ref.Name.Equals("")))
                {
                    string associatedABIEName = allElementDefinitions[element.Ref.Name];
                    associatedABIEName = associatedABIEName.Substring(0, associatedABIEName.Length - 4);

                    IAbie associatedAbie = BieLibrary.GetAbieByName(associatedABIEName);

                    string asbieName = NDR.GetAsbieNameFromXsdElement(element, associatedABIEName);

                    AsbieSpec asbieSpec = MatchAsbieToAscc(FindBaseACCForABIE(abieName), asbieName,
                                                           associatedAbie);

                    if (asbieSpec == null)
                    {
                        asbieSpec = CumulateAsbieSpec(element, asbieName, associatedAbie, AggregationKind.Shared);
                    }

                    newAsbieSpecs.Add(asbieSpec);
                }
                else
                {
                    if (element.Type.Prefix.Equals("tns"))
                    {
                        string associatedAbieName = element.Type.Name;
                        associatedAbieName = associatedAbieName.Substring(0, associatedAbieName.Length - 4);

                        IAbie associatedAbie = BieLibrary.GetAbieByName(associatedAbieName);

                        string asbieName = element.Name.Substring(0, element.Name.Length - associatedAbieName.Length);

                        AsbieSpec asbieSpec = MatchAsbieToAscc(FindBaseACCForABIE(abieName), asbieName,
                                                               associatedAbie);

                        if (asbieSpec == null)
                        {
                            asbieSpec = CumulateAsbieSpec(element, asbieName, associatedAbie,
                                                          AggregationKind.Composite);
                        }

                        newAsbieSpecs.Add(asbieSpec);
                    }
                }
            }

            return(newAsbieSpecs);
        }