Preheat the oven to 190ºC/375ºF/gas 5. Grease two springform cake tins (roughly 20cm) with margarine, then line the bottom with greaseproof paper and dust the sides with gluten-free flour.
In a bowl, beat the margarine and sugar for around 5 minutes, or until light and fluffy. Add the vanilla extract and yoghurt, then mix until combined. Sieve the flour, baking powder, xanthan gum and cocoa powder into the bowl, then fold through. Add the milk and stir briefly until you have a nice, smooth batter.
Carefully divide the mixture between the cake tins, then place on the middle shelf of the hot oven for 15 to 20 minutes, or until an inserted skewer comes out clean. Leave to cool for 5 minutes, before turning the cakes out onto a wire cooling rack, then leave to cool completely while you make the icing. Sieve the icing sugar and cocoa powder into a large bowl, then add the margarine and beat until smooth. Stir in the soya yoghurt to combine.
Once cooled, place one of the sponges on a plate or cake stand. Carefully spread half the butter icing on top, then scatter over most of the raspberries. Sandwich the second sponge on top and press down lightly, then carefully spread the remaining icing over the top and finish with a scattering of berries and a few shavings of chocolate.