Exemplo n.º 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;
            }
        }
Exemplo n.º 2
0
 public void AddLocation(List <string> allowedElementNames)
 {
     ElementAllowedNames.AddRange(allowedElementNames);
     ElementAllowedNames.AddCaseVariantsForFirstChar();
     ElementAllowedNames.Sort();
 }