props.setProperty( "jndi.syntax.ignorecase", "true" );
props.setProperty( "jndi.syntax.trimblanks", "true" );
Name searchBaseDn = null;
Name ctxRoot = new CompoundName( nameInNamespace, props );
searchBaseDn = new CompoundName( baseDn, props );
if ( !searchBaseDn.startsWith( ctxRoot ) )
{
throw new NamingException( I18n.err( I18n.ERR_648, baseDn ) );
}
for ( int ii = 0; ii < ctxRoot.size(); ii++ )
{
searchBaseDn.remove( 0 );
}
return searchBaseDn;