Succession to the Spanish throne follows male-preference cognatic primogeniture. A dynast who marries against the express prohibition of the monarch and the Cortes Generales, the legislative chamber of Spain, is excluded from the succession. Wikipedia