internal override void GetNamespacesToRender(XmlElement element, SortedList attrListToRender, SortedList nsListToRender, Hashtable nsLocallyDeclared) { XmlAttribute attrib = null; object[] attrs = new object[nsLocallyDeclared.Count]; nsLocallyDeclared.Values.CopyTo(attrs, 0); foreach (object a in attrs) { attrib = (XmlAttribute)a; int rDepth; XmlAttribute rAncestral = GetNearestRenderedNamespaceWithMatchingPrefix(Utils.GetNamespacePrefix(attrib), out rDepth); if (Utils.IsNonRedundantNamespaceDecl(attrib, rAncestral)) { nsLocallyDeclared.Remove(Utils.GetNamespacePrefix(attrib)); if (Utils.IsXmlNamespaceNode(attrib)) { attrListToRender.Add(attrib, null); } else { nsListToRender.Add(attrib, null); } } } for (int i = _ancestorStack.Count - 1; i >= 0; i--) { foreach (object a in GetScopeAt(i).GetUnrendered().Values) { attrib = (XmlAttribute)a; if (attrib != null) { GetNamespaceToRender(Utils.GetNamespacePrefix(attrib), attrListToRender, nsListToRender, nsLocallyDeclared); } } } }
internal override void TrackXmlNamespaceNode(XmlAttribute attr, SortedList nsListToRender, SortedList attrListToRender, Hashtable nsLocallyDeclared) { nsLocallyDeclared.Add(Utils.GetNamespacePrefix(attr), attr); }