Melt the butter in a skillet set over medium heat. Add the onions and cook until rich in colour and almost sticky, about 10 minutes. Stir in the rosemary and vinegar and simmer until the latter has almost evaporated. Cool onions to room temperature.
Preheat the oven to 425 degrees F. Line a baking pan with parchment paper. Lightly butter one sheet of phyllo pastry. Top with another sheet of phyllo and butter it. Repeat with remaining phyllo. Cut the sheets, widthwise, in half.
Divide and make a row of onions at the bottom end of each piece of layered phyllo. Top the onions with a slice of cheese, and then a chicken breast; season
with salt and pepper. Fold the sides of the phyllo slightly over the chicken and then as tightly as you can, roll it into a cylinder. Place the chicken in the baking pan, seamed-side down. Brush the top of the phyllo with butter. Bake for 20 to 22 minutes, or until puffed and golden.
Serve as is, or, before plating, cut each phyllo-wrapped piece of chicken in half. Drizzle the chicken with any cheese that melted onto the baking pan