private string ResolveNonEmptyPrefix(string prefix) {
Debug.Assert(this.scopeStack != null, "PushScope wasn't called");
Debug.Assert(prefix != null || prefix.Length != 0);
if (prefix == Keywords.s_Xml) {
return Keywords.s_XmlNamespace;
}
else if (prefix == Keywords.s_Xmlns) {
return Keywords.s_XmlnsNamespace;
}
for (InputScope inputScope = this.scopeStack; inputScope != null; inputScope = inputScope.Parent) {
string nspace = inputScope.ResolveNonAtom(prefix);
if (nspace != null) {
return nspace;
}
}
throw XsltException.Create(Res.Xslt_InvalidPrefix, prefix);
}