In the Holy Roman Empire, the German term Hochstift (plural: Hochstifte) referred to the territory ruled by a bishop as a prince (i.e. prince-bishop), as opposed to his diocese, generally much larger and over which he exercised only spiritual authority. The terms prince-bishopric (Fürstbistum, or simply Bistum) and ecclesiastical principality are synonymous with Hochstift. Erzstift and Kurerzstift referred respectively to the territory (prince-archbishopric) ruled by a prince-archbishop and an elector-archbishop while Stift referred to the territory ruled by an imperial abbot or abbess, or a princely abbot or abbess. Stift was also often used to refer to any type of ecclesiastical principality. The Hochstift was made of land mostly acquired in the Middle Ages through donations by the king/emperor, bequests by local lords or through purchase. It was often made of non-contiguous parts, some of which could be located outside the bishop's diocese. While a diocese is a spiritual territorial jurisdiction, a prince-bishopric or Hochstift was a secular territorial jurisdiction, a fiefdom created and granted by the Holy Roman Emperor. Exercising a double function, an ecclesiastical and a secular one, the prince-bishops were thus subject to two different legal bases and two jurisdictions. The relationship between the two functions was governed in part by the Concordat of Worms of 1122. The prince-bishop, elected by the canons of the cathedral chapter and often belonging to the high nobility, enjoyed imperial immediacy; he wielded the same authority over his principality as any secular prince, such as a duke or a margrave, over his. He had seat and vote at the Imperial Diet. From a high of approximately 40 in the late Middle Ages, the number of Hochstifte was down to 26 by the late 18th century. They had all been secularized and their territory absorbed by secular states by the time the Holy Roman Empire was dissolved in 1806.