private static IEnumerable<IReplacement> GetApplicableReplacements(ElementNode node) { var result = new List<IReplacement>(); // rf this crap if ((node.Name == "input") && (node.HasAttribute("type") && (node.HasAttribute("for")))) { if (node.Attributes.Where(x => (x.Name == "type") && (x.Value == "checkbox")).Any()) { result.Add(new CheckBoxCheckedReplacement()); } } result.AddRange(UriReplacementSpecifications.GetMatching(node)); result.AddRange(FormReplacementSpecifications.GetMatching(node)); return result; }
public bool IsMatch(ElementNode node) { return node.IsTag(elementName) && node.HasAttribute(originalAttributeName); }