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