Original: The character Pippi Longstocking was invented to please her daughter Karin, who was ill and bed-ridden at the time.
Simplified: However, Pippi Longstocking, her most famous character, was invented for her daughter Karin, who was, at the time, ill and had to stay in the bed.