protected NsInfo GetContextNsInfo() { if (AliasContext.Peek() == null) { return(NamespaceResolver.GetNsInfo(_currentDocument)); } return(NamespaceResolver.GetNsInfo(AliasContext.Peek().AliasDefinition)); }
private void WritePendingNamespaceDeclarations(string uri) { NsInfo nsInfo = NamespaceResolver.GetNsInfo(_currentDocument); if (nsInfo == null) { return; } foreach (var ns in nsInfo.Namespaces) { if (ns.Value == uri) { continue; } _xmlTextWriter.WriteAttributeString("xmlns", ns.Name, null, ns.Value); } }