Praise be to Allaah.
If the woman has died and there is a foetus in her womb, it is most likely that he has died too. If he is still alive, he will not live for more thana few moments. But if we assume that this case (described in the question) is true, and it is possible to save the child’s life by opening the mother’s abdomen, then the Hanbalis have stated that it is OK to do this, if there is the certainty that the child can be brought forth alive from his mother’s womb. They said: her abdomen should be cut open and the child brought out alive, then her abdomen should be stitched up, then she should be buried. And Allaah knows best.