Complex sentence: In 799 Rijeka was attacked by the Frankish troops of Charlemagne, their Siege of Trsat was once repulsed, whereby the Frankish commander Margrave Eric of Friuli was killed.
Split into simpler sentences: In 799 Rijeka was attacked by the Frankish troops of Charlemagne. Their Siege of Trsat was at first repulsed, during which the Frankish commander Duke Eric of Friuli was killed.