Put the flour and butter into a food processor fitted with a plastic blade and whiz until the mixture resembles breadcrumbs. Add the caster sugar and whiz again. Now add the yolk and whiz again until your pastry comes together into a ball. Wrap in cling film and leave to rest in the fridge for 45 minutes or so.
Quarter the apples and remove the core from each piece. Cut each quarter into slices, about 3 mm thick at the thickest part. Put them into a saucepan with the cordial and water, cover and simmer the apples very gently until they are just beginning to get tender on the outside. Strain off the liquid and measure how much you have. If it is more than about 75ml then put it into a small saucepan and boil to reduce it to 75 ml. Stir in the zest, pour the liquid over the apples and leave to cool. Preheat the oven to 190 C and put a metal baking sheet into it.
Roll out 2/3 of the pastry and line a pie dish (measuring 25cm in diameter, 5-6 cm deep) with it. Sprinkle the ground almonds on the bottom of the pie. Break the marzipan up into little chunks. Spoon the apples (with the elderflower syrup) into the case, scattering the chunks of marzipan as you go. Roll out the rest of the pastry and make 6 strips with which to form a lattice on the top. Moisten each end of the pastry strips and lay them across the top of the pie. Press down to seal. Put this into the oven on top of the baking sheet and cook until golden.
It will take about 30 minutes. About 8 minutes before the end of cooking time, scatter a handful of flaked almonds on top and return to the oven – the almonds will toast in the final stage of baking. Dust the pie lightly with icing sugar before serving.