Example #1
0
        public void AddLocation(XmlLocationAttribute locationAttribute)
        {
            if (locationAttribute.LocationType.HasFlag(XmlLocationType.Element))
            {
                ElementAllowedNames.AddRange(locationAttribute.AllowedNames);
                ElementAllowedNames.AddCaseVariantsForFirstChar();
                ElementAllowedNames.Sort();
            }

            if (locationAttribute.LocationType.HasFlag(XmlLocationType.Attribute))
            {
                AttributeAllowedNames.AddRange(locationAttribute.AllowedNames);
                AttributeAllowedNames.AddCaseVariantsForFirstChar();
                AttributeAllowedNames.Sort();
            }

            if (locationAttribute.LocationType.HasFlag(XmlLocationType.Value))
            {
                CouldBeValue = true;
            }
        }
Example #2
0
        public void AddLocation(XmlLocationAttribute locationAttribute)
        {
            if (locationAttribute.LocationType.HasFlag(XmlLocationType.Element))
            {
                ElementAllowedNames.AddRange(locationAttribute.AllowedNames);
                ElementAllowedNames.AddCaseVariantsForFirstChar();
                ElementAllowedNames.Sort();
            }

            if (locationAttribute.LocationType.HasFlag(XmlLocationType.Attribute))
            {
                AttributeAllowedNames.AddRange(locationAttribute.AllowedNames);
                AttributeAllowedNames.AddCaseVariantsForFirstChar();
                AttributeAllowedNames.Sort();
            }

            if (locationAttribute.LocationType.HasFlag(XmlLocationType.Value))
            {
                CouldBeValue = true;
            }
        }