int LookupNamespaceInCurrentScope( string prefix ) {
if ( useNsHashtable ) {
int nsIndex;
if ( nsHashtable.TryGetValue( prefix, out nsIndex ) ) {
if ( nsIndex > stack[top].prevNsTop ) {
return nsIndex;
}
}
}
else {
for ( int i = nsTop; i > stack[top].prevNsTop; i-- ) {
if ( nsStack[i].prefix == prefix ) {
return i;
}
}
}
return -1;
}