I dont fully understand why China didnt take Taiwan while Clinton was in office he would have weighed all options and done nothing. With that in mind, the only real deterrent China had for those 8 years was the Taiwanese Defense Force!
Sinking a carrier would probably kill about 2823 sailors... the same number as the WTC collapse. I would have thought our response to THAT would have been "horrific", but here we are with a relatively bloodless coup in Afghanistan (a government that likely had little to do with the actual attack). I'm not sure if our nation lacks the self-defense mechanism to retaliate, or if that we were stayed by the lack of a national target in the wake of 9-11. I guess China would find the answer to that one if they were inclined towards sinking a carrier.
Personally, I think they understand SunTzu and Pearl Harbor well enough to try to find the best alternative to sinking our ships: finding a way to make sure that we won't want to use them at all.
Why? Because we lost a ship in a war? Because this violates the "no one is allowed to shoot at Americans" rule?
I agree with your broader point that such an act would galvanize American opinion. Whether this would guarantee the defeat of a Chinese attack on Taiwan, however, is unclear. Presumably the Chinese would be moving very rapidly, in the hope of presenting us with a fait accompli. They would also try to preserve operational surprise, probably by launching an attack from the springboard of their regular exercises in the area.
A U.S. carrier might conceivably become a target if one were loitering in the vicinity when China moved, but otherwise I don't imagine they would risk the provocation. If no U.S. forces were immediately on hand, the Chinese might realistically hope to have completed the job before we could react. It would be interesting to know whether our subs are routinely covering the Taiwan straight in enough strength to seriously interdict an amphibious movement.