Init doc tree recursively