I wasn't really talking about replacing dead characters as much as just newcomers to the group, but... The way I've been handling character death lately is as follows:
1. You get any XP that was due you (including the XP for the session in which you died).
2. You loose 1/2 as much XP as it cost you to go up from the previous level to the one you died at (so, a 4th level character looses 1500 xp, for example) - this is subtracted from any XP you got in #1 first.
3. See what level you're at with your new XP total.
I do this mainly because I really dislike the fact that by the core rules, you loose any XP for the session that killed you outright, regardless of amount, and then again loose a random amount of XP based on how close you were to leveling - which means that because of chance, someone who just leveled might effectively loose little more than 1/2 a level, while someone who was, say, 250 XP from leveling, will suddenly end up being 2 level lower than if he lived through the ecnounter. Too much inequality for my taste, and too much potential for putting party members far apart in terms of power.