What is a clergyman who is officially atteched to the army or navy, to some public institution, or to a family or court, for the purpose of performing divine service called?

chaplain — A clergyman who is officially atteched to the army or navy, to some public institution, or to a family or court, for the purpose of performing divine service. (Webster's 1913.)

Sources