protected override void ProcessUpdate() { base.ProcessUpdate(); ValidationManager vm = editor.ValidationManager; validItems = vm.GetValidElements(parent, node, false); allItems = vm.GetAllElements(); }
public void ValidInsert() { XmlElement sect = doc.CreateElement("sect"); XmlElement p = doc.CreateElement("other"); sect.AppendChild(p); doc.DocumentElement.AppendChild(sect); Assert.AreEqual(2, v.InvalidNodes.AllErrors.Length, "Expected error after setup"); ElementListItem[] items = v.GetValidElements(sect, p, false); Console.WriteLine("Possible inserts: {0}", items.Length); Assert.AreEqual(1, items.Length); }
protected override void ProcessUpdate() { base.ProcessUpdate(); ValidationManager vm = editor.ValidationManager; // TODO: E: entities! if (parent == null || parent.ParentNode == null || parent.ParentNode.NodeType != XmlNodeType.Element) { return; } validItems = vm.GetValidElements((XmlElement)parent.ParentNode, parent, true); allItems = vm.GetAllElements(); }