Heat the oil and add the chopped onions to it. Sautxe9 over medium heat till they turn a nice deep brown. Take it off the heat and let it cool.
Put the remaining ingredients, except the water, in a bowl (or processor bowl) and mix well. Add enough warm water and knead until you have a soft and elastic dough, almost sticky dough. Add the caramelized onions and knead it into the dough till distributed uniformly. Shape into a smooth ball and place it in an oiled bowl, turning it to coat it well with oil. Cover loosely and let it rise for about an hour to an hour and a half till it has doubled in volume.
Dust your working surface lightly with flour. If you're going to shape it as a long wheat stalk (or two if your oven or baking sheets aren't large enough to take one long one), then press out the dough into a rough rectangle. Fold the long edge away from you towards the center. Fold the long edge near you towards the centre. Now fold over in half, like a letter fold and pinch the seam together neatly and tightly. See this tutorial for a better idea on shaping a baguette.
Sprinkle flour generously over the baguette. Starting with one end of the baguette, make equidistant cuts in the dough (about three inches apart) holding a pair of scissors so they are parallel to the bread, and then tilting them so they are at a 45-degree angle. Make the cuts in the dough almost as if you were going to snip that bit off but it will still be attached, then take that piece and move it to the left. Make another snip about 3 inches down from the bottom of the last one and move that piece to the right. Keep on doing this until you reach the end of the bread. See this video for a better understanding of this process.
If you want to make a wreath like I did, then take a look at this tutorial first. Place the risen dough on a floured surface. Gently poke a hole through the dough in the centre with your fingers and stretch out the dough into a round ring. Place this on the parchment lined baking sheet and then generously dust the top of the dough with flour.
As described above for the baguette, make cuts about 2 inches apart and move each portion outward forming a wreath. Once the Epi has been shaped, loosely cover the dough and let it rise again for about 15 minutes.
In the meanwhile, preheat your oven to 240C (470F) with a baking tray upside down on the rack and an empty Pain at the bottom of the oven. When ready place the Epi in the oven and pour a cup of water into the Pain at the bottom to create steam. Bake for about 15 to 20 minutes till the Pain d'Epi is done and golden brown in colour. Let it cool completely before cutting.