Complex sentence: She was the daughter and successor of Ramiro II by Agnes of Aquitaine.As a result of her marriage, she was styled Countess of Barcelona.
Split into simpler sentences: She was the daughter and successor of Ramiro II by Agnes of Aquitaine. By right of her marriage, she was styled Countess of Barcelona.