Complex sentence: John III of Sweden married Catherine Jagellonica, the sister of Sigismund II Augustus of Poland, and when Sigismund died without a male heir, their son was elected king of Poland and grand duke of Lithuania as Sigismund III in 1587.
Split into simpler sentences: John III of Sweden married Catherine Jagellonka, the sister of Sigismund II Augustus of Poland. When Sigismund II of Poland died without issue the son of John III of Sweden and Catherine Jagellonka was elected King of Poland and Grand Duke of Lithuania as Sigismund III in 1587.