Complex sentence: It is one of the oldest churches in Ljubljana, having originally been built in the Middle Ages near the city walls.
Split into simpler sentences: It is one of the oldest churches in Ljubljana. It was built in the Middle Ages near the city walls.