iTextSharp.text.pdf.security.MakeXmlSignature.NormalizeNamespaces C# (CSharp) Method

NormalizeNamespaces() private static method

private static NormalizeNamespaces ( XPathNavigator src, XPathNavigator dest ) : void
src XPathNavigator
dest XPathNavigator
return void
        private static void NormalizeNamespaces(XPathNavigator src, XPathNavigator dest) {
            IDictionary<string, string> dictLocal = src.GetNamespacesInScope(XmlNamespaceScope.ExcludeXml);
            IDictionary<string, string> dictExclude = dest.GetNamespacesInScope(XmlNamespaceScope.Local);

            foreach(KeyValuePair<string, string> pair in dictLocal)
                if(!dictExclude.ContainsKey(pair.Key))
                    dest.CreateAttribute("xmlns", pair.Key, "http://www.w3.org/2000/xmlns/", pair.Value);
        }