internal bool FindPrefix(string nspace, out string prefix) {
Debug.Assert(nspace != null);
for (int i = this.elementScopesStack.Length - 1; 0 <= i; i--) {
Debug.Assert(this.elementScopesStack[i] is OutputScope);
OutputScope elementScope = (OutputScope) this.elementScopesStack[i];
string pfx = null;
if (elementScope.FindPrefix(nspace, out pfx)) {
string testNspace = ResolveNamespace(pfx);
if(testNspace != null && Keywords.Equals(testNspace, nspace)) {
prefix = pfx;
return true;
}
else {
break;
}
}
}
prefix = null;
return false;
}