according to an acquaintance who manages a visa/passport processing company,
"Yes you need a transit visa and you can’t leave the airport, if you have to leave the airport or transit more than once I would get an L Tourist visa"
I suppose you have the info about transit visas from the Chinese consular dept?